PSJ311PO ;BIR/LE-Post Install routine for patch PSJ*5*311 ;06/12/14
;;5.0;INPATIENT MEDICATIONS ;**311**;9/30/97;Build 5
;
QUE ;
N NAMSP,PATCH,JOBN,ZTSK,ZTRTN,ZTIO,ZTDTH,ZTDESC,Y,ZTQUEUED,ZTREQ,ZTSAVE,CNT,SBJM
S NAMSP="PSJ311PO"
S JOBN="PSJ*5*311 Post Install"
S PATCH="PSJ*5*311"
S Y=$$NOW^XLFDT S ZTDTH=$$FMTH^XLFDT(Y)
;
D BMES^XPDUTL("=============================================================")
D MES^XPDUTL("Queuing background job for "_JOBN_"...")
D MES^XPDUTL("Start time: "_$$HTE^XLFDT(ZTDTH))
D MES^XPDUTL("A MailMan message will be sent to the installer upon Post")
D MES^XPDUTL("Install Completion. This may take 2-3 hours.")
D MES^XPDUTL("==============================================================")
;
S ZTRTN="EN^"_NAMSP,ZTIO=""
S (SBJM,ZTDESC)="Background job for "_JOBN
S ZTSAVE("JOBN")="",ZTSAVE("ZTDTH")="",ZTSAVE("DUZ")="",ZTSAVE("SBJM")=""
D ^%ZTLOAD
D:$D(ZTSK)
. D MES^XPDUTL("*** Task #"_ZTSK_" Queued! ***")
. D BMES^XPDUTL("")
. S ZTSAVE("ZTSK")=""
D BMES^XPDUTL("")
K XPDQUES
Q
;
EN ;Do Mail Message
N DFN,DA,STARTH,STOPH,SUBJ
S STARTH=$$HTE^XLFDT(ZTDTH)
K DIK S DIK="^PS(53.1,",DIK(1)="113^CIMO" D ENALL^DIK
K DIK S DFN=0 F S DFN=$O(^PS(55,DFN)) Q:'DFN S DA(1)=DFN D
.S DIK="^PS(55,"_DA(1)_",5,",DIK(1)="130^CIMOU" D ENALL^DIK
.S DIK="^PS(55,"_DA(1)_",5,",DIK(1)="130^CIMOCLU" D ENALL^DIK
.S DIK="^PS(55,"_DA(1)_","_"""IV"""_",",DIK(1)="136^CIMOI" D ENALL^DIK
.S DIK="^PS(55,"_DA(1)_","_"""IV"""_",",DIK(1)="136^CIMOCLI" D ENALL^DIK
K DIK
;
;Send message
S CNT=1
S Y=$$NOW^XLFDT S STOPH=$$FMTH^XLFDT(Y),STOPH=$$HTE^XLFDT(STOPH)
S SUBJ="PSJ*5*311 POST INSTALL Complete"
S MSG(CNT)="The new cross references for clinic orders have been created:",CNT=CNT+1
S MSG(CNT)=" File 53.1 - CIMO",CNT=CNT+1
S MSG(CNT)=" File 55 - CIMOU and CIMOCLU for Unit Dose Sub-file.",CNT=CNT+1
S MSG(CNT)=" File 55 - CIMOI AND CIMOCLI for IV Sub-file.",CNT=CNT+1
S MSG(CNT)=" ",CNT=CNT+1
S MSG(CNT)="The background job "_ZTSK_" began "_STARTH_" and ",CNT=CNT+1
S MSG(CNT)="ended "_STOPH_".",CNT=CNT+1
D MAIL(.MSG,SUBJ)
Q
;
MAIL(MSG,SBJ) ; Send out some mail!
N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY,I
S XMDUZ="INPT PHARMACY",XMSUB=SBJM,XMTEXT="MSG("
S XMY(DUZ)=""
D ^XMD
Q ""
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSJ311PO 2316 printed Dec 13, 2024@02:05:49 Page 2
PSJ311PO ;BIR/LE-Post Install routine for patch PSJ*5*311 ;06/12/14
+1 ;;5.0;INPATIENT MEDICATIONS ;**311**;9/30/97;Build 5
+2 ;
QUE ;
+1 NEW NAMSP,PATCH,JOBN,ZTSK,ZTRTN,ZTIO,ZTDTH,ZTDESC,Y,ZTQUEUED,ZTREQ,ZTSAVE,CNT,SBJM
+2 SET NAMSP="PSJ311PO"
+3 SET JOBN="PSJ*5*311 Post Install"
+4 SET PATCH="PSJ*5*311"
+5 SET Y=$$NOW^XLFDT
SET ZTDTH=$$FMTH^XLFDT(Y)
+6 ;
+7 DO BMES^XPDUTL("=============================================================")
+8 DO MES^XPDUTL("Queuing background job for "_JOBN_"...")
+9 DO MES^XPDUTL("Start time: "_$$HTE^XLFDT(ZTDTH))
+10 DO MES^XPDUTL("A MailMan message will be sent to the installer upon Post")
+11 DO MES^XPDUTL("Install Completion. This may take 2-3 hours.")
+12 DO MES^XPDUTL("==============================================================")
+13 ;
+14 SET ZTRTN="EN^"_NAMSP
SET ZTIO=""
+15 SET (SBJM,ZTDESC)="Background job for "_JOBN
+16 SET ZTSAVE("JOBN")=""
SET ZTSAVE("ZTDTH")=""
SET ZTSAVE("DUZ")=""
SET ZTSAVE("SBJM")=""
+17 DO ^%ZTLOAD
+18 if $DATA(ZTSK)
Begin DoDot:1
+19 DO MES^XPDUTL("*** Task #"_ZTSK_" Queued! ***")
+20 DO BMES^XPDUTL("")
+21 SET ZTSAVE("ZTSK")=""
End DoDot:1
+22 DO BMES^XPDUTL("")
+23 KILL XPDQUES
+24 QUIT
+25 ;
EN ;Do Mail Message
+1 NEW DFN,DA,STARTH,STOPH,SUBJ
+2 SET STARTH=$$HTE^XLFDT(ZTDTH)
+3 KILL DIK
SET DIK="^PS(53.1,"
SET DIK(1)="113^CIMO"
DO ENALL^DIK
+4 KILL DIK
SET DFN=0
FOR
SET DFN=$ORDER(^PS(55,DFN))
if 'DFN
QUIT
SET DA(1)=DFN
Begin DoDot:1
+5 SET DIK="^PS(55,"_DA(1)_",5,"
SET DIK(1)="130^CIMOU"
DO ENALL^DIK
+6 SET DIK="^PS(55,"_DA(1)_",5,"
SET DIK(1)="130^CIMOCLU"
DO ENALL^DIK
+7 SET DIK="^PS(55,"_DA(1)_","_"""IV"""_","
SET DIK(1)="136^CIMOI"
DO ENALL^DIK
+8 SET DIK="^PS(55,"_DA(1)_","_"""IV"""_","
SET DIK(1)="136^CIMOCLI"
DO ENALL^DIK
End DoDot:1
+9 KILL DIK
+10 ;
+11 ;Send message
+12 SET CNT=1
+13 SET Y=$$NOW^XLFDT
SET STOPH=$$FMTH^XLFDT(Y)
SET STOPH=$$HTE^XLFDT(STOPH)
+14 SET SUBJ="PSJ*5*311 POST INSTALL Complete"
+15 SET MSG(CNT)="The new cross references for clinic orders have been created:"
SET CNT=CNT+1
+16 SET MSG(CNT)=" File 53.1 - CIMO"
SET CNT=CNT+1
+17 SET MSG(CNT)=" File 55 - CIMOU and CIMOCLU for Unit Dose Sub-file."
SET CNT=CNT+1
+18 SET MSG(CNT)=" File 55 - CIMOI AND CIMOCLI for IV Sub-file."
SET CNT=CNT+1
+19 SET MSG(CNT)=" "
SET CNT=CNT+1
+20 SET MSG(CNT)="The background job "_ZTSK_" began "_STARTH_" and "
SET CNT=CNT+1
+21 SET MSG(CNT)="ended "_STOPH_"."
SET CNT=CNT+1
+22 DO MAIL(.MSG,SUBJ)
+23 QUIT
+24 ;
MAIL(MSG,SBJ) ; Send out some mail!
+1 NEW DIFROM,XMDUZ,XMSUB,XMTEXT,XMY,I
+2 SET XMDUZ="INPT PHARMACY"
SET XMSUB=SBJM
SET XMTEXT="MSG("
+3 SET XMY(DUZ)=""
+4 DO ^XMD
+5 QUIT ""
+6 ;