PSJ007 ;BIR/RSB-UTILITY ROUTINE FOR PATCH PSJ*5*7 ; 16 Jun 98 / 12:28 PM
;;5.0; INPATIENT MEDICATIONS ;**7**; 16 DEC 97
;
Q
EN ; QUEUE UP 53.1 CLEANUP
S ZTIO="",ZTDTH=$$CON(XPDQUES("POS ONE"))
S ZTDESC="Inpatient Medications Patch PSJ*5*7 Unit Dose Non-Verified Orders File Cleanup"
S ZTRTN="START^PSJ007" D ^%ZTLOAD
I $D(ZTSK) D MES^XPDUTL(" ") D MES^XPDUTL("Task #"_ZTSK_" is queued to run"_$S($D(PSJCONV):" NOW",1:" at "_XPDQUES("POS ONE")))
TEST ; Test text creation.
N PM S PM="This task will find and delete entries the NON-VERIFIED/PENDING ORDERS" D MES^XPDUTL(PM)
S PM="file (#53.1) that have no zero node." D MES^XPDUTL(PM)
Q
START ;
N PSJ
F PSJ=0:0 S PSJ=$O(^PS(53.1,PSJ)) Q:'PSJ K:'$D(^PS(53.1,PSJ,0)) ^PS(53.1,PSJ)
S ZTREQ="@"
Q
;
GETDT ; check date/time for job to run
N %DT,Y S %DT="NRS"
D ^%DT I Y=-1 K X
E S X=Y
Q
CON(X) ;
N %DT S %DT="NRS" D ^%DT
Q Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSJ007 923 printed Nov 22, 2024@17:15:33 Page 2
PSJ007 ;BIR/RSB-UTILITY ROUTINE FOR PATCH PSJ*5*7 ; 16 Jun 98 / 12:28 PM
+1 ;;5.0; INPATIENT MEDICATIONS ;**7**; 16 DEC 97
+2 ;
+3 QUIT
EN ; QUEUE UP 53.1 CLEANUP
+1 SET ZTIO=""
SET ZTDTH=$$CON(XPDQUES("POS ONE"))
+2 SET ZTDESC="Inpatient Medications Patch PSJ*5*7 Unit Dose Non-Verified Orders File Cleanup"
+3 SET ZTRTN="START^PSJ007"
DO ^%ZTLOAD
+4 IF $DATA(ZTSK)
DO MES^XPDUTL(" ")
DO MES^XPDUTL("Task #"_ZTSK_" is queued to run"_$SELECT($DATA(PSJCONV):" NOW",1:" at "_XPDQUES("POS ONE")))
TEST ; Test text creation.
+1 NEW PM
SET PM="This task will find and delete entries the NON-VERIFIED/PENDING ORDERS"
DO MES^XPDUTL(PM)
+2 SET PM="file (#53.1) that have no zero node."
DO MES^XPDUTL(PM)
+3 QUIT
START ;
+1 NEW PSJ
+2 FOR PSJ=0:0
SET PSJ=$ORDER(^PS(53.1,PSJ))
if 'PSJ
QUIT
if '$DATA(^PS(53.1,PSJ,0))
KILL ^PS(53.1,PSJ)
+3 SET ZTREQ="@"
+4 QUIT
+5 ;
GETDT ; check date/time for job to run
+1 NEW %DT,Y
SET %DT="NRS"
+2 DO ^%DT
IF Y=-1
KILL X
+3 IF '$TEST
SET X=Y
+4 QUIT
CON(X) ;
+1 NEW %DT
SET %DT="NRS"
DO ^%DT
+2 QUIT Y