ORPFCNVT ; SLC/AEB - Convert Order Parameter File (100.99) to Parameter Definitions(8989.51) ;3/17/97 12:17
;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
;
; This program will move data from the Order Parameter File into the Parameter definitions
SYS1 N X,I,ENT,INST,ERR S X=$G(^ORD(100.99,1,0))
;W !,"ENTITY",?10,"PARAMETER",?41,"INSTANCE",?55,"VALUE",!
;D SAVE("SYS","ORPF TREATING SPECIALTY",1,$P(X,U,3),.ERR)
;D SAVE("SYS","ORPF LAST PURGE DATE",1,$P(X,U,5),.ERR)
D STUF("SYS","ORPF LAST PURGE DATE",1,$P(X,U,5),.ERR) ;non-editable
D SAVE("SYS","ORPF LAST ORDER PURGED",1,"`"_$P(X,U,6),.ERR)
D SAVE("SYS","ORPF ERROR DAYS",1,$P(X,U,7),.ERR)
;D SAVE("SYS","ORPF SHOW PATIENT NAME",1,$P(X,U,11),.ERR)
D SAVE("SYS","ORPF ACTIVE ORDERS CONTEXT HRS",1,$P(X,U,12),.ERR)
D SAVE("SYS","ORPF REVIEW ON PATIENT MVMT",1,$P(X,U,13),.ERR)
D SAVE("SYS","ORPF INITIALS ON SUMMARY",1,$P(X,U,14),.ERR)
D SAVE("SYS","ORPF DEFAULT PROVIDER",1,$P(X,U,15),.ERR)
D SAVE("SYS","ORPF CONFIRM PROVIDER",1,$P(X,U,17),.ERR)
;
SYS2 S X=$G(^ORD(100.99,1,2))
;D SAVE("SYS","ORPF ELECTRONIC SIGNATURE",1,$P(X,U,1),.ERR)
D SAVE("SYS","ORPF EXPAND CONTINUOUS ORDERS",1,$P(X,U,5),.ERR)
D SAVE("SYS","ORPF CHART COPY FORMAT",1,"`"_$P(X,U,6),.ERR)
D SAVE("SYS","ORPF CHART COPY HEADER",1,"`"_$P(X,U,7),.ERR)
D SAVE("SYS","ORPF CHART COPY FOOTER",1,"`"_$P(X,U,8),.ERR)
D SAVE("SYS","ORPF RESTRICT REQUESTOR",1,$P(X,U,17),.ERR)
D SAVE("SYS","ORPF AUTO UNFLAG",1,$P(X,U,18),.ERR)
;
MPKG5 S I=0 F S I=$O(^ORD(100.99,1,5,I)) Q:I'>0 D
.S ENT="PKG.`"_I
.;S X=$G(^ORD(100.99,1,5,I,4)) D SAVE(ENT,"ORPF CLEAN-UP ACTION",1,$P(X,U,1),.ERR)
.;S X=$G(^ORD(100.99,1,5,I,15)) D SAVE(ENT,"ORPF PATIENT SELECT ACTION",1,$P(X,U,1),.ERR)
;
MSYS20 S I=0 F S I=$O(^ORD(100.99,1,20,I)) Q:I'>0 D
.S X=^ORD(100.99,1,20,I,0),INST="`"_I
.D SAVE("SYS","ORPF WARD LABEL FORMAT",INST,"`"_$P(X,U,3),.ERR)
.D SAVE("SYS","ORPF WARD REQUISITION FORMAT",INST,"`"_$P(X,U,4),.ERR)
.D SAVE("SYS","ORPF SERVICE COPY DEFLT DEVICE",INST,"`"_$P(X,U,5),.ERR)
.D SAVE("SYS","ORPF SERVICE COPY HEADER",INST,"`"_$P(X,U,7),.ERR)
.D SAVE("SYS","ORPF SERVICE COPY FORMAT",INST,"`"_$P(X,U,6),.ERR)
.D SAVE("SYS","ORPF SERVICE COPY FOOTER",INST,"`"_$P(X,U,8),.ERR)
.S J=0 F S J=$O(^ORD(100.99,1,20,I,1,J)) Q:J'>0 D
..S X=^ORD(100.99,1,20,I,1,J,0),ENT="LOC.`"_$P(X,U,1)
..D SAVE(ENT,"ORPF SERVICE COPY DEFLT DEVICE",INST,"`"_$P(X,U,2),.ERR)
;
MLOC25 S I=0 F S I=$O(^ORD(100.99,1,25,I)) Q:I'>0 D
.S X=^ORD(100.99,1,25,I,0),ENT="LOC.`"_I
.D SAVE(ENT,"ORPF PROMPT FOR CHART COPY",1,$P(X,U,3),.ERR)
.D SAVE(ENT,"ORPF CHART COPY PRINT DEVICE",1,"`"_$P(X,U,4),.ERR)
.D SAVE(ENT,"ORPF LABEL PRINT DEVICE",1,"`"_$P(X,U,5),.ERR)
.D SAVE(ENT,"ORPF REQUISITION PRINT DEVICE",1,"`"_$P(X,U,6),.ERR)
.D SAVE(ENT,"ORPF PROMPT FOR LABELS",1,$P(X,U,7),.ERR)
.D SAVE(ENT,"ORPF PROMPT FOR REQUISITIONS",1,$P(X,U,8),.ERR)
.D SAVE(ENT,"ORPF PRINT DAILY ORDER SUMMARY",1,$P(X,U,9),.ERR)
.D SAVE(ENT,"ORPF DAILY ORDER SUMMARY DEVC",1,"`"_$P(X,U,10),.ERR)
.D SAVE(ENT,"ORPF PRINT CHART COPY SUMMARY",1,$P(X,U,11),.ERR)
Q
SAVE(ENT,PAR,INST,VAL,ORERR) ;
I ($L(VAL)&(VAL'="`")) D
.;W !,ENT,?10,PAR,?45,INST,?55,VAL
.D EN^XPAR(ENT,PAR,INST,VAL,.ORERR) I ORERR D ONERR
Q
STUF(ENT,PAR,INST,VAL,ORERR) ; bypass input xform
D PUT^XPAR(ENT,PAR,INST,VAL,.ORERR) I ORERR D ONERR
Q
ONERR ; come here on error, expects ORERR,ENT,PAR,INST,VAL to be defined
N X
S X(1)="Error: "_PAR_" "_$$EZBLD^DIALOG(+ORERR)
S X(2)=" Entity:"_ENT_" Inst:"_INST_" Val:"_VAL
D MES^XPDUTL(.X)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORPFCNVT 3610 printed Dec 13, 2024@02:32:31 Page 2
ORPFCNVT ; SLC/AEB - Convert Order Parameter File (100.99) to Parameter Definitions(8989.51) ;3/17/97 12:17
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
+2 ;
+3 ; This program will move data from the Order Parameter File into the Parameter definitions
SYS1 NEW X,I,ENT,INST,ERR
SET X=$GET(^ORD(100.99,1,0))
+1 ;W !,"ENTITY",?10,"PARAMETER",?41,"INSTANCE",?55,"VALUE",!
+2 ;D SAVE("SYS","ORPF TREATING SPECIALTY",1,$P(X,U,3),.ERR)
+3 ;D SAVE("SYS","ORPF LAST PURGE DATE",1,$P(X,U,5),.ERR)
+4 ;non-editable
DO STUF("SYS","ORPF LAST PURGE DATE",1,$PIECE(X,U,5),.ERR)
+5 DO SAVE("SYS","ORPF LAST ORDER PURGED",1,"`"_$PIECE(X,U,6),.ERR)
+6 DO SAVE("SYS","ORPF ERROR DAYS",1,$PIECE(X,U,7),.ERR)
+7 ;D SAVE("SYS","ORPF SHOW PATIENT NAME",1,$P(X,U,11),.ERR)
+8 DO SAVE("SYS","ORPF ACTIVE ORDERS CONTEXT HRS",1,$PIECE(X,U,12),.ERR)
+9 DO SAVE("SYS","ORPF REVIEW ON PATIENT MVMT",1,$PIECE(X,U,13),.ERR)
+10 DO SAVE("SYS","ORPF INITIALS ON SUMMARY",1,$PIECE(X,U,14),.ERR)
+11 DO SAVE("SYS","ORPF DEFAULT PROVIDER",1,$PIECE(X,U,15),.ERR)
+12 DO SAVE("SYS","ORPF CONFIRM PROVIDER",1,$PIECE(X,U,17),.ERR)
+13 ;
SYS2 SET X=$GET(^ORD(100.99,1,2))
+1 ;D SAVE("SYS","ORPF ELECTRONIC SIGNATURE",1,$P(X,U,1),.ERR)
+2 DO SAVE("SYS","ORPF EXPAND CONTINUOUS ORDERS",1,$PIECE(X,U,5),.ERR)
+3 DO SAVE("SYS","ORPF CHART COPY FORMAT",1,"`"_$PIECE(X,U,6),.ERR)
+4 DO SAVE("SYS","ORPF CHART COPY HEADER",1,"`"_$PIECE(X,U,7),.ERR)
+5 DO SAVE("SYS","ORPF CHART COPY FOOTER",1,"`"_$PIECE(X,U,8),.ERR)
+6 DO SAVE("SYS","ORPF RESTRICT REQUESTOR",1,$PIECE(X,U,17),.ERR)
+7 DO SAVE("SYS","ORPF AUTO UNFLAG",1,$PIECE(X,U,18),.ERR)
+8 ;
MPKG5 SET I=0
FOR
SET I=$ORDER(^ORD(100.99,1,5,I))
if I'>0
QUIT
Begin DoDot:1
+1 SET ENT="PKG.`"_I
+2 ;S X=$G(^ORD(100.99,1,5,I,4)) D SAVE(ENT,"ORPF CLEAN-UP ACTION",1,$P(X,U,1),.ERR)
+3 ;S X=$G(^ORD(100.99,1,5,I,15)) D SAVE(ENT,"ORPF PATIENT SELECT ACTION",1,$P(X,U,1),.ERR)
End DoDot:1
+4 ;
MSYS20 SET I=0
FOR
SET I=$ORDER(^ORD(100.99,1,20,I))
if I'>0
QUIT
Begin DoDot:1
+1 SET X=^ORD(100.99,1,20,I,0)
SET INST="`"_I
+2 DO SAVE("SYS","ORPF WARD LABEL FORMAT",INST,"`"_$PIECE(X,U,3),.ERR)
+3 DO SAVE("SYS","ORPF WARD REQUISITION FORMAT",INST,"`"_$PIECE(X,U,4),.ERR)
+4 DO SAVE("SYS","ORPF SERVICE COPY DEFLT DEVICE",INST,"`"_$PIECE(X,U,5),.ERR)
+5 DO SAVE("SYS","ORPF SERVICE COPY HEADER",INST,"`"_$PIECE(X,U,7),.ERR)
+6 DO SAVE("SYS","ORPF SERVICE COPY FORMAT",INST,"`"_$PIECE(X,U,6),.ERR)
+7 DO SAVE("SYS","ORPF SERVICE COPY FOOTER",INST,"`"_$PIECE(X,U,8),.ERR)
+8 SET J=0
FOR
SET J=$ORDER(^ORD(100.99,1,20,I,1,J))
if J'>0
QUIT
Begin DoDot:2
+9 SET X=^ORD(100.99,1,20,I,1,J,0)
SET ENT="LOC.`"_$PIECE(X,U,1)
+10 DO SAVE(ENT,"ORPF SERVICE COPY DEFLT DEVICE",INST,"`"_$PIECE(X,U,2),.ERR)
End DoDot:2
End DoDot:1
+11 ;
MLOC25 SET I=0
FOR
SET I=$ORDER(^ORD(100.99,1,25,I))
if I'>0
QUIT
Begin DoDot:1
+1 SET X=^ORD(100.99,1,25,I,0)
SET ENT="LOC.`"_I
+2 DO SAVE(ENT,"ORPF PROMPT FOR CHART COPY",1,$PIECE(X,U,3),.ERR)
+3 DO SAVE(ENT,"ORPF CHART COPY PRINT DEVICE",1,"`"_$PIECE(X,U,4),.ERR)
+4 DO SAVE(ENT,"ORPF LABEL PRINT DEVICE",1,"`"_$PIECE(X,U,5),.ERR)
+5 DO SAVE(ENT,"ORPF REQUISITION PRINT DEVICE",1,"`"_$PIECE(X,U,6),.ERR)
+6 DO SAVE(ENT,"ORPF PROMPT FOR LABELS",1,$PIECE(X,U,7),.ERR)
+7 DO SAVE(ENT,"ORPF PROMPT FOR REQUISITIONS",1,$PIECE(X,U,8),.ERR)
+8 DO SAVE(ENT,"ORPF PRINT DAILY ORDER SUMMARY",1,$PIECE(X,U,9),.ERR)
+9 DO SAVE(ENT,"ORPF DAILY ORDER SUMMARY DEVC",1,"`"_$PIECE(X,U,10),.ERR)
+10 DO SAVE(ENT,"ORPF PRINT CHART COPY SUMMARY",1,$PIECE(X,U,11),.ERR)
End DoDot:1
+11 QUIT
SAVE(ENT,PAR,INST,VAL,ORERR) ;
+1 IF ($LENGTH(VAL)&(VAL'="`"))
Begin DoDot:1
+2 ;W !,ENT,?10,PAR,?45,INST,?55,VAL
+3 DO EN^XPAR(ENT,PAR,INST,VAL,.ORERR)
IF ORERR
DO ONERR
End DoDot:1
+4 QUIT
STUF(ENT,PAR,INST,VAL,ORERR) ; bypass input xform
+1 DO PUT^XPAR(ENT,PAR,INST,VAL,.ORERR)
IF ORERR
DO ONERR
+2 QUIT
ONERR ; come here on error, expects ORERR,ENT,PAR,INST,VAL to be defined
+1 NEW X
+2 SET X(1)="Error: "_PAR_" "_$$EZBLD^DIALOG(+ORERR)
+3 SET X(2)=" Entity:"_ENT_" Inst:"_INST_" Val:"_VAL
+4 DO MES^XPDUTL(.X)
+5 QUIT