ORY116 ;SLC/MKB -- postinit rtn for OR*3*116 ;9/27/01 16:39 [11/27/01 1:28pm]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**116**;Dec 17, 1997
;
PRE ; -- preinit
Q
;
POST ; -- postinit
N NAME,DLG,VER
S VER=$P($T(VERSION^ORY116),";",3)
F NAME="PSJ OR PAT OE","PSO OERR","PSO SUPPLY","PS MEDS" S DLG=+$O(^ORD(101.41,"AB",NAME,0)) S:DLG ^ORD(101.41,DLG,7)="D SC^ORCDPS3" ;Set VALIDATION field for medication dialogs
D DLGS
D SURGRPT
D MAIL
Q
;
DLGS ; -- Look for local dialogs that will need to be updated
N PSJ,PSO,PSS,ORPKG,ORDLG,OR0,ORZ,CNT
S PSJ=+$O(^DIC(9.4,"C","PSJ",0)),PSO=+$O(^DIC(9.4,"C","PSO",0))
S PSS=+$O(^DIC(9.4,"C","PSS",0))
S ORZ(1)="The VALIDATION field has been populated for the medication dialogs"
S ORZ(2)="PSJ OR PAT OE, PSO OERR, PSO SUPPLY, and PS MEDS with this patch;"
S ORZ(3)="please review the following local copies of these dialogs:"
S CNT=3 F ORPKG=PSJ,PSO,PSS S ORDLG=0 D
. F S ORDLG=+$O(^ORD(101.41,"APKG",ORPKG,ORDLG)) Q:ORDLG'>0 D
.. S OR0=$G(^ORD(101.41,ORDLG,0)) Q:$P(OR0,U,4)'="D" ;ck dialogs only
.. I ORPKG=PSJ Q:$P(OR0,U)="PSJ OR PAT OE"
.. I ORPKG=PSO Q:$P(OR0,U)="PSO OERR" Q:$P(OR0,U)="PSO SUPPLY"
.. I ORPKG=PSS Q:$P(OR0,U)="PS MEDS"
.. S CNT=CNT+1,ORZ(CNT)=$J(ORDLG,7)_" "_$P(OR0,U)
DLG1 I $O(ORZ(3)) D ;send bulletin
. N XMDUZ,XMY,I,XMSUB,XMTEXT,DIFROM
. S XMDUZ="PATCH OR*3*116 INSTALLATION",XMY(.5)="" S:$G(DUZ) XMY(DUZ)=""
. ;I '$G(DUZ) S I=$G(^XTMP("OR94","DUZ")) S:I XMY(I)=""
. S XMSUB="PATCH OR*3*116 INSTALLATION COMPLETED"
. S XMTEXT="ORZ(" D ^XMD
. D BMES^XPDUTL("The order dialogs for medications have been modified in this patch;")
. D MES^XPDUTL("a bulletin has been sent to the installer listing local copies that")
. D MES^XPDUTL("may need to be reviewed and updated.")
Q
;
DLGSEND(NAME) ; -- Return true if the order dialog should be sent
I NAME="PS MEDS" Q 1
I NAME="PSJ OR PAT OE" Q 1
I NAME="PSO OERR" Q 1
I NAME="PSO SUPPLY" Q 1
Q 0
SURGRPT ; Should surgery report be available? (RV)
N ORP,ORT,ORS,ORLST,ORERR
S ORP="ORWRP REPORT LIST",ORT=$O(^ORD(101.24,"B","ORRP SURGERIES",0))
I $$PATCH^XPDUTL("SR*3.0*100"),(+ORT) D
. D GETLST^XPAR(.ORLST,"PKG","ORWRP REPORT LIST","Q",.ORERR)
. S ORS=+ORLST(ORLST)+5
. D PUT^XPAR("PKG",ORP,ORS,ORT)
Q
;
MAIL ; send bulletin of installation time
N COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
S COUNT=0
S XMSUB="Version "_$P($T(VERSION),";;",2)_" Installed"
S XMDUZ="CPRS PACKAGE"
F I="G.CPRS GUI INSTALL@DOMAIN.NAME",DUZ S XMY(I)=""
S XMTEXT="TEXT("
;
S X=$P($T(VERSION),";;",2)
D LINE("Version "_X_" has been installed.")
D LINE(" ")
D LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
;
D ^XMD
Q
;
LINE(DATA) ; set text into array
S COUNT=COUNT+1
S TEXT(COUNT)=DATA
Q
;
VERSION ;;17.7
ORY116 ;SLC/MKB -- postinit rtn for OR*3*116 ;9/27/01 16:39 [11/27/01 1:28pm]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**116**;Dec 17, 1997
+2 ;
PRE ; -- preinit
+1 QUIT
+2 ;
POST ; -- postinit
+1 NEW NAME,DLG,VER
+2 SET VER=$PIECE($TEXT(VERSION^ORY116),";",3)
+3 ;Set VALIDATION field for medication dialogs
FOR NAME="PSJ OR PAT OE","PSO OERR","PSO SUPPLY","PS MEDS"
SET DLG=+$ORDER(^ORD(101.41,"AB",NAME,0))
IF DLG
SET ^ORD(101.41,DLG,7)="D SC^ORCDPS3"
+4 DO DLGS
+5 DO SURGRPT
+6 DO MAIL
+7 QUIT
+8 ;
DLGS ; -- Look for local dialogs that will need to be updated
+1 NEW PSJ,PSO,PSS,ORPKG,ORDLG,OR0,ORZ,CNT
+2 SET PSJ=+$ORDER(^DIC(9.4,"C","PSJ",0))
SET PSO=+$ORDER(^DIC(9.4,"C","PSO",0))
+3 SET PSS=+$ORDER(^DIC(9.4,"C","PSS",0))
+4 SET ORZ(1)="The VALIDATION field has been populated for the medication dialogs"
+5 SET ORZ(2)="PSJ OR PAT OE, PSO OERR, PSO SUPPLY, and PS MEDS with this patch;"
+6 SET ORZ(3)="please review the following local copies of these dialogs:"
+7 SET CNT=3
FOR ORPKG=PSJ,PSO,PSS
SET ORDLG=0
Begin DoDot:1
+8 FOR
SET ORDLG=+$ORDER(^ORD(101.41,"APKG",ORPKG,ORDLG))
IF ORDLG'>0
QUIT
Begin DoDot:2
+9 ;ck dialogs only
SET OR0=$GET(^ORD(101.41,ORDLG,0))
IF $PIECE(OR0,U,4)'="D"
QUIT
+10 IF ORPKG=PSJ
IF $PIECE(OR0,U)="PSJ OR PAT OE"
QUIT
+11 IF ORPKG=PSO
IF $PIECE(OR0,U)="PSO OERR"
QUIT
IF $PIECE(OR0,U)="PSO SUPPLY"
QUIT
+12 IF ORPKG=PSS
IF $PIECE(OR0,U)="PS MEDS"
QUIT
+13 SET CNT=CNT+1
SET ORZ(CNT)=$JUSTIFY(ORDLG,7)_" "_$PIECE(OR0,U)
End DoDot:2
End DoDot:1
DLG1 ;send bulletin
IF $ORDER(ORZ(3))
Begin DoDot:1
+1 NEW XMDUZ,XMY,I,XMSUB,XMTEXT,DIFROM
+2 SET XMDUZ="PATCH OR*3*116 INSTALLATION"
SET XMY(.5)=""
IF $GET(DUZ)
SET XMY(DUZ)=""
+3 ;I '$G(DUZ) S I=$G(^XTMP("OR94","DUZ")) S:I XMY(I)=""
+4 SET XMSUB="PATCH OR*3*116 INSTALLATION COMPLETED"
+5 SET XMTEXT="ORZ("
DO ^XMD
+6 DO BMES^XPDUTL("The order dialogs for medications have been modified in this patch;")
+7 DO MES^XPDUTL("a bulletin has been sent to the installer listing local copies that")
+8 DO MES^XPDUTL("may need to be reviewed and updated.")
End DoDot:1
+9 QUIT
+10 ;
DLGSEND(NAME) ; -- Return true if the order dialog should be sent
+1 IF NAME="PS MEDS"
QUIT 1
+2 IF NAME="PSJ OR PAT OE"
QUIT 1
+3 IF NAME="PSO OERR"
QUIT 1
+4 IF NAME="PSO SUPPLY"
QUIT 1
+5 QUIT 0
SURGRPT ; Should surgery report be available? (RV)
+1 NEW ORP,ORT,ORS,ORLST,ORERR
+2 SET ORP="ORWRP REPORT LIST"
SET ORT=$ORDER(^ORD(101.24,"B","ORRP SURGERIES",0))
+3 IF $$PATCH^XPDUTL("SR*3.0*100")
IF (+ORT)
Begin DoDot:1
+4 DO GETLST^XPAR(.ORLST,"PKG","ORWRP REPORT LIST","Q",.ORERR)
+5 SET ORS=+ORLST(ORLST)+5
+6 DO PUT^XPAR("PKG",ORP,ORS,ORT)
End DoDot:1
+7 QUIT
+8 ;
MAIL ; send bulletin of installation time
+1 NEW COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
+2 SET COUNT=0
+3 SET XMSUB="Version "_$PIECE($TEXT(VERSION),";;",2)_" Installed"
+4 SET XMDUZ="CPRS PACKAGE"
+5 FOR I="G.CPRS GUI INSTALL@DOMAIN.NAME",DUZ
SET XMY(I)=""
+6 SET XMTEXT="TEXT("
+7 ;
+8 SET X=$PIECE($TEXT(VERSION),";;",2)
+9 DO LINE("Version "_X_" has been installed.")
+10 DO LINE(" ")
+11 DO LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
+12 ;
+13 DO ^XMD
+14 QUIT
+15 ;
LINE(DATA) ; set text into array
+1 SET COUNT=COUNT+1
+2 SET TEXT(COUNT)=DATA
+3 QUIT
+4 ;
VERSION ;;17.7