PSOCPIB4 ;BIR/EJW-Clean up to bill unbilled NON-SERVICE CONNECTED copays ;12/12/02
;;7.0;OUTPATIENT PHARMACY;**123**;DEC 1997
GETDATE ; GET DATE/TIME OF WHEN BACKGROUND JOB SHOULD BE RUN
S ZTDTH=""
I '$D(PSOQUES) S PSOQUES="Queue job to run at Date@Time: "
S NOW=0
D NOW^%DTC S (Y,TODAY)=% D DD^%DT
D BMES^XPDUTL("At the following prompt, enter a starting date@time")
D MES^XPDUTL("or enter NOW to queue the job immediately.")
D BMES^XPDUTL("If this prompting is during patch installation, you will not see what you type.")
W ! K %DT D NOW^%DTC S %DT="RAEX",%DT(0)=%,%DT("A")=PSOQUES
D ^%DT K %DT I $D(DTOUT)!(Y<0) W "Task will be queued to run NOW" S ZTDTH=$H,NOW=1
I 'NOW,Y>0 D
.S SAVEY=Y
.D DD^%DT
.S X=Y
.S Y=SAVEY
ASK D BMES^XPDUTL("Task will be queued to run "_$S(NOW:"NOW",1:X)_". Is that correct? :")
R XX:300 S:'$T XX="Y" I XX'="Y",XX'="y",XX'="N",XX'="n" W " Enter Y or N" G ASK
I XX'="Y",XX'="y" G GETDATE
I Y>0,ZTDTH="" S ZTDTH=Y
I ZTDTH="" S ZTDTH=$H
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSOCPIB4 1014 printed Dec 13, 2024@02:25:58 Page 2
PSOCPIB4 ;BIR/EJW-Clean up to bill unbilled NON-SERVICE CONNECTED copays ;12/12/02
+1 ;;7.0;OUTPATIENT PHARMACY;**123**;DEC 1997
GETDATE ; GET DATE/TIME OF WHEN BACKGROUND JOB SHOULD BE RUN
+1 SET ZTDTH=""
+2 IF '$DATA(PSOQUES)
SET PSOQUES="Queue job to run at Date@Time: "
+3 SET NOW=0
+4 DO NOW^%DTC
SET (Y,TODAY)=%
DO DD^%DT
+5 DO BMES^XPDUTL("At the following prompt, enter a starting date@time")
+6 DO MES^XPDUTL("or enter NOW to queue the job immediately.")
+7 DO BMES^XPDUTL("If this prompting is during patch installation, you will not see what you type.")
+8 WRITE !
KILL %DT
DO NOW^%DTC
SET %DT="RAEX"
SET %DT(0)=%
SET %DT("A")=PSOQUES
+9 DO ^%DT
KILL %DT
IF $DATA(DTOUT)!(Y<0)
WRITE "Task will be queued to run NOW"
SET ZTDTH=$HOROLOG
SET NOW=1
+10 IF 'NOW
IF Y>0
Begin DoDot:1
+11 SET SAVEY=Y
+12 DO DD^%DT
+13 SET X=Y
+14 SET Y=SAVEY
End DoDot:1
ASK DO BMES^XPDUTL("Task will be queued to run "_$SELECT(NOW:"NOW",1:X)_". Is that correct? :")
+1 READ XX:300
if '$TEST
SET XX="Y"
IF XX'="Y"
IF XX'="y"
IF XX'="N"
IF XX'="n"
WRITE " Enter Y or N"
GOTO ASK
+2 IF XX'="Y"
IF XX'="y"
GOTO GETDATE
+3 IF Y>0
IF ZTDTH=""
SET ZTDTH=Y
+4 IF ZTDTH=""
SET ZTDTH=$HOROLOG
+5 QUIT
+6 ;