SR47UTL ;BIR/ADM-PRE & POST INIT FOR SR*3*47 ; [ 03/05/96 2:00 PM ]
;;3.0; Surgery ;**47**;24 Jun 93
Q
PRE ; preinit action for SR*3*47
S ^SRO(136.5,7,1,0)="^^7^7^2951120^^",^SRO(136.5,7,1,5,0)="extubation after general anesthesia. This may be diagnosed as congestive"
S ^SRO(136.5,7,1,6,0)="heart failure, pulmonary edema and/or Adult Respiratory Distress Syndrome",^SRO(136.5,7,1,7,0)="(ARDS)."
S ^SRO(136.5,15,1,3,0)="(including autologous) given up to 72 hours after the patient leaves the",^SRO(136.5,15,1,4,0)="operating room."
S $P(^SRO(136.5,11,0),"^",2)=1 F I=7,16,17,21 S $P(^SRO(136.5,I,0),"^",3)=1
I $D(^DD(130,0,"ID","WRITE")) K ^DD(130,0,"ID","WRITE")
I $D(^DD(130,0,"ID",1)) K ^DD(130,0,"ID",1)
Q
POST ; postinit action for SR*3*47
; update completed assessments with PIMS info
S DFN=0 F S DFN=$O(^SRF("ARS","N","C",DFN)) Q:'DFN S SRTN=0 F S SRTN=$O(^SRF("ARS","N","C",DFN,SRTN)) Q:'SRTN D
.I $P($G(^SRF(SRTN,"RA")),"^",6)'="Y" Q
.S SR=$G(^SRF(SRTN,208)) S NOGO="" F I=10,14,15,16,17 S X=$P(SR,"^",I) I X'="" S NOGO=1 Q
.I 'NOGO D ^SROAPIMS
TSK ; task install notification message
X ^%ZOSF("UCI") I Y'=^%ZOSF("PROD") G END
S SRD=^XMB("NETNAME") I $E(SRD,1,3)="ISC"!(SRD["ISC-")!(SRD["ISC.")!(SRD["FORUM") G END
QMSG ; queue install message to national database
D NOW^%DTC S ZTDTH=$E(%,1,12),ZTRTN="MSG^SR47UTL",ZTDESC="Patch SR*3*47 Install Message",ZTIO="" D ^%ZTLOAD
END K DFN,NOGO,SR,SRD,SRDA,SRMSG,SRTN,SRX,SRY,SRZ,XMSUB,XMY,XMDUZ,XMTEXT
Q
MSG ; send mail message to national database
H 15 S SRD=^XMB("NETNAME"),X=0 F S X=$O(^XPD(9.7,"B","SR*3.0*47",X)) Q:'X S SRDA=X
G:'$G(SRDA) END S Z=$G(^XPD(9.7,SRDA,1)),SRZ=$P(Z,"^"),SRY=$P(Z,"^",3),SRZ=$$FMTE^XLFDT(SRZ),SRY=$$FMTE^XLFDT(SRY)
K SRMSG S SRMSG(1)="Patch SR*3*47 has been installed at "_SRD_"."
S SRMSG(2)="Start time: "_SRZ,SRMSG(3)="End time: "_SRY
S XMSUB="SR*3*47 Installed",XMDUZ=DUZ
S XMY("G.SRCOSERV@ISC-CHICAGO.DOMAIN.EXT")=""
S XMTEXT="SRMSG(" D ^XMD S ZTREQ="@"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSR47UTL 2014 printed Dec 13, 2024@02:38:42 Page 2
SR47UTL ;BIR/ADM-PRE & POST INIT FOR SR*3*47 ; [ 03/05/96 2:00 PM ]
+1 ;;3.0; Surgery ;**47**;24 Jun 93
+2 QUIT
PRE ; preinit action for SR*3*47
+1 SET ^SRO(136.5,7,1,0)="^^7^7^2951120^^"
SET ^SRO(136.5,7,1,5,0)="extubation after general anesthesia. This may be diagnosed as congestive"
+2 SET ^SRO(136.5,7,1,6,0)="heart failure, pulmonary edema and/or Adult Respiratory Distress Syndrome"
SET ^SRO(136.5,7,1,7,0)="(ARDS)."
+3 SET ^SRO(136.5,15,1,3,0)="(including autologous) given up to 72 hours after the patient leaves the"
SET ^SRO(136.5,15,1,4,0)="operating room."
+4 SET $PIECE(^SRO(136.5,11,0),"^",2)=1
FOR I=7,16,17,21
SET $PIECE(^SRO(136.5,I,0),"^",3)=1
+5 IF $DATA(^DD(130,0,"ID","WRITE"))
KILL ^DD(130,0,"ID","WRITE")
+6 IF $DATA(^DD(130,0,"ID",1))
KILL ^DD(130,0,"ID",1)
+7 QUIT
POST ; postinit action for SR*3*47
+1 ; update completed assessments with PIMS info
+2 SET DFN=0
FOR
SET DFN=$ORDER(^SRF("ARS","N","C",DFN))
if 'DFN
QUIT
SET SRTN=0
FOR
SET SRTN=$ORDER(^SRF("ARS","N","C",DFN,SRTN))
if 'SRTN
QUIT
Begin DoDot:1
+3 IF $PIECE($GET(^SRF(SRTN,"RA")),"^",6)'="Y"
QUIT
+4 SET SR=$GET(^SRF(SRTN,208))
SET NOGO=""
FOR I=10,14,15,16,17
SET X=$PIECE(SR,"^",I)
IF X'=""
SET NOGO=1
QUIT
+5 IF 'NOGO
DO ^SROAPIMS
End DoDot:1
TSK ; task install notification message
+1 XECUTE ^%ZOSF("UCI")
IF Y'=^%ZOSF("PROD")
GOTO END
+2 SET SRD=^XMB("NETNAME")
IF $EXTRACT(SRD,1,3)="ISC"!(SRD["ISC-")!(SRD["ISC.")!(SRD["FORUM")
GOTO END
QMSG ; queue install message to national database
+1 DO NOW^%DTC
SET ZTDTH=$EXTRACT(%,1,12)
SET ZTRTN="MSG^SR47UTL"
SET ZTDESC="Patch SR*3*47 Install Message"
SET ZTIO=""
DO ^%ZTLOAD
END KILL DFN,NOGO,SR,SRD,SRDA,SRMSG,SRTN,SRX,SRY,SRZ,XMSUB,XMY,XMDUZ,XMTEXT
+1 QUIT
MSG ; send mail message to national database
+1 HANG 15
SET SRD=^XMB("NETNAME")
SET X=0
FOR
SET X=$ORDER(^XPD(9.7,"B","SR*3.0*47",X))
if 'X
QUIT
SET SRDA=X
+2 if '$GET(SRDA)
GOTO END
SET Z=$GET(^XPD(9.7,SRDA,1))
SET SRZ=$PIECE(Z,"^")
SET SRY=$PIECE(Z,"^",3)
SET SRZ=$$FMTE^XLFDT(SRZ)
SET SRY=$$FMTE^XLFDT(SRY)
+3 KILL SRMSG
SET SRMSG(1)="Patch SR*3*47 has been installed at "_SRD_"."
+4 SET SRMSG(2)="Start time: "_SRZ
SET SRMSG(3)="End time: "_SRY
+5 SET XMSUB="SR*3*47 Installed"
SET XMDUZ=DUZ
+6 SET XMY("G.SRCOSERV@ISC-CHICAGO.DOMAIN.EXT")=""
+7 SET XMTEXT="SRMSG("
DO ^XMD
SET ZTREQ="@"
+8 QUIT