1 | SROANR0 ;BIR/ADM - ANESTHESIA REPORT ; [ 06/28/04 12:45 PM ]
|
---|
2 | ;;3.0; Surgery ;**100,131**;24 Jun 93
|
---|
3 | ;
|
---|
4 | ;** NOTICE: This routine is part of an implementation of a nationally
|
---|
5 | ;** controlled procedure. Local modifications to this routine
|
---|
6 | ;** are prohibited.
|
---|
7 | ;
|
---|
8 | TECH D LINE(2) S @SRG@(SRI)="Anesthesia Technique(s): " D
|
---|
9 | .I '$O(^SRF(SRTN,6,0)) S @SRG@(SRI)=@SRG@(SRI)_"* NOT ENTERED *" Q
|
---|
10 | .S ANE=0 F S ANE=$O(^SRF(SRTN,6,ANE)) Q:'ANE D ANE
|
---|
11 | Q
|
---|
12 | ANE ; print anesthesia technique
|
---|
13 | N A,AGNT,C,CNT
|
---|
14 | S A=^SRF(SRTN,6,ANE,0),Y=$P(A,"^"),C=$P(^DD(130.06,.01,0),"^",2) D:Y'="" Y^DIQ D LINE(1) S Y=Y_$S($P(A,"^",3)="Y":" (PRINCIPAL)",1:""),@SRG@(SRI)=Y D AGENT
|
---|
15 | D INFO
|
---|
16 | Q
|
---|
17 | AGENT ; print agents
|
---|
18 | Q:$P(A,"^")="N"
|
---|
19 | D LINE(1) S @SRG@(SRI)=" Agent: " I '$O(^SRF(SRTN,6,ANE,1,0)) S @SRG@(SRI)=@SRG@(SRI)_"NONE ENTERED" Q
|
---|
20 | S (AGNT,CNT)=0 F S AGNT=$O(^SRF(SRTN,6,ANE,1,AGNT)) Q:'AGNT S CNT=CNT+1 D
|
---|
21 | .S Y=$P(^SRF(SRTN,6,ANE,1,AGNT,0),"^"),C=$P(^DD(130.47,.01,0),"^",2) D Y^DIQ
|
---|
22 | .D:CNT>1 LINE(1) S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(13)_Y
|
---|
23 | .;; SR*3*131 ADDED LOGIC TO INCLUDE DOSE
|
---|
24 | .S Y=$P(^SRF(SRTN,6,ANE,1,AGNT,0),"^",2) I Y'="" S @SRG@(SRI)=@SRG@(SRI)_" "_Y_" mg"
|
---|
25 | Q
|
---|
26 | INFO ; anesthesia technique information
|
---|
27 | N C,SRFLG,I,S,X,Y F I=2,3,8 S S(I)=$G(^SRF(SRTN,6,ANE,I))
|
---|
28 | I $P(S(8),"^")="Y" D LINE(1) S @SRG@(SRI)=" MONITORED ANESTHESIA CARE"
|
---|
29 | I $P(S(8),"^",2)'="" D LINE(1) S @SRG@(SRI)=" Intubated: "_$S($P(S(8),"^",2)="Y":"YES",1:"NO")
|
---|
30 | S S=^SRF(SRTN,6,ANE,0),(Y,SRFLG)=$P(S,"^",5),C=$P(^DD(130.06,3,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Approach: "_Y
|
---|
31 | I $P(S,"^",6)'="" S Y=$P(S,"^",6),C=$P(^DD(130.06,4,0),"^",2) D:Y'="" Y^DIQ I Y'="" D:SRFLG="" LINE(1) S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Route: "_Y
|
---|
32 | S Y=$P(S,"^",7),C=$P(^DD(130.06,5,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Laryngoscope Type: "_Y
|
---|
33 | S Y=$P(S,"^",8),C=$P(^DD(130.06,6,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Laryngoscope Size: "_Y
|
---|
34 | S (Y,SRFLG)=$P(S,"^",9),C=$P(^DD(130.06,7,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Stylet Used: "_Y
|
---|
35 | S Y=$P(S,"^",10),C=$P(^DD(130.06,8,0),"^",2) D:Y'="" Y^DIQ I Y'="" D:SRFLG="" LINE(1) S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Lidocaine Topical: "_Y
|
---|
36 | S Y=$P(S,"^",11),C=$P(^DD(130.06,9,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Lidocaine IV: "_Y
|
---|
37 | S (Y,SRFLG)=$P(S,"^",12),C=$P(^DD(130.06,10,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Tube Type: "_Y
|
---|
38 | I $P(S,"^",13) D:SRFLG="" LINE(1) S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Tube Size: "_$P(S,"^",13)
|
---|
39 | S Y=$P(S,"^",14),C=$P(^DD(130.06,12,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Trauma: "_Y
|
---|
40 | S (Y,SRFLG)=$P(S,"^",23),C=$P(^DD(130.06,21,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Extubated In: "_Y
|
---|
41 | S Y=$P($G(^SRF(SRTN,6,ANE,6)),"^"),C=$P(^DD(130.06,39,0),"^",2) D:Y'="" Y^DIQ I Y'="" D:SRFLG="" LINE(1) S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Extubated By: "_$S($L(Y)>25:$P(Y,",")_","_$P(Y,",",2)_".",1:Y)
|
---|
42 | I $P(S,"^",24)="Y" D LINE(1) S @SRG@(SRI)=" Reintubated within 8 Hours: YES"
|
---|
43 | I $P(S,"^",19)="Y" D LINE(1) S @SRG@(SRI)=" Heat, Moisture Exchanger Used: YES"
|
---|
44 | I $P(S,"^",20)="Y" D LINE(1) S @SRG@(SRI)=" Bacteria Filter in Circuit: YES"
|
---|
45 | S (Y,SRFLG)=$P(S(2),"^") I Y'="" D LINE(1) S @SRG@(SRI)=" Continuous: "_$S(Y="Y":"YES",1:"NO")
|
---|
46 | S Y=$P(S(2),"^",2) I Y'="" S Y=$S(Y=1:"HYPERBARIC",Y=2:"HYPOBARIC",1:"ISOBARIC") D:SRFLG="" LINE(1) S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Baricity: "_Y
|
---|
47 | S (Y,SRFLG)=$P(S(2),"^",3),C=$P(^DD(130.06,27,0),"^",2) D:Y'="" Y^DIQ I Y'="" D LINE(1) S @SRG@(SRI)=" Puncture Site: "_Y
|
---|
48 | S Y=$P(S(2),"^",5),C=$P(^DD(130.06,29,0),"^",2) D:Y'="" Y^DIQ I Y'="" D:SRFLG="" LINE(1) S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Needle Size: "_Y
|
---|
49 | S (Y,SRFLG)=$P(S(8),"^",3),C=$P(^DD(130.06,43,0),"^",2) I Y'="" D Y^DIQ D LINE(1) S @SRG@(SRI)=" Level: "_Y
|
---|
50 | Q
|
---|
51 | MED ; medications
|
---|
52 | N ADBY,ADM,C,CNT,COMMENT,DOSE,MED,MM,ORBY,ROUTE,TIME,X,Y
|
---|
53 | S (CNT,MED)=0 F S MED=$O(^SRF(SRTN,22,MED)) Q:'MED S CNT=CNT+1 D
|
---|
54 | .S Y=$P(^SRF(SRTN,22,MED,0),"^"),C=$P(^DD(130.33,.01,0),"^",2) D Y^DIQ,LINE(1) S @SRG@(SRI)=" "_Y,ADM=0 F S ADM=$O(^SRF(SRTN,22,MED,1,ADM)) Q:'ADM D
|
---|
55 | ..S MM=^SRF(SRTN,22,MED,1,ADM,0),Y=$P(MM,"^") D D^DIQ S TIME=$P(Y,"@")_" "_$P(Y,"@",2)
|
---|
56 | ..S DOSE=$P(MM,"^",2),X=$P(MM,"^",3) S:X="" ORBY="N/A" I X S Y=$P(^VA(200,X,0),"^") D N(20) S ORBY=Y
|
---|
57 | ..S X=$P(MM,"^",4) S:X="" ADBY="N/A" I X S Y=$P(^VA(200,X,0),"^") D N(29) S ADBY=Y
|
---|
58 | ..S Y=$P(MM,"^",5),C=$P(^DD(130.34,4,0),"^",2) D:Y'="" Y^DIQ S ROUTE=Y
|
---|
59 | ..S COMMENT=$P(MM,"^",6) S:COMMENT="" COMMENT="N/A"
|
---|
60 | ..D LINE(1) S @SRG@(SRI)=" Time Administered: "_TIME D LINE(1) S @SRG@(SRI)=" Route: "_ROUTE,@SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Dosage: "_DOSE
|
---|
61 | ..D LINE(1) S @SRG@(SRI)=" Ordered By: "_ORBY S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Admin By: "_ADBY
|
---|
62 | ..D LINE(1) S @SRG@(SRI)=" Comments: "_COMMENT
|
---|
63 | Q
|
---|
64 | N(SRL) N SRN I $L(Y)>SRL S SRN=$P(Y,",")_","_$E($P(Y,",",2))_".",Y=SRN
|
---|
65 | Q
|
---|
66 | SPACE(NUM) ;create spaces
|
---|
67 | ;pass in position returns number of needed spaces
|
---|
68 | I '$D(@SRG@(SRI)) S @SRG@(SRI)=""
|
---|
69 | Q $J("",NUM-$L(@SRG@(SRI)))
|
---|
70 | LINE(NUM) ;create carriage returns
|
---|
71 | F J=1:1:NUM S SRI=SRI+1,@SRG@(SRI)=""
|
---|
72 | Q
|
---|