source: WorldVistAEHR/trunk/r/SURGERY-SR/SROESAR0.m@ 1311

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

initial load of WorldVistAEHR

File size: 2.9 KB
Line 
1SROESAR0 ;BIR/ADM - ANESTHESIA REPORT E-SIG UTILITY ; [ 02/14/04 7:47 AM ]
2 ;;3.0; Surgery ;**100**;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 ;
8VIEW N SRJ,SRCAT,SRFLD,SRFILE,SRLN,SRNP,SRN,SRP,SRSUB,SRW,X,Y
9 F SRJ=1:1 S SRFLD=$P($T(FIELD+SRJ),";;",2) Q:SRFLD="" D
10 .S SRNP=$P(SRFLD,"^",3),SRN=$P(SRNP,";"),SRP=$P(SRNP,";",2)
11 .S (SRSUB,X)=$P(SRFLD,"^",2),Y=$P(X,"-",2),SRFILE=$P(Y,",")
12 .S SRCAT=$P(SRFLD,"^") S SRCAT=$S(SRCAT="":SRFILE,1:SRCAT)
13 .S SRW=$S($P(Y,";",2)["W":1,1:0) I SRW D Q
14 ..S ^TMP("SRARAD"_SRS,$J,SRTN,SRCAT,SRSUB,0)=$G(^SRF(SRTN,SRN,0))
15 ..I SRS=1 S ^TMP("SRASAVE",$J,SRTN,SRCAT,SRSUB,0)=$G(^SRF(SRTN,SRN,0))
16 ..S SRLN=0 F S SRLN=$O(^SRF(SRTN,SRN,SRLN)) Q:'SRLN S ^TMP("SRARAD"_SRS,$J,SRTN,SRCAT,SRSUB,SRLN)=$G(^SRF(SRTN,SRN,SRLN,0)) I SRS=1 S ^TMP("SRASAVE",$J,SRTN,SRCAT,SRSUB,SRLN)=$G(^SRF(SRTN,SRN,SRLN,0))
17 .S ^TMP("SRARAD"_SRS,$J,SRTN,SRCAT,SRSUB)=$P($G(^SRF(SRTN,SRN)),"^",SRP)
18 .I SRS=1 S ^TMP("SRASAVE",$J,SRTN,SRCAT,SRSUB)=$P($G(^SRF(SRTN,SRN)),"^",SRP)
19 Q
20REVRS ; restore before-edit data
21 N SRJ,SRCAT,SRFIELD,SRFILE,SRFLD,SRLN,SRNP,SRN,SRP,SRSUB,SRVAL,SRW,X,Y
22 F SRJ=1:1 S SRFLD=$P($T(FIELD+SRJ),";;",2) Q:SRFLD="" D
23 .S SRNP=$P(SRFLD,"^",3),SRN=$P(SRNP,";"),SRP=$P(SRNP,";",2)
24 .S (SRSUB,X)=$P(SRFLD,"^",2),Y=$P(X,"-",2),SRFILE=$P(Y,","),SRFIELD=$P(Y,",",2)
25 .S SRCAT=$P(SRFLD,"^") S SRCAT=$S(SRCAT="":SRFILE,1:SRCAT)
26 .Q:'$D(^TMP("SRARAD1",$J,SRTN,130,SRSUB))
27 .S SRW=$S($P(Y,";",2)["W":1,1:0) I SRW D Q
28 ..K ^SRF(SRTN,SRN) S ^SRF(SRTN,SRN,0)=$G(^TMP("SRASAVE",$J,SRTN,130,SRSUB,0))
29 ..S SRLN=0 F S SRLN=$O(^TMP("SRASAVE",$J,SRTN,130,SRSUB,SRLN)) Q:'SRLN S ^SRF(SRTN,SRN,SRLN,0)=$G(^TMP("SRASAVE",$J,SRTN,130,SRSUB,SRLN,0))
30 .S SRVAL=$G(^TMP("SRASAVE",$J,SRTN,130,SRSUB))
31 .I SRVAL="" S SRVAL="@"
32 .K DA,DIE,DR S DA=SRTN,DIE=130,DR=SRFIELD_"////^S X=SRVAL" D ^DIE K DA,DIE,DR
33 D REVRS^SROESARA
34 Q
35TR S SRP=SRI,SRP=$TR(SRP,"1234567890.,","ABCDEFGHIJPK")
36 Q
37FIELD ; list of fields (^field name on report-file,field^node;piece)
38KPJB ;;^Operating Room-130,.02^0;2
39KPAC ;;^ASA Class-130,1.13^1.1;3
40KPCA ;;^Principal Anesthetist-130,.31^.3;1
41KPCB ;;^Relief Anesthetist-130,.32^.3;2
42KPCC ;;^Assistant Anesthetist-130,.33^.3;3
43KPCD ;;^Anesthesiologist Supervisor-130,.34^.3;4
44KPCDE ;;^Attending Code (Anes Supervise Code)-130,.345^.3;6
45KBF ;;^Principal Procedure-130,26^OP;1
46KPBE ;;^Intraoperative Blood Loss (ml)-130,.25^.2;5
47KPBEE ;;^Total Urine Output (ml)-130,.255^.2;16
48KPDF ;;^Postoperative Disposition-130,.46^.4;6
49KPAA ;;^PAC(U) Admission Score-130,1.11^1.1;1
50KPAB ;;^PAC(U) Discharge Score-130,1.12^1.1;2
51KPBA ;;^Anesthesia Care Start Time-130,.21^.2;1
52KPBD ;;^Anesthesia Care End Time-130,.24^.2;4
53KPCF ;;^Minimum Intraoperative Temperature-130,.36^.3;7
54KPAI ;;^Postop Anesthesia Note Date/Time-130,1.19^1.1;9
55KACAPA ;;^Postop Anesthesia Note-130,130.1;W^48;0
56KPBH ;;^General Comments-130,.28;W^5;0
Note: See TracBrowser for help on using the repository browser.