SROCMP ;BIR/MAM - PERIOPERATIVE OCCURRENCES ;05/15/06
;;3.0;Surgery;**22,26,29,38,50,143,153,175**;24 Jun 93;Build 6
BEG U IO S SRSOUT=0,PAGE=1 K ^TMP("SR",$J) S Y=DT X ^DD("DD") S SRPRINT="DATE PRINTED: "_Y,SRSDT=SRSD-.0001,SREDT=SRED+.9999
N SRFRTO S Y=SRSD X ^DD("DD") S SRFRTO="FROM: "_Y_" TO: ",Y=SRED X ^DD("DD") S SRFRTO=SRFRTO_Y
F S SRSDT=$O(^SRF("AC",SRSDT)) Q:SRSDT>SREDT!('SRSDT)!(SRSOUT) S SRTN=0 F S SRTN=$O(^SRF("AC",SRSDT,SRTN)) Q:'SRTN!(SRSOUT) D
.I $O(^SRF(SRTN,10,0))!$O(^SRF(SRTN,16,0)),(SRBOTH1="B"),$D(^SRF(SRTN,0)),$$MANDIV^SROUTL0(SRINSTP,SRTN) D UTIL Q
.I $O(^SRF(SRTN,10,0)),(SRBOTH1="I"),$D(^SRF(SRTN,0)),$$MANDIV^SROUTL0(SRINSTP,SRTN) D UTIL Q
.I $O(^SRF(SRTN,16,0)),(SRBOTH1="P"),$D(^SRF(SRTN,0)),$$MANDIV^SROUTL0(SRINSTP,SRTN) D UTIL
S (SRSS,SRHDR)=0 F S SRSS=$O(^TMP("SR",$J,SRSS)) Q:SRSS=""!(SRSOUT) D HDR^SROCMP2 S SRSDATE=0 F S SRSDATE=$O(^TMP("SR",$J,SRSS,SRSDATE)) Q:'SRSDATE!(SRSOUT) D MORE
G:SRSOUT END
I '$D(^TMP("SR",$J)) D HDR^SROCMP2 G:SRSOUT END W !!,"There are no "_$S(SRBOTH1="I":"intraoperative",SRBOTH1="P":"postoperative",SRBOTH1="B":"perioperative",1:"")_" occurrences recorded for the selected date range."
F I=$Y:1:IOSL-9 W !
S X="" D FOOT^SROCMP2
I SRBOTH S SRSOUT=0 D BEG^SROMORT S SRSOUT=1
END W:$E(IOST)="P" @IOF I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
D ^%ZISC,^SRSKILL K SRTN W @IOF
Q
MORE S SRTN=0 F S SRTN=$O(^TMP("SR",$J,SRSS,SRSDATE,SRTN)) Q:'SRTN D SET
Q
ATT N SRDIV,SRY S SRY=$P($G(^SRF(SRTN,.1)),"^",13) I SRY D
.S Y=SRY,C=$P(^DD(130,.164,0),"^",2) D Y^DIQ S SRSS=Y
I SRY="" S SRDIV=$$SITE^SROUTL0(SRTN) I SRDIV,'$P(^SRO(133,SRDIV,0),"^",19) D
.S SRY=$P($G(^SRF(SRTN,.1)),"^",4) I SRY D
..S Y=SRY,C=$P(^DD(130,.14,0),"^",2) D Y^DIQ S SRSS=Y
S:'SRY SRY="ZZ" I SRSP,'$D(SRSP(SRY)) Q
S:'SRY SRSS="ATTENDING SURGEON NOT ENTERED"
S ^TMP("SR",$J,SRSS,SRSDT,SRTN)=""
Q
UTIL ; set ^TMP
I SRSEL=1 D Q
.S Y=$P(^SRF(SRTN,0),"^",4) S:'Y Y="ZZ" I SRSP,'$D(SRSP(Y)) Q
.S SRSS=$S(Y:$P(^SRO(137.45,Y,0),"^"),1:"SURGICAL SPECIALTY NOT ENTERED")
.S ^TMP("SR",$J,SRSS,SRSDT,SRTN)=""
I SRSEL=2 D ATT Q
I SRSEL=3 S SRJ=$S(SRBOTH1="I":10,SRBOTH1="P":16,1:"10,16") F SRI=1:1:$L(SRJ,",") S SROCC=0 F S SROCC=$O(^SRF(SRTN,$P(SRJ,",",SRI),SROCC)) Q:'SROCC S Y=$P(^SRF(SRTN,$P(SRJ,",",SRI),SROCC,0),"^",2) D:Y
.I SRSP,'$D(SRSP(Y)) Q
.S SRSS=$S(Y:$P(^SRO(136.5,Y,0),"^"),1:"OCCURRENCE CATEGORY NOT ENTERED")
.S ^TMP("SR",$J,SRSS,SRSDT,SRTN)=""
Q
SET ; set variables to print
K SRC S DFN=$P(^SRF(SRTN,0),"^") D DEM^VADPT S SRNM=VADM(1),SRSSN=VA("PID"),Y=$P(^SRF(SRTN,0),"^",9) D D^DIQ S SROD=$E(Y,1,18)
OPS S SROPER=$P(^SRF(SRTN,"OP"),"^"),OPER=0 F S OPER=$O(^SRF(SRTN,13,OPER)) Q:OPER="" D OTHER
K SRP,Z S:$L(SROPER)<50 SRP(1)=SROPER I $L(SROPER)>49 S SROPER=SROPER_" " F M=1:1 D OPER Q:Z=""
S SRATT="",Y=$P($G(^SRF(SRTN,.1)),"^",13) I Y S C=$P(^DD(130,.164,0),"^",2) D Y^DIQ S SRATT=Y
I SRATT="" S SRDIV=$$SITE^SROUTL0(SRTN) I SRDIV,'$P(^SRO(133,SRDIV,0),"^",19) D
.S Y=$P($G(^SRF(SRTN,.1)),"^",4),C=$P(^DD(130,.14,0),"^",2) D Y^DIQ S SRATT=Y
I SRATT="" S SRATT="ATTENDING SURGEON NOT ENTERED"
S Y=$P(^SRF(SRTN,0),"^",4),SRSPEC=$S(Y:$P(^SRO(137.45,Y,0),"^"),1:"SURGICAL SPECIALTY NOT ENTERED")
COMP ; perioperative occurrences
S (SRFG,SRIC,SRPC)=0
I SRBOTH1'="P" F S SRIC=$O(^SRF(SRTN,10,SRIC)) Q:SRIC="" D
.S SRFG=SRFG+1,SRC(SRFG)=$P(^SRF(SRTN,10,SRIC,0),"^")_"^"_$P(^(0),"^",6)_"^^"_$S($D(^SRF(SRTN,10,SRIC,2)):$P(^(2),"^"),1:"")_"^10^"_SRIC
I SRBOTH1'="I" S SRPC=0 F S SRPC=$O(^SRF(SRTN,16,SRPC)) Q:SRPC="" D
.S SRFG=SRFG+1,SRC(SRFG)=$P(^SRF(SRTN,16,SRPC,0),"^")_$S(SRBOTH1="B":" *",1:" ")_"^"_$P(^(0),"^",6)_"^"_$P(^(0),"^",7)_"^"_$S($D(^SRF(SRTN,16,SRPC,2)):$P(^(2),"^"),1:"")_"^16^"_SRPC
.I $P(^SRF(SRTN,16,SRPC,0),"^",2)=3 S SRC(SRFG)=SRC(SRFG)_"^"_$P(^SRF(SRTN,16,SRPC,0),"^",4)
PRINT ; print perioperative occurrence information
I $Y+10>IOSL D HDR^SROCMP2 I SRSOUT Q
S SRHDR=1 W !!,SRNM,?29,$S(SRSEL=2:SRSPEC,1:SRATT) S SRC=$O(SRC(0)) W ?80,$P(SRC(SRC),"^") D DATE W ?129,$P(SRC(SRC),"^",2)
I SRSEL=3 D PRNT3 Q
W !,VA("PID"),?29,SRP(1),?80,$P(SRC(SRC),"^",4)
W !,SROD W:$D(SRP(2)) ?29,SRP(2) D TEXT W:$D(SRP(3))!SRT ! W:$D(SRP(3)) ?29,SRP(3) D:SRT WP
SRC I SRC F S SRC=$O(SRC(SRC)) Q:'SRC!SRSOUT D
.I $Y+10>IOSL D HDR^SROCMP2 I SRSOUT Q
.W !,?80,$P(SRC(SRC),"^") D DATE W ?129,$P(SRC(SRC),"^",2),!,?80,$P(SRC(SRC),"^",4),! D TEXT I SRT W ! D WP
Q
PRNT3 W !,VA("PID"),?29,SRSPEC,?80,$P(SRC(SRC),"^",4)
W !,SROD W ?29,SRP(1) D TEXT W:$D(SRP(2))!SRT ! W:$D(SRP(2)) ?29,SRP(2) D:SRT WP
D SRC
Q
WP ; print perioperative occurrence comments
K ^UTILITY($J,"W") S CM=0 F S CM=$O(^SRF(SRTN,SRX,SRY,1,CM)) Q:'CM S X=^SRF(SRTN,SRX,SRY,1,CM,0),DIWL=81,DIWR=132 D ^DIWP
I $D(^UTILITY($J,"W")) F J=1:1:^UTILITY($J,"W",81) D
.I $Y+7>IOSL D HDR^SROCMP2 W ! I SRSOUT Q
.W ?81,^UTILITY($J,"W",81,J,0),!
Q
TEXT ; check for comments
S SRT=0,SRX=$P(SRC(SRC),"^",5),SRY=$P(SRC(SRC),"^",6) I $O(^SRF(SRTN,SRX,SRY,1,0)) S SRT=1 I SRT W ?80,">>> Comments:"
Q
OTHER ; other operations
S SRLONG=1 I $L(SROPER)+$L($P(^SRF(SRTN,13,OPER,0),"^"))>250 S SRLONG=0,OPER=999,SROPERS=" ..."
I SRLONG S SROPERS=$P(^SRF(SRTN,13,OPER,0),"^")
S SROPER=SROPER_$S(SROPERS=" ...":SROPERS,1:", "_SROPERS)
Q
OPER ; break procedure if greater than 50 characters
S SRP(M)="" F LOOP=1:1 S Z=$P(SROPER," ") Q:Z="" Q:$L(SRP(M))+$L(Z)'<50 S SRP(M)=SRP(M)_Z_" ",SROPER=$P(SROPER," ",2,200)
Q
DATE N SRSEP
S X=$P(SRC(SRC),"^",7) I X S SRSEP=$S(X=2:"SEPSIS",X=3:"SEPTIC SHOCK",1:"SIRS") W " /"_SRSEP
I $P(SRC(SRC),"^",3)'="" S SRDT=$P(SRC(SRC),"^",3) I SRDT W " ("_$E(SRDT,4,5)_"/"_$E(SRDT,6,7)_"/"_$E(SRDT,2,3)_")"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROCMP 5720 printed Dec 13, 2024@02:42:44 Page 2
SROCMP ;BIR/MAM - PERIOPERATIVE OCCURRENCES ;05/15/06
+1 ;;3.0;Surgery;**22,26,29,38,50,143,153,175**;24 Jun 93;Build 6
BEG USE IO
SET SRSOUT=0
SET PAGE=1
KILL ^TMP("SR",$JOB)
SET Y=DT
XECUTE ^DD("DD")
SET SRPRINT="DATE PRINTED: "_Y
SET SRSDT=SRSD-.0001
SET SREDT=SRED+.9999
+1 NEW SRFRTO
SET Y=SRSD
XECUTE ^DD("DD")
SET SRFRTO="FROM: "_Y_" TO: "
SET Y=SRED
XECUTE ^DD("DD")
SET SRFRTO=SRFRTO_Y
+2 FOR
SET SRSDT=$ORDER(^SRF("AC",SRSDT))
if SRSDT>SREDT!('SRSDT)!(SRSOUT)
QUIT
SET SRTN=0
FOR
SET SRTN=$ORDER(^SRF("AC",SRSDT,SRTN))
if 'SRTN!(SRSOUT)
QUIT
Begin DoDot:1
+3 IF $ORDER(^SRF(SRTN,10,0))!$ORDER(^SRF(SRTN,16,0))
IF (SRBOTH1="B")
IF $DATA(^SRF(SRTN,0))
IF $$MANDIV^SROUTL0(SRINSTP,SRTN)
DO UTIL
QUIT
+4 IF $ORDER(^SRF(SRTN,10,0))
IF (SRBOTH1="I")
IF $DATA(^SRF(SRTN,0))
IF $$MANDIV^SROUTL0(SRINSTP,SRTN)
DO UTIL
QUIT
+5 IF $ORDER(^SRF(SRTN,16,0))
IF (SRBOTH1="P")
IF $DATA(^SRF(SRTN,0))
IF $$MANDIV^SROUTL0(SRINSTP,SRTN)
DO UTIL
End DoDot:1
+6 SET (SRSS,SRHDR)=0
FOR
SET SRSS=$ORDER(^TMP("SR",$JOB,SRSS))
if SRSS=""!(SRSOUT)
QUIT
DO HDR^SROCMP2
SET SRSDATE=0
FOR
SET SRSDATE=$ORDER(^TMP("SR",$JOB,SRSS,SRSDATE))
if 'SRSDATE!(SRSOUT)
QUIT
DO MORE
+7 if SRSOUT
GOTO END
+8 IF '$DATA(^TMP("SR",$JOB))
DO HDR^SROCMP2
if SRSOUT
GOTO END
WRITE !!,"There are no "_$SELECT(SRBOTH1="I":"intraoperative",SRBOTH1="P":"postoperative",SRBOTH1="B":"perioperative",1:"")_" occurrences recorded for the selected date range."
+9 FOR I=$Y:1:IOSL-9
WRITE !
+10 SET X=""
DO FOOT^SROCMP2
+11 IF SRBOTH
SET SRSOUT=0
DO BEG^SROMORT
SET SRSOUT=1
END if $EXTRACT(IOST)="P"
WRITE @IOF
IF $DATA(ZTQUEUED)
KILL ^TMP("SR",$JOB)
if $GET(ZTSTOP)
QUIT
SET ZTREQ="@"
QUIT
+1 DO ^%ZISC
DO ^SRSKILL
KILL SRTN
WRITE @IOF
+2 QUIT
MORE SET SRTN=0
FOR
SET SRTN=$ORDER(^TMP("SR",$JOB,SRSS,SRSDATE,SRTN))
if 'SRTN
QUIT
DO SET
+1 QUIT
ATT NEW SRDIV,SRY
SET SRY=$PIECE($GET(^SRF(SRTN,.1)),"^",13)
IF SRY
Begin DoDot:1
+1 SET Y=SRY
SET C=$PIECE(^DD(130,.164,0),"^",2)
DO Y^DIQ
SET SRSS=Y
End DoDot:1
+2 IF SRY=""
SET SRDIV=$$SITE^SROUTL0(SRTN)
IF SRDIV
IF '$PIECE(^SRO(133,SRDIV,0),"^",19)
Begin DoDot:1
+3 SET SRY=$PIECE($GET(^SRF(SRTN,.1)),"^",4)
IF SRY
Begin DoDot:2
+4 SET Y=SRY
SET C=$PIECE(^DD(130,.14,0),"^",2)
DO Y^DIQ
SET SRSS=Y
End DoDot:2
End DoDot:1
+5 if 'SRY
SET SRY="ZZ"
IF SRSP
IF '$DATA(SRSP(SRY))
QUIT
+6 if 'SRY
SET SRSS="ATTENDING SURGEON NOT ENTERED"
+7 SET ^TMP("SR",$JOB,SRSS,SRSDT,SRTN)=""
+8 QUIT
UTIL ; set ^TMP
+1 IF SRSEL=1
Begin DoDot:1
+2 SET Y=$PIECE(^SRF(SRTN,0),"^",4)
if 'Y
SET Y="ZZ"
IF SRSP
IF '$DATA(SRSP(Y))
QUIT
+3 SET SRSS=$SELECT(Y:$PIECE(^SRO(137.45,Y,0),"^"),1:"SURGICAL SPECIALTY NOT ENTERED")
+4 SET ^TMP("SR",$JOB,SRSS,SRSDT,SRTN)=""
End DoDot:1
QUIT
+5 IF SRSEL=2
DO ATT
QUIT
+6 IF SRSEL=3
SET SRJ=$SELECT(SRBOTH1="I":10,SRBOTH1="P":16,1:"10,16")
FOR SRI=1:1:$LENGTH(SRJ,",")
SET SROCC=0
FOR
SET SROCC=$ORDER(^SRF(SRTN,$PIECE(SRJ,",",SRI),SROCC))
if 'SROCC
QUIT
SET Y=$PIECE(^SRF(SRTN,$PIECE(SRJ,",",SRI),SROCC,0),"^",2)
if Y
Begin DoDot:1
+7 IF SRSP
IF '$DATA(SRSP(Y))
QUIT
+8 SET SRSS=$SELECT(Y:$PIECE(^SRO(136.5,Y,0),"^"),1:"OCCURRENCE CATEGORY NOT ENTERED")
+9 SET ^TMP("SR",$JOB,SRSS,SRSDT,SRTN)=""
End DoDot:1
+10 QUIT
SET ; set variables to print
+1 KILL SRC
SET DFN=$PIECE(^SRF(SRTN,0),"^")
DO DEM^VADPT
SET SRNM=VADM(1)
SET SRSSN=VA("PID")
SET Y=$PIECE(^SRF(SRTN,0),"^",9)
DO D^DIQ
SET SROD=$EXTRACT(Y,1,18)
OPS SET SROPER=$PIECE(^SRF(SRTN,"OP"),"^")
SET OPER=0
FOR
SET OPER=$ORDER(^SRF(SRTN,13,OPER))
if OPER=""
QUIT
DO OTHER
+1 KILL SRP,Z
if $LENGTH(SROPER)<50
SET SRP(1)=SROPER
IF $LENGTH(SROPER)>49
SET SROPER=SROPER_" "
FOR M=1:1
DO OPER
if Z=""
QUIT
+2 SET SRATT=""
SET Y=$PIECE($GET(^SRF(SRTN,.1)),"^",13)
IF Y
SET C=$PIECE(^DD(130,.164,0),"^",2)
DO Y^DIQ
SET SRATT=Y
+3 IF SRATT=""
SET SRDIV=$$SITE^SROUTL0(SRTN)
IF SRDIV
IF '$PIECE(^SRO(133,SRDIV,0),"^",19)
Begin DoDot:1
+4 SET Y=$PIECE($GET(^SRF(SRTN,.1)),"^",4)
SET C=$PIECE(^DD(130,.14,0),"^",2)
DO Y^DIQ
SET SRATT=Y
End DoDot:1
+5 IF SRATT=""
SET SRATT="ATTENDING SURGEON NOT ENTERED"
+6 SET Y=$PIECE(^SRF(SRTN,0),"^",4)
SET SRSPEC=$SELECT(Y:$PIECE(^SRO(137.45,Y,0),"^"),1:"SURGICAL SPECIALTY NOT ENTERED")
COMP ; perioperative occurrences
+1 SET (SRFG,SRIC,SRPC)=0
+2 IF SRBOTH1'="P"
FOR
SET SRIC=$ORDER(^SRF(SRTN,10,SRIC))
if SRIC=""
QUIT
Begin DoDot:1
+3 SET SRFG=SRFG+1
SET SRC(SRFG)=$PIECE(^SRF(SRTN,10,SRIC,0),"^")_"^"_$PIECE(^(0),"^",6)_"^^"_$SELECT($DATA(^SRF(SRTN,10,SRIC,2)):$PIECE(^(2),"^"),1:"")_"^10^"_SRIC
End DoDot:1
+4 IF SRBOTH1'="I"
SET SRPC=0
FOR
SET SRPC=$ORDER(^SRF(SRTN,16,SRPC))
if SRPC=""
QUIT
Begin DoDot:1
+5 SET SRFG=SRFG+1
SET SRC(SRFG)=$PIECE(^SRF(SRTN,16,SRPC,0),"^")_$SELECT(SRBOTH1="B":" *",1:" ")_"^"_$PIECE(^(0),"^",6)_"^"_$PIECE(^(0),"^",7)_"^"_$SELECT($DATA(^SRF(SRTN,16,SRPC,2)):$PIECE(^(2),"^"),1:"")_"^16^"_SRPC
+6 IF $PIECE(^SRF(SRTN,16,SRPC,0),"^",2)=3
SET SRC(SRFG)=SRC(SRFG)_"^"_$PIECE(^SRF(SRTN,16,SRPC,0),"^",4)
End DoDot:1
PRINT ; print perioperative occurrence information
+1 IF $Y+10>IOSL
DO HDR^SROCMP2
IF SRSOUT
QUIT
+2 SET SRHDR=1
WRITE !!,SRNM,?29,$SELECT(SRSEL=2:SRSPEC,1:SRATT)
SET SRC=$ORDER(SRC(0))
WRITE ?80,$PIECE(SRC(SRC),"^")
DO DATE
WRITE ?129,$PIECE(SRC(SRC),"^",2)
+3 IF SRSEL=3
DO PRNT3
QUIT
+4 WRITE !,VA("PID"),?29,SRP(1),?80,$PIECE(SRC(SRC),"^",4)
+5 WRITE !,SROD
if $DATA(SRP(2))
WRITE ?29,SRP(2)
DO TEXT
if $DATA(SRP(3))!SRT
WRITE !
if $DATA(SRP(3))
WRITE ?29,SRP(3)
if SRT
DO WP
SRC IF SRC
FOR
SET SRC=$ORDER(SRC(SRC))
if 'SRC!SRSOUT
QUIT
Begin DoDot:1
+1 IF $Y+10>IOSL
DO HDR^SROCMP2
IF SRSOUT
QUIT
+2 WRITE !,?80,$PIECE(SRC(SRC),"^")
DO DATE
WRITE ?129,$PIECE(SRC(SRC),"^",2),!,?80,$PIECE(SRC(SRC),"^",4),!
DO TEXT
IF SRT
WRITE !
DO WP
End DoDot:1
+3 QUIT
PRNT3 WRITE !,VA("PID"),?29,SRSPEC,?80,$PIECE(SRC(SRC),"^",4)
+1 WRITE !,SROD
WRITE ?29,SRP(1)
DO TEXT
if $DATA(SRP(2))!SRT
WRITE !
if $DATA(SRP(2))
WRITE ?29,SRP(2)
if SRT
DO WP
+2 DO SRC
+3 QUIT
WP ; print perioperative occurrence comments
+1 KILL ^UTILITY($JOB,"W")
SET CM=0
FOR
SET CM=$ORDER(^SRF(SRTN,SRX,SRY,1,CM))
if 'CM
QUIT
SET X=^SRF(SRTN,SRX,SRY,1,CM,0)
SET DIWL=81
SET DIWR=132
DO ^DIWP
+2 IF $DATA(^UTILITY($JOB,"W"))
FOR J=1:1:^UTILITY($JOB,"W",81)
Begin DoDot:1
+3 IF $Y+7>IOSL
DO HDR^SROCMP2
WRITE !
IF SRSOUT
QUIT
+4 WRITE ?81,^UTILITY($JOB,"W",81,J,0),!
End DoDot:1
+5 QUIT
TEXT ; check for comments
+1 SET SRT=0
SET SRX=$PIECE(SRC(SRC),"^",5)
SET SRY=$PIECE(SRC(SRC),"^",6)
IF $ORDER(^SRF(SRTN,SRX,SRY,1,0))
SET SRT=1
IF SRT
WRITE ?80,">>> Comments:"
+2 QUIT
OTHER ; other operations
+1 SET SRLONG=1
IF $LENGTH(SROPER)+$LENGTH($PIECE(^SRF(SRTN,13,OPER,0),"^"))>250
SET SRLONG=0
SET OPER=999
SET SROPERS=" ..."
+2 IF SRLONG
SET SROPERS=$PIECE(^SRF(SRTN,13,OPER,0),"^")
+3 SET SROPER=SROPER_$SELECT(SROPERS=" ...":SROPERS,1:", "_SROPERS)
+4 QUIT
OPER ; break procedure if greater than 50 characters
+1 SET SRP(M)=""
FOR LOOP=1:1
SET Z=$PIECE(SROPER," ")
if Z=""
QUIT
if $LENGTH(SRP(M))+$LENGTH(Z)'<50
QUIT
SET SRP(M)=SRP(M)_Z_" "
SET SROPER=$PIECE(SROPER," ",2,200)
+2 QUIT
DATE NEW SRSEP
+1 SET X=$PIECE(SRC(SRC),"^",7)
IF X
SET SRSEP=$SELECT(X=2:"SEPSIS",X=3:"SEPTIC SHOCK",1:"SIRS")
WRITE " /"_SRSEP
+2 IF $PIECE(SRC(SRC),"^",3)'=""
SET SRDT=$PIECE(SRC(SRC),"^",3)
IF SRDT
WRITE " ("_$EXTRACT(SRDT,4,5)_"/"_$EXTRACT(SRDT,6,7)_"/"_$EXTRACT(SRDT,2,3)_")"
+3 QUIT