SROAOSET ;B'HAM ISC/MAM - SET SRAO ARRAY ; 17 MAR 1992 1:55 pm
;;3.0; Surgery ;**127**;24 Jun 93
S SRA(0)=^SRF(SRTN,0),SRA(34)=$G(^SRF(SRTN,34)),X=$P(SRA(34),"^",2) S:X X=$$ICDDX^ICDCODE(X,$P(SRA(0),"^",9)),X=$P(X,"^",2)_" "_$P(X,"^",4) S SRAO(1)=X_"^66" K SRA(34)
S SRA(205)=$G(^SRF(SRTN,205)),X=$P(SRA(205),"^") S:X X=X_" DAYS" S SRAO(2)=X_"^247"
S X=$P(SRA(205),"^",2),X=$S(X="":"",X=1:"DISCHARGED ALIVE",X=2:"DIED IN HOSPITAL",X=3:"REMAINS IN VAMC FACILITY",X=4:"TRANSFERRED TO ANOTHER VAMC",X=5:"READMITTED",X="NS":"NO STUDY",1:"")
S SRAO(3)=X_"^341"
DISP W @IOF,!,SRANAME,?65,"PAGE: 1",! F MOE=1:1:80 W "-"
W !,"1. Postoperative Diagnosis Code (ICD9):",?43,$P(SRAO(1),"^"),!,"2. Length of Postoperative Hospital Stay:",?43,$P(SRAO(2),"^"),!,"3. 30 Day Postoperative Status:",?43,$P(SRAO(3),"^")
W ! F MOE=1:1:80 W "-"
Q
YN ;
S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
Q
SROAOSET ;B'HAM ISC/MAM - SET SRAO ARRAY ; 17 MAR 1992 1:55 pm
+1 ;;3.0; Surgery ;**127**;24 Jun 93
+2 SET SRA(0)=^SRF(SRTN,0)
SET SRA(34)=$GET(^SRF(SRTN,34))
SET X=$PIECE(SRA(34),"^",2)
IF X
SET X=$$ICDDX^ICDCODE(X,$PIECE(SRA(0),"^",9))
SET X=$PIECE(X,"^",2)_" "_$PIECE(X,"^",4)
SET SRAO(1)=X_"^66"
KILL SRA(34)
+3 SET SRA(205)=$GET(^SRF(SRTN,205))
SET X=$PIECE(SRA(205),"^")
IF X
SET X=X_" DAYS"
SET SRAO(2)=X_"^247"
+4 SET X=$PIECE(SRA(205),"^",2)
SET X=$SELECT(X="":"",X=1:"DISCHARGED ALIVE",X=2:"DIED IN HOSPITAL",X=3:"REMAINS IN VAMC FACILITY",X=4:"TRANSFERRED TO ANOTHER VAMC",X=5:"READMITTED",X="NS":"NO STUDY",1:"")
+5 SET SRAO(3)=X_"^341"
DISP WRITE @IOF,!,SRANAME,?65,"PAGE: 1",!
FOR MOE=1:1:80
WRITE "-"
+1 WRITE !,"1. Postoperative Diagnosis Code (ICD9):",?43,$PIECE(SRAO(1),"^"),!,"2. Length of Postoperative Hospital Stay:",?43,$PIECE(SRAO(2),"^"),!,"3. 30 Day Postoperative Status:",?43,$PIECE(SRAO(3),"^")
+2 WRITE !
FOR MOE=1:1:80
WRITE "-"
+3 QUIT
YN ;
+1 SET SHEMP=$SELECT(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
+2 QUIT