SR50UTL ;BIR/ADM - Utility Routine for SR*3*50 ; [ 09/22/98 3:27 PM ]
;;3.0; Surgery ;**50**;24 Jun 93
ENV ;environmental check for SR*3*50 to confirm that SR*3*41 is installed
I '$$PATCH^XPDUTL("SR*3.0*41") D BMES^XPDUTL("Patch SR*3*41 must be installed before installing this patch!") S XPDQUIT=2
Q
POST ;post-install process for SR*3*50
;re-transmit Quarterly Reports for FY98
N SRD,SREND,SRFLG,SRNOW,SRSTART,SRT
S SRD=^XMB("NETNAME") I $E(SRD,1,3)="ISC"!(SRD["ISC-")!(SRD["ISC.")!(SRD["FORUM")!(SRD["TST.")!(SRD["TEST")!(SRD["UTL.")!(SRD["TRAIN")!(SRD["DEMO.") Q
S (SRFLG,SRT)=1 D NOW^%DTC S SRNOW=$E(%,1,12)
S SRSTART=2971001,SREND=2971231 D TSK ; first quarter
S SRSTART=2980101,SREND=2980331 D TSK ; second quarter
I DT>2980813 S SRSTART=2980401,SREND=2980630 D TSK ; third quarter
I DT>2981113 S SRSTART=2980701,SREND=2980930 D TSK ; fourth quarter
S ZTDTH=SRNOW,ZTIO="",ZTDESC="Lock All Eligible Surgery Cases",ZTRTN="ALL^SROLOCK" D ^%ZTLOAD
Q
TSK S ZTDTH=SRNOW,ZTIO="",ZTDESC="Surgery Quarterly Report",(ZTSAVE("SRSTART"),ZTSAVE("SREND"),ZTSAVE("SRFLG"),ZTSAVE("SRT"))="",ZTRTN="EN^SROQT" D ^%ZTLOAD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSR50UTL 1145 printed Nov 22, 2024@17:48:44 Page 2
SR50UTL ;BIR/ADM - Utility Routine for SR*3*50 ; [ 09/22/98 3:27 PM ]
+1 ;;3.0; Surgery ;**50**;24 Jun 93
ENV ;environmental check for SR*3*50 to confirm that SR*3*41 is installed
+1 IF '$$PATCH^XPDUTL("SR*3.0*41")
DO BMES^XPDUTL("Patch SR*3*41 must be installed before installing this patch!")
SET XPDQUIT=2
+2 QUIT
POST ;post-install process for SR*3*50
+1 ;re-transmit Quarterly Reports for FY98
+2 NEW SRD,SREND,SRFLG,SRNOW,SRSTART,SRT
+3 SET SRD=^XMB("NETNAME")
IF $EXTRACT(SRD,1,3)="ISC"!(SRD["ISC-")!(SRD["ISC.")!(SRD["FORUM")!(SRD["TST.")!(SRD["TEST")!(SRD["UTL.")!(SRD["TRAIN")!(SRD["DEMO.")
QUIT
+4 SET (SRFLG,SRT)=1
DO NOW^%DTC
SET SRNOW=$EXTRACT(%,1,12)
+5 ; first quarter
SET SRSTART=2971001
SET SREND=2971231
DO TSK
+6 ; second quarter
SET SRSTART=2980101
SET SREND=2980331
DO TSK
+7 ; third quarter
IF DT>2980813
SET SRSTART=2980401
SET SREND=2980630
DO TSK
+8 ; fourth quarter
IF DT>2981113
SET SRSTART=2980701
SET SREND=2980930
DO TSK
+9 SET ZTDTH=SRNOW
SET ZTIO=""
SET ZTDESC="Lock All Eligible Surgery Cases"
SET ZTRTN="ALL^SROLOCK"
DO ^%ZTLOAD
+10 QUIT
TSK SET ZTDTH=SRNOW
SET ZTIO=""
SET ZTDESC="Surgery Quarterly Report"
SET (ZTSAVE("SRSTART"),ZTSAVE("SREND"),ZTSAVE("SRFLG"),ZTSAVE("SRT"))=""
SET ZTRTN="EN^SROQT"
DO ^%ZTLOAD
+1 QUIT