ORY72 ; SLC/MKB - Postinit for patch OR*3*72 ;11/24/99 16:01
;;3.0;ORDER ENTRY/RESULTS REPORTING;**72**;Dec 17, 1997
;
EN ; -- task job to mark pre-CPRS orders as verified
;
N ORDT,ORVER,ZTRTN,ZTIO,ZTDTH,ZTDESC,ZTSK,ZTSAVE
W !!," * * * * Auto-Verify Orders Entered Prior to Installation of CPRS * * * *"
S ORDT=$$INSTALLD Q:ORDT="^" S ZTSAVE("ORDT")=""
S ORVER=$$TYPES Q:ORVER="^" S ZTSAVE("ORVER")=""
D SHOW W !!,"If this is ok, please queue this job or enter ^ to quit.",!
S ZTRTN="TASK^ORY72",ZTIO="",ZTDESC="Auto-verify pre-CPRS orders"
D ^%ZTLOAD W !,"Task "_$S($G(ZTSK):"#"_ZTSK,1:"not")_" started."
Q
;
INSTALLD() ; -- Returns date/time of CPRS install
;
N X,Y,DIR,ORXPD
S DIR(0)="DA^:NOW:ETX",DIR("A")="DATE/TIME of INSTALL: "
S DIR("?")="Enter the date/time when CPRS was installed, prior to which orders should be marked as 'verified'.",DIR("??")="^D HELP^%DTC"
S ORXPD=+$O(^XPD(9.7,"B","ORDER ENTRY/RESULTS REPORTING 3.0",0))
S ORXPD=+$G(^XPD(9.7,ORXPD,1)) S:ORXPD DIR("B")=$$FMTE^XLFDT(ORXPD)
W !!!,"Please "_$S($G(ORXPD):"confirm",1:"enter")_" when CPRS was installed; this will also be used as the",!,"Date/Time Verified for all previously entered orders.",!
D ^DIR S:$D(DUOUT)!$D(DTOUT)!(Y'>0) Y="^"
Q Y
;
TYPES() ; -- Returns the kinds of verification to mark
;
N X,Y,DIR
S DIR(0)="FA^1:3^S X=$$UP^XLFSTR(X) N I F I=1:1:3 K:""NCR""'[$E(X,I) X Q:'$D(X)"
S DIR("A")="TYPE(S) of VERIFICATION: ",DIR("B")="NCR"
S DIR("?")="Enter any combination of the letters N or C or R, to select Nurse or Clerk or Chart Review verification; to select Nurse and Clerk verification only, for example, enter NC."
W !!!,"Please select the kind(s) of verification to be done by entering any",!,"combination of (N)urse, (C)lerk, and/or Chart (R)eview.",!
D ^DIR S:$D(DUOUT)!$D(DTOUT) Y="^"
Q Y
;
SHOW ; -- Display selected values
N ORV,I,X W !!,$$REPEAT^XLFSTR("-",79)
W !,"Date for Auto-Verification: "_$$FMTE^XLFDT(ORDT)
S ORV="" F I=1:1:$L(ORVER) S X=$E(ORVER,I),ORV=ORV_$S($L(ORV):", ",1:"")_$S(X="N":"Nurse",X="C":"Clerk",X="R":"Chart Review",1:"")
W !,"Types of Auto-Verification: "_ORV
W !,$$REPEAT^XLFSTR("-",79)
Q
;
TASK ; -- job to verify pre-CPRS orders
;
N ORIDX,ORLOG,ORIFN,ORACT,OR0 Q:'$G(ORDT) Q:'$L($G(ORVER))
S ORIDX="^OR(100,""AF"")" ;S ZTREQ="@" ??
F S ORIDX=$Q(@ORIDX) Q:ORIDX'?1"^OR(100,""AF"",".E Q:$P(ORIDX,",",3)>ORDT D
. S ORLOG=+$P(ORIDX,",",3),ORIFN=+$P(ORIDX,",",4),ORACT=+$P(ORIDX,",",5)
. S OR0=$G(^OR(100,ORIFN,8,ORACT,0)) Q:'$L(OR0)
. I ORVER["N",'$P(OR0,U,9) S $P(OR0,U,9)=ORDT
. I ORVER["C",'$P(OR0,U,11) S $P(OR0,U,11)=ORDT
. I ORVER["R",'$P(OR0,U,19) S $P(OR0,U,19)=ORDT
. S ^OR(100,ORIFN,8,ORACT,0)=OR0
Q
;
POST ; -- postinit for patch OR*3*72
D EN^XPAR("PKG","OR UNSIGNED ORDERS ON EXIT",1,1)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY72 2847 printed Oct 16, 2024@18:43:31 Page 2
ORY72 ; SLC/MKB - Postinit for patch OR*3*72 ;11/24/99 16:01
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**72**;Dec 17, 1997
+2 ;
EN ; -- task job to mark pre-CPRS orders as verified
+1 ;
+2 NEW ORDT,ORVER,ZTRTN,ZTIO,ZTDTH,ZTDESC,ZTSK,ZTSAVE
+3 WRITE !!," * * * * Auto-Verify Orders Entered Prior to Installation of CPRS * * * *"
+4 SET ORDT=$$INSTALLD
if ORDT="^"
QUIT
SET ZTSAVE("ORDT")=""
+5 SET ORVER=$$TYPES
if ORVER="^"
QUIT
SET ZTSAVE("ORVER")=""
+6 DO SHOW
WRITE !!,"If this is ok, please queue this job or enter ^ to quit.",!
+7 SET ZTRTN="TASK^ORY72"
SET ZTIO=""
SET ZTDESC="Auto-verify pre-CPRS orders"
+8 DO ^%ZTLOAD
WRITE !,"Task "_$SELECT($GET(ZTSK):"#"_ZTSK,1:"not")_" started."
+9 QUIT
+10 ;
INSTALLD() ; -- Returns date/time of CPRS install
+1 ;
+2 NEW X,Y,DIR,ORXPD
+3 SET DIR(0)="DA^:NOW:ETX"
SET DIR("A")="DATE/TIME of INSTALL: "
+4 SET DIR("?")="Enter the date/time when CPRS was installed, prior to which orders should be marked as 'verified'."
SET DIR("??")="^D HELP^%DTC"
+5 SET ORXPD=+$ORDER(^XPD(9.7,"B","ORDER ENTRY/RESULTS REPORTING 3.0",0))
+6 SET ORXPD=+$GET(^XPD(9.7,ORXPD,1))
if ORXPD
SET DIR("B")=$$FMTE^XLFDT(ORXPD)
+7 WRITE !!!,"Please "_$SELECT($GET(ORXPD):"confirm",1:"enter")_" when CPRS was installed; this will also be used as the",!,"Date/Time Verified for all previously entered orders.",!
+8 DO ^DIR
if $DATA(DUOUT)!$DATA(DTOUT)!(Y'>0)
SET Y="^"
+9 QUIT Y
+10 ;
TYPES() ; -- Returns the kinds of verification to mark
+1 ;
+2 NEW X,Y,DIR
+3 SET DIR(0)="FA^1:3^S X=$$UP^XLFSTR(X) N I F I=1:1:3 K:""NCR""'[$E(X,I) X Q:'$D(X)"
+4 SET DIR("A")="TYPE(S) of VERIFICATION: "
SET DIR("B")="NCR"
+5 SET DIR("?")="Enter any combination of the letters N or C or R, to select Nurse or Clerk or Chart Review verification; to select Nurse and Clerk verification only, for example, enter NC."
+6 WRITE !!!,"Please select the kind(s) of verification to be done by entering any",!,"combination of (N)urse, (C)lerk, and/or Chart (R)eview.",!
+7 DO ^DIR
if $DATA(DUOUT)!$DATA(DTOUT)
SET Y="^"
+8 QUIT Y
+9 ;
SHOW ; -- Display selected values
+1 NEW ORV,I,X
WRITE !!,$$REPEAT^XLFSTR("-",79)
+2 WRITE !,"Date for Auto-Verification: "_$$FMTE^XLFDT(ORDT)
+3 SET ORV=""
FOR I=1:1:$LENGTH(ORVER)
SET X=$EXTRACT(ORVER,I)
SET ORV=ORV_$SELECT($LENGTH(ORV):", ",1:"")_$SELECT(X="N":"Nurse",X="C":"Clerk",X="R":"Chart Review",1:"")
+4 WRITE !,"Types of Auto-Verification: "_ORV
+5 WRITE !,$$REPEAT^XLFSTR("-",79)
+6 QUIT
+7 ;
TASK ; -- job to verify pre-CPRS orders
+1 ;
+2 NEW ORIDX,ORLOG,ORIFN,ORACT,OR0
if '$GET(ORDT)
QUIT
if '$LENGTH($GET(ORVER))
QUIT
+3 ;S ZTREQ="@" ??
SET ORIDX="^OR(100,""AF"")"
+4 FOR
SET ORIDX=$QUERY(@ORIDX)
if ORIDX'?1"^OR(100,""AF"",".E
QUIT
if $PIECE(ORIDX,",",3)>ORDT
QUIT
Begin DoDot:1
+5 SET ORLOG=+$PIECE(ORIDX,",",3)
SET ORIFN=+$PIECE(ORIDX,",",4)
SET ORACT=+$PIECE(ORIDX,",",5)
+6 SET OR0=$GET(^OR(100,ORIFN,8,ORACT,0))
if '$LENGTH(OR0)
QUIT
+7 IF ORVER["N"
IF '$PIECE(OR0,U,9)
SET $PIECE(OR0,U,9)=ORDT
+8 IF ORVER["C"
IF '$PIECE(OR0,U,11)
SET $PIECE(OR0,U,11)=ORDT
+9 IF ORVER["R"
IF '$PIECE(OR0,U,19)
SET $PIECE(OR0,U,19)=ORDT
+10 SET ^OR(100,ORIFN,8,ORACT,0)=OR0
End DoDot:1
+11 QUIT
+12 ;
POST ; -- postinit for patch OR*3*72
+1 DO EN^XPAR("PKG","OR UNSIGNED ORDERS ON EXIT",1,1)
+2 QUIT