source: WorldVistAEHR/trunk/r/SURGERY-SR/SROACL1.m@ 691

Last change on this file since 691 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.1 KB
Line 
1SROACL1 ;BIR/MAM - CARDIAC PREOP CLINICAL DATA ;06/13/06
2 ;;3.0; Surgery ;**38,71,95,125,153,160**;24 Jun 93;Build 7
3 ;
4 ; Reference to EN1^GMRVUT0 supported by DBIA #1446
5 ;
6 F I=0,200,202,205,206,206.1,208,209,200.1 S SRA(I)=$G(^SRF(SRTN,I))
7HT N SRSD,SRED S SRED=$P(SRA(0),"^",9)
8 I $P(SRA(206),"^")="" S SRSD=$$FMADD^XLFDT(SRED,-365),NYUK=$$HW(SRSD,SRED,"HT") D
9 .I NYUK'="" S NYUK=NYUK+.5\1,$P(^SRF(SRTN,206),"^")=NYUK,SRA(206)=$G(^SRF(SRTN,206))
10 S NYUK=$P(SRA(206),"^") S:NYUK'="" NYUK=$S(NYUK["C"!(NYUK["c"):+NYUK_" cm",+NYUK=NYUK:+NYUK_" in",NYUK="NS":" NS",1:NYUK) S SRAO(1)=NYUK_"^236"
11WT I $P(SRA(206),"^",2)="" S SRSD=$$FMADD^XLFDT(SRED,-30),NYUK=$$HW(SRSD,SRED,"WT") D
12 .I NYUK'="" S NYUK=NYUK+.5\1,$P(^SRF(SRTN,206),"^",2)=NYUK,SRA(206)=$G(^SRF(SRTN,206))
13 S NYUK=$P(SRA(206),"^",2) S:NYUK'="" NYUK=$S(NYUK["K"!(NYUK["k"):+NYUK_" kg",+NYUK=NYUK:+NYUK_" lb",NYUK="NS":" NS",1:NYUK) S SRAO(2)=NYUK_"^237"
14 K SRA(0) S NYUK=$P(SRA(209),"^",3),SRAO(3)=$S(NYUK="N":" NO",NYUK="D":" DIET",NYUK="O":" ORAL",NYUK="I":" INSULIN",1:"")_"^475",NYUK=$P(SRA(200),"^",11) D YN S SRAO(4)=SHEMP_"^203"
15 S SRAO(5)=$P(SRA(206),"^",5)_"^347",NYUK=$P(SRA(206),"^",6) D YN S SRAO(6)=SHEMP_"^209",NYUK=$P(SRA(206),"^",7) D YN S SRAO(7)=SHEMP_"^348"
16 S Y=$P(SRA(200.1),"^",5),C=$P(^DD(130,510,0),"^",2) D Y^DIQ S SRAO(8)=$S(Y["-":$E($P(Y,"-",2),1,19),1:$E(Y,1,19))_"^510"
17 S NYUK=$P(SRA(206),"^",10) D YN S SRAO(9)=SHEMP_"^349"
18 S NYUK=$P(SRA(206),"^",11) D YN S SRAO(10)=SHEMP_"^350",NYUK=$P(SRA(200),"^",8),SRAO(11)=$S(NYUK=1:"INDEPENDENT",NYUK=2:"PARTIAL DEPENDENT",NYUK=3:"TOTALLY DEPENDENT",NYUK="NS":"NO STUDY",1:"")_"^240"
19 S NYUK=$P(SRA(206),"^",13),SRAO(12)=$S(NYUK=0:"NONE ",NYUK=1:"NONE RECENT",NYUK=2:"12-72 HRS",NYUK=3:"<12 hrs ",NYUK=12:"12 - 72 hrs",NYUK=72:">72 hrs - 7 days",NYUK=7:">7 days ",NYUK="NS":"NO STUDY",1:"")_"^351"
20 S NYUK=$P(SRA(206),"^",14),SRAO(13)=$S(NYUK=0:"NONE",NYUK=1:"< OR = 7 DAYS",NYUK=2:"> 7 DAYS",1:"")_"^205"
21 S NYUK=$P(SRA(206),"^",15) S SRAO(14)=$S(NYUK=0:"NONE",NYUK=">":">3",NYUK="Y":"YES",NYUK="N":"NO",1:NYUK)_"^352"
22 S SRAO(15)=$P(SRA(206),"^",42)_"^485"
23 S NYUK=$P(SRA(206),"^",16) D YN S SRAO(16)=SHEMP_"^265",NYUK=$P(SRA(206),"^",17) D YN S SRAO(17)=SHEMP_"^264"
24 S SRAO(18)=$P(SRA(206),"^",18)_"^267",SRAO(19)=$P(SRA(206),"^",19)_"^207",NYUK=$P(SRA(206),"^",20) D YN S SRAO(20)=SHEMP_"^353",NYUK=$P(SRA(206),"^",21) D YN S SRAO(21)=SHEMP_"^354"
25 S NYUK=$P(SRA(206),"^",22) D YN S SRAO(22)=SHEMP_"^355"
26 S NYUK=$P(SRA(209),"^",2),SRAO(23)=$S(NYUK="N":"NONE",NYUK="I":"IABP",NYUK="V":"VAD",NYUK="A":"ARTI",NYUK="O":"OTHER",1:"")_"^474"
27 S NYUK=$P(SRA(206),"^",38) D YN S SRAO(24)=SHEMP_"^463"
28DISP ; display fields
29 S SRPAGE="PAGE: 1" D HDR^SROAUTL
30 W !," 1. Height:",?29,$P(SRAO(1),"^"),?41,"13. Prior MI: ",$J($P(SRAO(13),"^"),24)
31 W !," 2. Weight:",?29,$P(SRAO(2),"^"),?41,"14. Number prior heart surgeries: ",?70,$P(SRAO(14),"^")
32 W !," 3. Diabetes:",?27,$P(SRAO(3),"^"),?41,"15. Prior heart surgeries:" D H485
33 W !," 4. COPD:",?30,$P(SRAO(4),"^"),?41,"16. Peripheral Vascular Disease:",?75,$P(SRAO(16),"^")
34 W !," 5. FEV1:",?($S($P(SRAO(5),"^")="NS":30,1:27)),$P(SRAO(5),"^")_$S($P(SRAO(5),"^")="":"",$P(SRAO(5),"^")="NS":"",1:" liters"),?41,"17. Cerebral Vascular Disease:",?75,$P(SRAO(17),"^")
35 W !," 6. Cardiomegaly (X-ray):",?30,$P(SRAO(6),"^"),?41,"18. Angina (use CCS Class):",?75,$P(SRAO(18),"^")
36 W !," 7. Pulmonary Rales:",?30,$P(SRAO(7),"^"),?41,"19. CHF (use NYHA Class):",?75,$P(SRAO(19),"^")
37 W !," 8. Current Smoker: ",$J($P(SRAO(8),"^"),19),?41,"20. Current Diuretic Use:",?75,$P(SRAO(20),"^")
38 W !," 9. Active Endocarditis:",?30,$P(SRAO(9),"^"),?41,"21. Current Digoxin Use:",?75,$P(SRAO(21),"^")
39 W !,"10. Resting ST Depression:",?30,$P(SRAO(10),"^"),?41,"22. IV NTG within 48 Hours:",?75,$P(SRAO(22),"^")
40 W !,"11. Functional Status: ",$J($P(SRAO(11),"^"),17),?41,"23. Preop circulatory Device:",?75,$P(SRAO(23),"^")
41 W !,"12. PCI: ",$J($P(SRAO(12),"^"),29),?41,"24. Hypertension (Y/N):",?75,$P(SRAO(24),"^")
42 W !! F MOE=1:1:80 W "-"
43 Q
44YN ; store answer
45 S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
46 Q
47H485 S SHEMP="",X=$P(SRAO(15),"^") F I=1:1:$L(X,",") D
48 .S C=$P(X,",",I) S:I>1 SHEMP=SHEMP_", " S SHEMP=SHEMP_$S(C=0:"NONE",C=1:"CABG-ONLY",C=2:"VALVE-ONLY",C=3:"CABG/VALVE",C=4:"OTHER",C=5:"CABG/OTHER",1:"")
49 ;
50 S X=SHEMP I $L(X)<12 W ?68,$J(X,11) Q
51 W ?68,$J($P(X,",")_",",11) I $L($P(X,", ",2,9))<36 W !,?44,$P(X,", ",2,9) Q
52 W !,?44,$P(X,", ",2,4)_",",!,?44,$P(X,", ",5,9)
53 Q
54HW(SRSD,SRED,SVTYPE) ; get weight & height from Vitals
55 N GMRVSTR,SRTYPE,SRBCNT,SRBRDT,SRBIEN,SRBDATA,RESULTS
56 K ^UTILITY($J,"GMRVD"),RESULTS S GMRVSTR=SVTYPE,GMRVSTR(0)=SRSD_"^"_SRED_"^^"
57 D EN1^GMRVUT0 Q:'$D(^UTILITY($J,"GMRVD")) ""
58 S SRTYPE="",SRBCNT=1 F S SRTYPE=$O(^UTILITY($J,"GMRVD",SRTYPE)) Q:SRTYPE="" D
59 .S SRBRDT=0 F S SRBRDT=$O(^UTILITY($J,"GMRVD",SRTYPE,SRBRDT)) Q:'SRBRDT D
60 ..S SRBIEN=0 F S SRBIEN=$O(^UTILITY($J,"GMRVD",SRTYPE,SRBRDT,SRBIEN)) Q:'SRBIEN D
61 ...S SRBDATA=$G(^UTILITY($J,"GMRVD",SRTYPE,SRBRDT,SRBIEN))
62 ...S RESULTS(SRTYPE,SRBRDT)=$P(SRBDATA,"^",1,2)_"^"_$P(SRBDATA,"^",8),SRBCNT=SRBCNT+1
63 I $D(RESULTS(SVTYPE)) S SRI=$O(RESULTS(SVTYPE,0)) Q $P(RESULTS(SVTYPE,SRI),"^",3)
64 Q ""
Note: See TracBrowser for help on using the repository browser.