source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORPFCNVT.m@ 1226

Last change on this file since 1226 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1ORPFCNVT ; SLC/AEB - Convert Order Parameter File (100.99) to Parameter Definitions(8989.51) ;3/17/97 12:17
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3 ;
4 ; This program will move data from the Order Parameter File into the Parameter definitions
5SYS1 N X,I,ENT,INST,ERR S X=$G(^ORD(100.99,1,0))
6 ;W !,"ENTITY",?10,"PARAMETER",?41,"INSTANCE",?55,"VALUE",!
7 ;D SAVE("SYS","ORPF TREATING SPECIALTY",1,$P(X,U,3),.ERR)
8 ;D SAVE("SYS","ORPF LAST PURGE DATE",1,$P(X,U,5),.ERR)
9 D STUF("SYS","ORPF LAST PURGE DATE",1,$P(X,U,5),.ERR) ;non-editable
10 D SAVE("SYS","ORPF LAST ORDER PURGED",1,"`"_$P(X,U,6),.ERR)
11 D SAVE("SYS","ORPF ERROR DAYS",1,$P(X,U,7),.ERR)
12 ;D SAVE("SYS","ORPF SHOW PATIENT NAME",1,$P(X,U,11),.ERR)
13 D SAVE("SYS","ORPF ACTIVE ORDERS CONTEXT HRS",1,$P(X,U,12),.ERR)
14 D SAVE("SYS","ORPF REVIEW ON PATIENT MVMT",1,$P(X,U,13),.ERR)
15 D SAVE("SYS","ORPF INITIALS ON SUMMARY",1,$P(X,U,14),.ERR)
16 D SAVE("SYS","ORPF DEFAULT PROVIDER",1,$P(X,U,15),.ERR)
17 D SAVE("SYS","ORPF CONFIRM PROVIDER",1,$P(X,U,17),.ERR)
18 ;
19SYS2 S X=$G(^ORD(100.99,1,2))
20 ;D SAVE("SYS","ORPF ELECTRONIC SIGNATURE",1,$P(X,U,1),.ERR)
21 D SAVE("SYS","ORPF EXPAND CONTINUOUS ORDERS",1,$P(X,U,5),.ERR)
22 D SAVE("SYS","ORPF CHART COPY FORMAT",1,"`"_$P(X,U,6),.ERR)
23 D SAVE("SYS","ORPF CHART COPY HEADER",1,"`"_$P(X,U,7),.ERR)
24 D SAVE("SYS","ORPF CHART COPY FOOTER",1,"`"_$P(X,U,8),.ERR)
25 D SAVE("SYS","ORPF RESTRICT REQUESTOR",1,$P(X,U,17),.ERR)
26 D SAVE("SYS","ORPF AUTO UNFLAG",1,$P(X,U,18),.ERR)
27 ;
28MPKG5 S I=0 F S I=$O(^ORD(100.99,1,5,I)) Q:I'>0 D
29 .S ENT="PKG.`"_I
30 .;S X=$G(^ORD(100.99,1,5,I,4)) D SAVE(ENT,"ORPF CLEAN-UP ACTION",1,$P(X,U,1),.ERR)
31 .;S X=$G(^ORD(100.99,1,5,I,15)) D SAVE(ENT,"ORPF PATIENT SELECT ACTION",1,$P(X,U,1),.ERR)
32 ;
33MSYS20 S I=0 F S I=$O(^ORD(100.99,1,20,I)) Q:I'>0 D
34 .S X=^ORD(100.99,1,20,I,0),INST="`"_I
35 .D SAVE("SYS","ORPF WARD LABEL FORMAT",INST,"`"_$P(X,U,3),.ERR)
36 .D SAVE("SYS","ORPF WARD REQUISITION FORMAT",INST,"`"_$P(X,U,4),.ERR)
37 .D SAVE("SYS","ORPF SERVICE COPY DEFLT DEVICE",INST,"`"_$P(X,U,5),.ERR)
38 .D SAVE("SYS","ORPF SERVICE COPY HEADER",INST,"`"_$P(X,U,7),.ERR)
39 .D SAVE("SYS","ORPF SERVICE COPY FORMAT",INST,"`"_$P(X,U,6),.ERR)
40 .D SAVE("SYS","ORPF SERVICE COPY FOOTER",INST,"`"_$P(X,U,8),.ERR)
41 .S J=0 F S J=$O(^ORD(100.99,1,20,I,1,J)) Q:J'>0 D
42 ..S X=^ORD(100.99,1,20,I,1,J,0),ENT="LOC.`"_$P(X,U,1)
43 ..D SAVE(ENT,"ORPF SERVICE COPY DEFLT DEVICE",INST,"`"_$P(X,U,2),.ERR)
44 ;
45MLOC25 S I=0 F S I=$O(^ORD(100.99,1,25,I)) Q:I'>0 D
46 .S X=^ORD(100.99,1,25,I,0),ENT="LOC.`"_I
47 .D SAVE(ENT,"ORPF PROMPT FOR CHART COPY",1,$P(X,U,3),.ERR)
48 .D SAVE(ENT,"ORPF CHART COPY PRINT DEVICE",1,"`"_$P(X,U,4),.ERR)
49 .D SAVE(ENT,"ORPF LABEL PRINT DEVICE",1,"`"_$P(X,U,5),.ERR)
50 .D SAVE(ENT,"ORPF REQUISITION PRINT DEVICE",1,"`"_$P(X,U,6),.ERR)
51 .D SAVE(ENT,"ORPF PROMPT FOR LABELS",1,$P(X,U,7),.ERR)
52 .D SAVE(ENT,"ORPF PROMPT FOR REQUISITIONS",1,$P(X,U,8),.ERR)
53 .D SAVE(ENT,"ORPF PRINT DAILY ORDER SUMMARY",1,$P(X,U,9),.ERR)
54 .D SAVE(ENT,"ORPF DAILY ORDER SUMMARY DEVC",1,"`"_$P(X,U,10),.ERR)
55 .D SAVE(ENT,"ORPF PRINT CHART COPY SUMMARY",1,$P(X,U,11),.ERR)
56 Q
57SAVE(ENT,PAR,INST,VAL,ORERR) ;
58 I ($L(VAL)&(VAL'="`")) D
59 .;W !,ENT,?10,PAR,?45,INST,?55,VAL
60 .D EN^XPAR(ENT,PAR,INST,VAL,.ORERR) I ORERR D ONERR
61 Q
62STUF(ENT,PAR,INST,VAL,ORERR) ; bypass input xform
63 D PUT^XPAR(ENT,PAR,INST,VAL,.ORERR) I ORERR D ONERR
64 Q
65ONERR ; come here on error, expects ORERR,ENT,PAR,INST,VAL to be defined
66 N X
67 S X(1)="Error: "_PAR_" "_$$EZBLD^DIALOG(+ORERR)
68 S X(2)=" Entity:"_ENT_" Inst:"_INST_" Val:"_VAL
69 D MES^XPDUTL(.X)
70 Q
Note: See TracBrowser for help on using the repository browser.