source: FOIAVistA/trunk/r/SURGERY-SR/SROAPRT3.m@ 1535

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1SROAPRT3 ;BIR/MAM - PRINT OPERATION INFO ;01/23/07
2 ;;3.0; Surgery ;**38,47,63,81,88,95,125,142,153,160**;24 Jun 93;Build 7
3 K SRAO S (SRAO(7),SRAO(8))="",SRA("OP")=^SRF(SRTN,"OP")
4 S SRAO(2)="^1" K SROPS S SROPER=$P(SRA("OP"),"^")
5 S:$L(SROPER)<49 SROPS(1)=SROPER K M,MM,MMM I $L(SROPER)>48 S SROPER=SROPER_" " F M=1:1 D LOOP Q:MMM=""
6 S SRA(0)=^SRF(SRTN,0),X=$P(SRA(0),"^",4) S:X X=$P(^SRO(137.45,X,0),"^") S SRAO(2)=X_"^.04"
7 W !,?29,"OPERATIVE INFORMATION",!!,$J("Surgical Specialty: ",39)_$P(SRAO(2),"^")
8 W !!,$J("Principal Operation: ",39)_SROPS(1) I $D(SROPS(2)) W !,?40,SROPS(2) I $D(SROPS(3)) W !,?40,SROPS(3)
9 D ^SROAOTH
10 S X=$P(SRA(200),"^",52),SRAO(9)=X_"^214",NYUK=$P(SRA(0),"^",10),NYUK=$S(NYUK="EM":"YES",1:"NO") S SRAO(10)=NYUK_"^.035"
11 S Y=$P($G(^SRF(SRTN,"1.0")),"^",8),C=$P(^DD(130,1.09,0),"^",2) D:Y'="" Y^DIQ S SRAO(11)=Y_"^1.09"
12 S NYUK=$P(SRA(200),"^",53) D YN S SRAO(12)=SHEMP_"^201"
13 S Y=$P($G(^SRF(SRTN,1.1)),"^",3),C=$P(^DD(130,1.13,0),"^",2) D:Y'="" Y^DIQ S SRAO(13)=Y_"^1.13"
14 D TECH^SROPRIN S SRAO(14)=SRTECH
15 S X=$P(SRA(200),"^",54),SRAO(15)=X_"^340"
16 S Y=$P($G(^SRF(SRTN,200.1)),"^",4),C=$P(^DD(130,443,0),"^",2) D:Y'="" Y^DIQ S SRAO(5)=Y_"^443"
17 S Y=$P($G(^SRF(SRTN,200.1)),"^",6),C=$P(^DD(130,446,0),"^",2) D:Y'="" Y^DIQ S SRAO(6)=Y_"^446"
18 I $E(IOST)'="P" D PAGE^SROAPAS Q:SRSOUT W !,?29,"OPERATIVE INFORMATION",!
19 W !,$J("PGY of Primary Surgeon: ",39)_$P(SRAO(9),"^") W !,$J("Emergency Case (Y/N): ",39)_$P(SRAO(10),"^")
20 W !,$J("Wound Classification: ",39)_$P(SRAO(11),"^")
21 W !,$J("ASA Classification: ",39)_$P(SRAO(13),"^")
22 W !,$J("Principal Anesthesia Technique: ",39)_$P(SRAO(14),"^")
23 W !,$J("RBC Units Transfused: ",39)_$P(SRAO(15),"^")
24 W !,$J("Intraop Disseminated Cancer: ",39)_$P(SRAO(5),"^")
25 W !,$J("Intraoperative Ascites: ",39)_$P(SRAO(6),"^")
26 I $E(IOST)="P" W !!
27 Q
28YN S SHEMP=$S(NYUK="NS":"NS",NYUK="N":"NO",NYUK="Y":"YES",1:"")
29 Q
30LOOP ; break procedures
31 S SROPS(M)="" F LOOP=1:1 S MM=$P(SROPER," "),MMM=$P(SROPER," ",2,200) Q:MMM="" Q:$L(SROPS(M))+$L(MM)'<49 S SROPS(M)=SROPS(M)_MM_" ",SROPER=MMM
32 Q
33OPTIMES ; print operation times
34 K SRAO F I=1:1:7 S SRAO(I)=""
35 W !,?24,"OPERATION DATE/TIMES INFORMATION"
36 S X=$G(^SRF(SRTN,.2)),SRAO(1)=$P(X,"^",10),SRAO(2)=$P(X,"^",2),SRAO(3)=$P(X,"^",3),SRAO(4)=$P(X,"^",12),SRAO(5)=$P(X,"^"),SRAO(6)=$P(X,"^",4),SRAO(7)=$P($G(^SRF(SRTN,1.1)),"^",8)
37 F SRI=1:1:7 S Y=SRAO(SRI) I Y X ^DD("DD") S X=$P(Y,"@")_" "_$P(Y,"@",2),SRAO(SRI)=X
38 W !!,$J("Patient in Room (PIR): ",39)_SRAO(1),!,$J("Procedure/Surgery Start Time (PST): ",39)_SRAO(2),!,$J("Procedure/Surgery Finish (PF): ",39)_SRAO(3)
39 W !,$J("Patient Out of Room (POR): ",39)_SRAO(4),!,$J("Anesthesia Start (AS): ",39)_SRAO(5),!,$J("Anesthesia Finish (AF): ",39)_SRAO(6),!,$J("Discharge from PACU (DPACU): ",39)_SRAO(7)
40 I $E(IOST)="P" W !
41 Q
Note: See TracBrowser for help on using the repository browser.