source: WorldVistAEHR/trunk/r/SURGERY-SR/SRONRPT1.m@ 1450

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

initial load of WorldVistAEHR

File size: 5.0 KB
RevLine 
[613]1SRONRPT1 ;BIR/ADM - NURSE INTRAOP REPORT ;02/20/05
2 ;;3.0; Surgery ;**100,143,157**;24 Jun 93;Build 3
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 S SRLF=1 N SRTD S SRTD=$P($G(^SRF(SRTN,3)),"^") I SRTD="",SRALL D LINE(1) S @SRG@(SRI)="Tubes and Drains: N/A"
9 I SRTD'="" D LINE(1) S @SRG@(SRI)="Tubes and Drains: " D LINE(1) S @SRG@(SRI)=" "_SRTD
10 S SRLF=1 I '$O(^SRF(SRTN,2,0)),SRALL D LINE(1) S @SRG@(SRI)="Tourniquet: N/A"
11 I $O(^SRF(SRTN,2,0)) D LINE(1) S @SRG@(SRI)="Tourniquet:" D TOUR
12 S SRLF=1,SRLINE="Thermal Unit: " I '$O(^SRF(SRTN,21,0)),SRALL D LINE(1) S @SRG@(SRI)=SRLINE_"N/A"
13 I $O(^SRF(SRTN,21,0)) D LINE(1) S @SRG@(SRI)=SRLINE D THERM
14 S SRLF=1,SRLINE="Prosthesis Installed: " I '$O(^SRF(SRTN,1,0)),SRALL D LINE(1) S @SRG@(SRI)=SRLINE_"N/A"
15 I $O(^SRF(SRTN,1,0)) D LINE(1) S @SRG@(SRI)=SRLINE D PRO
16 S SRLF=1,SRLINE="Medications: " I '$O(^SRF(SRTN,22,0)),SRALL D LINE(1) S @SRG@(SRI)=SRLINE_"N/A"
17 I $O(^SRF(SRTN,22,0)) D LINE(1) S @SRG@(SRI)=SRLINE D MED
18 D ^SRONRPT2
19 Q
20MED ; medications
21 N ADBY,ADM,COMMENT,DOSE,DRUG,MED,MM,ORBY,ROUTE,TIME
22 S MED=0 F S MED=$O(^SRF(SRTN,22,MED)) Q:'MED D
23 .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
24 ..S MM=^SRF(SRTN,22,MED,1,ADM,0),Y=$P(MM,"^") D D^DIQ S TIME=$P(Y,"@")_" "_$P(Y,"@",2)
25 ..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
26 ..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
27 ..S Y=$P(MM,"^",5),C=$P(^DD(130.34,4,0),"^",2) D:Y'="" Y^DIQ S ROUTE=Y
28 ..S COMMENT=$P(MM,"^",6) S:COMMENT="" COMMENT="N/A"
29 ..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
30 ..D LINE(1) S @SRG@(SRI)=" Ordered By: "_ORBY S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Admin By: "_ADBY
31 ..D LINE(1) S @SRG@(SRI)=" Comments: "_COMMENT
32 Q
33N(SRL) N SRN I $L(Y)>SRL S SRN=$P(Y,",")_","_$E($P(Y,",",2))_".",Y=SRN
34 Q
35PRO ; prosthesis
36 N C,ITEM,MODEL,PRO,QTY,SERIAL,SIZE,SRISC,SRSED,SRRN,STERILE,VENDOR
37 S PRO=0 F S PRO=$O(^SRF(SRTN,1,PRO)) Q:'PRO D
38 .S X=^SRF(SRTN,1,PRO,0),ITEM=$P(X,"^"),VENDOR=$P(X,"^",2),MODEL=$P(X,"^",3),SERIAL=$P(X,"^",5),Y=$P(X,"^",7),C=$P(^DD(130.01,5,0),"^",2) D:Y'="" Y^DIQ S STERILE=$S(Y'="":Y,1:"N/A")
39 .S X=$G(^SRF(SRTN,1,PRO,1)),SIZE=$P(X,"^"),QTY=$P(X,"^",2)
40 .S X=$G(^SRF(SRTN,1,PRO,2)),SRISC=$S($P(X,"^")="Y":"YES",1:$P(X,"^"))
41 .S Y=$P(X,"^",2),C=$P(^DD(130.01,9,0),"^",2) D:Y'="" Y^DIQ S SRSED=$S(Y="":"NOT ENTERED",1:Y)
42 .S Y=$P(X,"^",3),C=$P(^DD(130.01,10,0),"^",2) D:Y'="" Y^DIQ S SRRN=$S(Y="":"NOT ENTERED",1:Y)
43 .D LINE(1) S @SRG@(SRI)=" Item: "_$P(^SRO(131.9,ITEM,0),"^")
44 .D LINE(1) S @SRG@(SRI)=" Implant Sterility Checked (Y/N): "_$S(SRISC'="":SRISC,1:"NOT ENTERED")
45 .D LINE(1) S @SRG@(SRI)=" Sterility Expiration Date: "_SRSED
46 .D LINE(1) S @SRG@(SRI)=" RN Verifier: "_SRRN
47 .D LINE(1) S @SRG@(SRI)=" Vendor: "_$S(VENDOR'="":VENDOR,1:"N/A")
48 .D LINE(1) S @SRG@(SRI)=" Model: "_$S(MODEL'="":MODEL,1:"N/A")
49 .D LINE(1) S @SRG@(SRI)=" Lot/Serial Number: "_$S(SERIAL'="":SERIAL,1:"N/A"),@SRG@(SRI)=@SRG@(SRI)_$$SPACE(53)_"Sterile Resp: "_STERILE
50 .D LINE(1) S @SRG@(SRI)=" Size: "_$S(SIZE'="":SIZE,1:"N/A"),@SRG@(SRI)=@SRG@(SRI)_$$SPACE(53)_"Quantity: "_$S(QTY'="":QTY,1:"N/A")
51 Q
52THERM ; thermal unit
53 N OFF,ON,TEMP,TH,UNIT S TH=0 F S TH=$O(^SRF(SRTN,21,TH)) Q:'TH D
54 .S UNIT=^SRF(SRTN,21,TH,0),TEMP=$P(UNIT,"^",3),TEMP=$S(TEMP'="":TEMP,1:"N/A"),ON=$P(UNIT,"^",2),OFF=$P(UNIT,"^",4)
55 .D LINE(1) S @SRG@(SRI)=" "_$P(UNIT,"^"),@SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Temperature: "_TEMP
56 .S Y=ON D:Y D^DIQ S ON=$S(Y="":"N/A",1:$P(Y,"@")_" "_$P(Y,"@",2)),Y=OFF D:Y D^DIQ S OFF=$S(Y="":"N/A",1:$P(Y,"@")_" "_$P(Y,"@",2))
57 .D LINE(1) S @SRG@(SRI)=" Time On: "_ON,@SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Time Off: "_OFF
58 Q
59TOUR ; tourniquet info
60 N APBY,C,M,PRESS,SITE,TIME,TIME2,TOUR
61 S TOUR=0 F S TOUR=$O(^SRF(SRTN,2,TOUR)) Q:'TOUR D
62 .S M=^SRF(SRTN,2,TOUR,0),Y=$P(M,"^") D D^DIQ S TIME=$P(Y,"@")_" "_$P(Y,"@",2),Y=$P(M,"^",4) S TIME2="NOT ENTERED" I Y D D^DIQ S TIME2=$P(Y,"@")_" "_$P(Y,"@",2)
63 .D LINE(1) S @SRG@(SRI)=" Time Applied: "_TIME S @SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Time Released: "_TIME2
64 .S Y=$P(M,"^",2),C=$P(^DD(130.02,1,0),"^",2) D:Y'="" Y^DIQ S SITE=$S(Y="":"NOT ENTERED",1:Y),X=$P(M,"^",5),PRESS=$S(X="":"N/A",1:X)
65 .D LINE(1) S @SRG@(SRI)=" Site Applied: "_SITE,@SRG@(SRI)=@SRG@(SRI)_$$SPACE(40)_"Pressure Applied (in TORR): "_PRESS
66 .S Y=$P(M,"^",3),C=$P(^DD(130.02,2,0),"^",2) D:Y'="" Y^DIQ S APBY=$S(Y="":"N/A",1:Y) D LINE(1) S @SRG@(SRI)=" Applied By: "_APBY
67 Q
68SPACE(NUM) ; create spaces
69 ;pass in position returns number of needed spaces
70 I '$D(@SRG@(SRI)) S @SRG@(SRI)=""
71 Q $J("",NUM-$L(@SRG@(SRI)))
72LINE(NUM) ; create carriage returns
73 I $G(SRLF) S NUM=NUM+1,SRLF=0
74 F J=1:1:NUM S SRI=SRI+1,@SRG@(SRI)=""
75 Q
Note: See TracBrowser for help on using the repository browser.