SR103UTL ;BIR/ADM-Utility routine for patch SR*3*103; [06/14/01 10:33 AM ]
;;3.0; Surgery ;**103**;24 Jun 93
Q
POST ; post-install action for SR*3*103
D NOW^%DTC S (SRNOW,ZTDTH)=+$E(%,1,12),ZTRTN="EN1^SR103UTL",ZTDESC="SR*3*103 Post-Install",ZTIO="" D ^%ZTLOAD H 2
D OTH,MES^XPDUTL(" Post-install process queued...") K SRNOW
Q
OTH N SRD S SRD=^XMB("NETNAME") I SRD["TST."!(SRD["TEST")!(SRD["UTL.")!(SRD["TRAIN")!(SRD[".IHS.GOV")!(SRD["CPRS") Q
S ZTDTH=SRNOW,ZTRTN="QR^SR103UTL",ZTDESC="Surgery Quarterly Report",ZTIO="" D ^%ZTLOAD
Q
EN1 ; remove trailing zeros in field 1.098
N SREQDT,SRTN S SRTN=0 F S SRTN=$O(^SRF(SRTN)) Q:'SRTN S SREQDT=$P($G(^SRF(SRTN,"1.0")),"^",11) I SREQDT'="" S $P(^SRF(SRTN,"1.0"),"^",11)=+SREQDT
S ZTREQ="@"
Q
QR ; transmit quarterly reports for FY2000
S (SRFLG,SRT)=1 D NOW^%DTC S SRNOW=+$E(%,1,12)
S SRSTART=3001001,SREND=3001231 D TSK H 2
S SRSTART=3010101,SREND=3010331 D TSK H 2
I DT>3010813 S SRSTART=3010401,SREND=3010630 D TSK H 2
I DT>3011113 S SRSTART=3010701,SREND=3010930 D TSK
S ZTREQ="@"
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[HSR103UTL 1236 printed Dec 13, 2024@02:37:58 Page 2
SR103UTL ;BIR/ADM-Utility routine for patch SR*3*103; [06/14/01 10:33 AM ]
+1 ;;3.0; Surgery ;**103**;24 Jun 93
+2 QUIT
POST ; post-install action for SR*3*103
+1 DO NOW^%DTC
SET (SRNOW,ZTDTH)=+$EXTRACT(%,1,12)
SET ZTRTN="EN1^SR103UTL"
SET ZTDESC="SR*3*103 Post-Install"
SET ZTIO=""
DO ^%ZTLOAD
HANG 2
+2 DO OTH
DO MES^XPDUTL(" Post-install process queued...")
KILL SRNOW
+3 QUIT
OTH NEW SRD
SET SRD=^XMB("NETNAME")
IF SRD["TST."!(SRD["TEST")!(SRD["UTL.")!(SRD["TRAIN")!(SRD[".IHS.GOV")!(SRD["CPRS")
QUIT
+1 SET ZTDTH=SRNOW
SET ZTRTN="QR^SR103UTL"
SET ZTDESC="Surgery Quarterly Report"
SET ZTIO=""
DO ^%ZTLOAD
+2 QUIT
EN1 ; remove trailing zeros in field 1.098
+1 NEW SREQDT,SRTN
SET SRTN=0
FOR
SET SRTN=$ORDER(^SRF(SRTN))
if 'SRTN
QUIT
SET SREQDT=$PIECE($GET(^SRF(SRTN,"1.0")),"^",11)
IF SREQDT'=""
SET $PIECE(^SRF(SRTN,"1.0"),"^",11)=+SREQDT
+2 SET ZTREQ="@"
+3 QUIT
QR ; transmit quarterly reports for FY2000
+1 SET (SRFLG,SRT)=1
DO NOW^%DTC
SET SRNOW=+$EXTRACT(%,1,12)
+2 SET SRSTART=3001001
SET SREND=3001231
DO TSK
HANG 2
+3 SET SRSTART=3010101
SET SREND=3010331
DO TSK
HANG 2
+4 IF DT>3010813
SET SRSTART=3010401
SET SREND=3010630
DO TSK
HANG 2
+5 IF DT>3011113
SET SRSTART=3010701
SET SREND=3010930
DO TSK
+6 SET ZTREQ="@"
+7 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