SROAPS2 ;BIR/MAM - PREOP INFO (PAGE 2) ;07/18/2011
;;3.0;Surgery;**38,47,125,153,160,166,176,182,184**;24 Jun 93;Build 35
S SRPAGE="PAGE: 2 OF 2" D HDR^SROAUTL,PRE2
W !! F I=1:1:80 W "-"
Q
PRE2 N SRX,Y S Y=$P($G(^SRF(SRTN,200.1)),"^",3) I Y="",$P(VADM(5),"^")="M" S $P(^SRF(SRTN,200.1),"^",3)="NA"
S SRA(200)=$G(^SRF(SRTN,200)),SRA(206)=$G(^SRF(SRTN,206)),SRA(200.1)=$G(^SRF(SRTN,200.1)),SRA(210)=$G(^SRF(SRTN,210))
S SRA(204)=$G(^SRF(SRTN,204))
S Y=$P(SRA(200),"^",37),SRX=243,SRAO(1)=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",38),SRX=328,SRAO("1A")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",39),SRX=211,SRAO("1B")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",18),SRX=210,SRAO(2)=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",44),SRX=245,SRAO(3)=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",19),SRX=332,SRAO("2A")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",21),SRX=333,SRAO("2B")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",24),SRX=400,SRAO("2C")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200.1),"^",13),SRX=521,SRAO("2D")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200.1),"^",14),SRX=522,SRAO("2E")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",29),SRX=401,SRAO("2F")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(210),"^"),SRX=662,SRAO("2G")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",45),SRX=338,SRAO("3A")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",46),SRX=218,SRAO("3B")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",47),SRX=339,SRAO("3C")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",48),SRX=215,SRAO("3D")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",49),SRX=216,SRAO("3E")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",58),SRX=642,SRAO("3F")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200),"^",50),SRX=217,SRAO("3G")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(204),"^",17),SRX=338.3,SRAO("3H")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(206),"^",4),SRX=338.2,SRAO("3I")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(206),"^",8),SRX=218.1,SRAO("3J")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(200.1),"^",3),SRX=269,SRAO("3K")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(210),"^",8),SRX=673,SRAO("3L")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(210),"^",9),SRX=674,SRAO("3M")=$$OUT(SRX,Y)_"^"_SRX
S Y=$P(SRA(210),"^",12),SRX=677,SRAO("3N")=$$OUT(SRX,Y)_"^"_SRX K SRA
W !,"1. RENAL:",?(38-$L($P(SRAO(1),"^"))),$P(SRAO(1),"^"),?40,"3. NUTRITIONAL/IMMUNE/OTHER:",?(79-$L($P(SRAO(3),"^"))),$P(SRAO(3),"^")
W !," A. Acute Renal Failure:",?(38-$L($P(SRAO("1A"),"^"))),$P(SRAO("1A"),"^"),?40," A. Disseminated Cancer:",?(79-$L($P(SRAO("3A"),"^"))),$P(SRAO("3A"),"^")
W !," B. Currently on Dialysis:",?(38-$L($P(SRAO("1B"),"^"))),$P(SRAO("1B"),"^"),?40," B. Open Wound:",?(79-$L($P(SRAO("3B"),"^"))),$P(SRAO("3B"),"^")
W !,?40," C. Steroid Use for Chronic Cond.:",?(79-$L($P(SRAO("3C"),"^"))),$P(SRAO("3C"),"^")
W !,?40," D. Weight Loss > 10%:",?(79-$L($P(SRAO("3D"),"^"))),$P(SRAO("3D"),"^")
W !,"2. CENTRAL NERVOUS SYSTEM:",?(38-$L($P(SRAO(2),"^"))),$P(SRAO(2),"^"),?40," E. Bleeding Disorders:",?(79-$L($P(SRAO("3E"),"^"))),$P(SRAO("3E"),"^")
W !," A. Impaired Sensorium: ",?(38-$L($P(SRAO("2A"),"^"))),$P(SRAO("2A"),"^"),?40," F. Bleed Due To Med:",?(79-$L($P(SRAO("3F"),"^"))),$P(SRAO("3F"),"^")
W !," B. Coma:",?(38-$L($P(SRAO("2B"),"^"))),$P(SRAO("2B"),"^"),?40," G. Transfusion > 4 RBC Units:",?(79-$L($P(SRAO("3G"),"^"))),$P(SRAO("3G"),"^")
W !," C. Hemiplegia:",?(38-$L($P(SRAO("2C"),"^"))),$P(SRAO("2C"),"^"),?40," H. Chemo for Malig Last 90 Days:",?(79-$L($P(SRAO("3H"),"^"))),$P(SRAO("3H"),"^")
W !," D. CVD Repair/Obstruct:",?(38-$L($P(SRAO("2D"),"^"))),$P(SRAO("2D"),"^"),?40," I. Radiotherapy W/I 90 Days:",?(79-$L($P(SRAO("3I"),"^"))),$P(SRAO("3I"),"^")
W !," E. History of CVD:",?(38-$L($P(SRAO("2E"),"^"))),$P(SRAO("2E"),"^"),?40," J. Preoperative Sepsis:",?(79-$L($P(SRAO("3J"),"^"))),$P(SRAO("3J"),"^")
W !," F. Tumor Involving CNS:",?(38-$L($P(SRAO("2F"),"^"))),$P(SRAO("2F"),"^"),?40," K. Pregnancy:",?(79-$L($P(SRAO("3K"),"^"))),$P(SRAO("3K"),"^")
W !," G. Impaired Cognitive Function:",?(38-$L($P(SRAO("2G"),"^"))),$P(SRAO("2G"),"^")
W ?40," L. History of Cancer:",?(79-$L($P(SRAO("3L"),"^"))),$P(SRAO("3L"),"^")
W !,?40," M. History of Radiation Therapy:",?(79-$L($P(SRAO("3M"),"^"))),$P(SRAO("3M"),"^")
W !,?40," N. Num of Prior Surg in Same OP:",?(79-$L($P(SRAO("3N"),"^"))),$P(SRAO("3N"),"^")
Q
OUT(SRFLD,SRY) ; get data in output form
N C,Y
I SRFLD=521 S Y=$S(SRY=1:"YES/NO SURG",SRY=2:"YES/PRIOR SURG",SRY=0:"NO CVD",1:"") Q Y
I SRFLD=522 S Y=$S(SRY=1:"HIST OF TIA'S",SRY=2:"CVA W/O NEURO DEF",SRY=3:"CVA W/ NEURO DEF",SRY=0:"NO CVD",1:"") Q Y
I SRFLD=642 S Y=$S(SRY=1!(SRY="N"):"NO BLEEDING RISK",SRY=2:"CHRONIC ASPIRIN",SRY=3:"RISK MED D'C",SRY=4!(SRY="Y"):"RISK MED NOT D'C",1:"") Q Y
I SRFLD=338.3 S Y=$S(SRY=1:1,SRY=2:2,SRY=3:3,1:"") Q Y
I SRFLD=677!(SRFLD=662) Q SRY
S Y=SRY,C=$P(^DD(130,SRFLD,0),"^",2) D:Y'="" Y^DIQ
I Y="NO STUDY" S Y="NS"
Q Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSROAPS2 4861 printed Nov 22, 2024@17:51:46 Page 2
SROAPS2 ;BIR/MAM - PREOP INFO (PAGE 2) ;07/18/2011
+1 ;;3.0;Surgery;**38,47,125,153,160,166,176,182,184**;24 Jun 93;Build 35
+2 SET SRPAGE="PAGE: 2 OF 2"
DO HDR^SROAUTL
DO PRE2
+3 WRITE !!
FOR I=1:1:80
WRITE "-"
+4 QUIT
PRE2 NEW SRX,Y
SET Y=$PIECE($GET(^SRF(SRTN,200.1)),"^",3)
IF Y=""
IF $PIECE(VADM(5),"^")="M"
SET $PIECE(^SRF(SRTN,200.1),"^",3)="NA"
+1 SET SRA(200)=$GET(^SRF(SRTN,200))
SET SRA(206)=$GET(^SRF(SRTN,206))
SET SRA(200.1)=$GET(^SRF(SRTN,200.1))
SET SRA(210)=$GET(^SRF(SRTN,210))
+2 SET SRA(204)=$GET(^SRF(SRTN,204))
+3 SET Y=$PIECE(SRA(200),"^",37)
SET SRX=243
SET SRAO(1)=$$OUT(SRX,Y)_"^"_SRX
+4 SET Y=$PIECE(SRA(200),"^",38)
SET SRX=328
SET SRAO("1A")=$$OUT(SRX,Y)_"^"_SRX
+5 SET Y=$PIECE(SRA(200),"^",39)
SET SRX=211
SET SRAO("1B")=$$OUT(SRX,Y)_"^"_SRX
+6 SET Y=$PIECE(SRA(200),"^",18)
SET SRX=210
SET SRAO(2)=$$OUT(SRX,Y)_"^"_SRX
+7 SET Y=$PIECE(SRA(200),"^",44)
SET SRX=245
SET SRAO(3)=$$OUT(SRX,Y)_"^"_SRX
+8 SET Y=$PIECE(SRA(200),"^",19)
SET SRX=332
SET SRAO("2A")=$$OUT(SRX,Y)_"^"_SRX
+9 SET Y=$PIECE(SRA(200),"^",21)
SET SRX=333
SET SRAO("2B")=$$OUT(SRX,Y)_"^"_SRX
+10 SET Y=$PIECE(SRA(200),"^",24)
SET SRX=400
SET SRAO("2C")=$$OUT(SRX,Y)_"^"_SRX
+11 SET Y=$PIECE(SRA(200.1),"^",13)
SET SRX=521
SET SRAO("2D")=$$OUT(SRX,Y)_"^"_SRX
+12 SET Y=$PIECE(SRA(200.1),"^",14)
SET SRX=522
SET SRAO("2E")=$$OUT(SRX,Y)_"^"_SRX
+13 SET Y=$PIECE(SRA(200),"^",29)
SET SRX=401
SET SRAO("2F")=$$OUT(SRX,Y)_"^"_SRX
+14 SET Y=$PIECE(SRA(210),"^")
SET SRX=662
SET SRAO("2G")=$$OUT(SRX,Y)_"^"_SRX
+15 SET Y=$PIECE(SRA(200),"^",45)
SET SRX=338
SET SRAO("3A")=$$OUT(SRX,Y)_"^"_SRX
+16 SET Y=$PIECE(SRA(200),"^",46)
SET SRX=218
SET SRAO("3B")=$$OUT(SRX,Y)_"^"_SRX
+17 SET Y=$PIECE(SRA(200),"^",47)
SET SRX=339
SET SRAO("3C")=$$OUT(SRX,Y)_"^"_SRX
+18 SET Y=$PIECE(SRA(200),"^",48)
SET SRX=215
SET SRAO("3D")=$$OUT(SRX,Y)_"^"_SRX
+19 SET Y=$PIECE(SRA(200),"^",49)
SET SRX=216
SET SRAO("3E")=$$OUT(SRX,Y)_"^"_SRX
+20 SET Y=$PIECE(SRA(200),"^",58)
SET SRX=642
SET SRAO("3F")=$$OUT(SRX,Y)_"^"_SRX
+21 SET Y=$PIECE(SRA(200),"^",50)
SET SRX=217
SET SRAO("3G")=$$OUT(SRX,Y)_"^"_SRX
+22 SET Y=$PIECE(SRA(204),"^",17)
SET SRX=338.3
SET SRAO("3H")=$$OUT(SRX,Y)_"^"_SRX
+23 SET Y=$PIECE(SRA(206),"^",4)
SET SRX=338.2
SET SRAO("3I")=$$OUT(SRX,Y)_"^"_SRX
+24 SET Y=$PIECE(SRA(206),"^",8)
SET SRX=218.1
SET SRAO("3J")=$$OUT(SRX,Y)_"^"_SRX
+25 SET Y=$PIECE(SRA(200.1),"^",3)
SET SRX=269
SET SRAO("3K")=$$OUT(SRX,Y)_"^"_SRX
+26 SET Y=$PIECE(SRA(210),"^",8)
SET SRX=673
SET SRAO("3L")=$$OUT(SRX,Y)_"^"_SRX
+27 SET Y=$PIECE(SRA(210),"^",9)
SET SRX=674
SET SRAO("3M")=$$OUT(SRX,Y)_"^"_SRX
+28 SET Y=$PIECE(SRA(210),"^",12)
SET SRX=677
SET SRAO("3N")=$$OUT(SRX,Y)_"^"_SRX
KILL SRA
+29 WRITE !,"1. RENAL:",?(38-$LENGTH($PIECE(SRAO(1),"^"))),$PIECE(SRAO(1),"^"),?40,"3. NUTRITIONAL/IMMUNE/OTHER:",?(79-$LENGTH($PIECE(SRAO(3),"^"))),$PIECE(SRAO(3),"^")
+30 WRITE !," A. Acute Renal Failure:",?(38-$LENGTH($PIECE(SRAO("1A"),"^"))),$PIECE(SRAO("1A"),"^"),?40," A. Disseminated Cancer:",?(79-$LENGTH($PIECE(SRAO("3A"),"^"))),$PIECE(SRAO("3A"),"^")
+31 WRITE !," B. Currently on Dialysis:",?(38-$LENGTH($PIECE(SRAO("1B"),"^"))),$PIECE(SRAO("1B"),"^"),?40," B. Open Wound:",?(79-$LENGTH($PIECE(SRAO("3B"),"^"))),$PIECE(SRAO("3B"),"^")
+32 WRITE !,?40," C. Steroid Use for Chronic Cond.:",?(79-$LENGTH($PIECE(SRAO("3C"),"^"))),$PIECE(SRAO("3C"),"^")
+33 WRITE !,?40," D. Weight Loss > 10%:",?(79-$LENGTH($PIECE(SRAO("3D"),"^"))),$PIECE(SRAO("3D"),"^")
+34 WRITE !,"2. CENTRAL NERVOUS SYSTEM:",?(38-$LENGTH($PIECE(SRAO(2),"^"))),$PIECE(SRAO(2),"^"),?40," E. Bleeding Disorders:",?(79-$LENGTH($PIECE(SRAO("3E"),"^"))),$PIECE(SRAO("3E"),"^")
+35 WRITE !," A. Impaired Sensorium: ",?(38-$LENGTH($PIECE(SRAO("2A"),"^"))),$PIECE(SRAO("2A"),"^"),?40," F. Bleed Due To Med:",?(79-$LENGTH($PIECE(SRAO("3F"),"^"))),$PIECE(SRAO("3F"),"^")
+36 WRITE !," B. Coma:",?(38-$LENGTH($PIECE(SRAO("2B"),"^"))),$PIECE(SRAO("2B"),"^"),?40," G. Transfusion > 4 RBC Units:",?(79-$LENGTH($PIECE(SRAO("3G"),"^"))),$PIECE(SRAO("3G"),"^")
+37 WRITE !," C. Hemiplegia:",?(38-$LENGTH($PIECE(SRAO("2C"),"^"))),$PIECE(SRAO("2C"),"^"),?40," H. Chemo for Malig Last 90 Days:",?(79-$LENGTH($PIECE(SRAO("3H"),"^"))),$PIECE(SRAO("3H"),"^")
+38 WRITE !," D. CVD Repair/Obstruct:",?(38-$LENGTH($PIECE(SRAO("2D"),"^"))),$PIECE(SRAO("2D"),"^"),?40," I. Radiotherapy W/I 90 Days:",?(79-$LENGTH($PIECE(SRAO("3I"),"^"))),$PIECE(SRAO("3I"),"^")
+39 WRITE !," E. History of CVD:",?(38-$LENGTH($PIECE(SRAO("2E"),"^"))),$PIECE(SRAO("2E"),"^"),?40," J. Preoperative Sepsis:",?(79-$LENGTH($PIECE(SRAO("3J"),"^"))),$PIECE(SRAO("3J"),"^")
+40 WRITE !," F. Tumor Involving CNS:",?(38-$LENGTH($PIECE(SRAO("2F"),"^"))),$PIECE(SRAO("2F"),"^"),?40," K. Pregnancy:",?(79-$LENGTH($PIECE(SRAO("3K"),"^"))),$PIECE(SRAO("3K"),"^")
+41 WRITE !," G. Impaired Cognitive Function:",?(38-$LENGTH($PIECE(SRAO("2G"),"^"))),$PIECE(SRAO("2G"),"^")
+42 WRITE ?40," L. History of Cancer:",?(79-$LENGTH($PIECE(SRAO("3L"),"^"))),$PIECE(SRAO("3L"),"^")
+43 WRITE !,?40," M. History of Radiation Therapy:",?(79-$LENGTH($PIECE(SRAO("3M"),"^"))),$PIECE(SRAO("3M"),"^")
+44 WRITE !,?40," N. Num of Prior Surg in Same OP:",?(79-$LENGTH($PIECE(SRAO("3N"),"^"))),$PIECE(SRAO("3N"),"^")
+45 QUIT
OUT(SRFLD,SRY) ; get data in output form
+1 NEW C,Y
+2 IF SRFLD=521
SET Y=$SELECT(SRY=1:"YES/NO SURG",SRY=2:"YES/PRIOR SURG",SRY=0:"NO CVD",1:"")
QUIT Y
+3 IF SRFLD=522
SET Y=$SELECT(SRY=1:"HIST OF TIA'S",SRY=2:"CVA W/O NEURO DEF",SRY=3:"CVA W/ NEURO DEF",SRY=0:"NO CVD",1:"")
QUIT Y
+4 IF SRFLD=642
SET Y=$SELECT(SRY=1!(SRY="N"):"NO BLEEDING RISK",SRY=2:"CHRONIC ASPIRIN",SRY=3:"RISK MED D'C",SRY=4!(SRY="Y"):"RISK MED NOT D'C",1:"")
QUIT Y
+5 IF SRFLD=338.3
SET Y=$SELECT(SRY=1:1,SRY=2:2,SRY=3:3,1:"")
QUIT Y
+6 IF SRFLD=677!(SRFLD=662)
QUIT SRY
+7 SET Y=SRY
SET C=$PIECE(^DD(130,SRFLD,0),"^",2)
if Y'=""
DO Y^DIQ
+8 IF Y="NO STUDY"
SET Y="NS"
+9 QUIT Y