source: FOIAVistA/trunk/r/SURGERY-SR/SRONON.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1SRONON ;B'HAM ISC/ADM - NON-O.R. PROCEDURE REPORT ; [ 02/18/04 9:55 AM ]
2 ;;3.0; Surgery ;**48,77,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 ;
8 I '$D(SRSITE) D ^SROVAR G:'$D(SRSITE) END S SRSITE("KILL")=1
9 I '$D(SRTN) D NON G:'$D(SRTN) END S SRTN("KILL")=1
10 N SREXP,SRSINED,SRDTITL,SRSTAT,SRTIU
11 S SRDTITL="Procedure Report"
12 S SRSINED=0,SRTIU=$P($G(^SRF(SRTN,"TIU")),"^",3)
13 I SRTIU S SRSTAT=$$STATUS^SROESUTL(SRTIU) S:SRSTAT=7 SRSINED=1
14 D DISPLY,END
15 Q
16DISPLY I SRSINED S SRTIU=$P($G(^SRF(SRTN,"TIU")),"^",3) I SRTIU D PRNT^SROESPR(SRTN,SRTIU,SRDTITL) Q
17 I 'SRSINED S SREXP=$P($G(^SRF(SRTN,"TIU")),"^",5) D D LAST
18 .I 'SREXP W !!," * * A Procedure Report (Non-OR) will not be created for this procedure. * *" Q
19 .W !!," * * A Procedure Report (Non-OR) is not available. * *"
20 Q
21END W @IOF I $D(ZTQUEUED) Q:$G(ZTSTOP) S ZTREQ="@" Q
22 D ^SRSKILL K VAIN,VAINDT I $D(SRSITE("KILL")) K SRSITE
23 I $D(SRTN("KILL")) K SRTN
24 Q
25NON K DIC S DIC("A")="Select Patient: ",DIC=2,DIC(0)="QEAMZ" D ^DIC I Y<0 S SRSOUT=1 G END
26 S DFN=+Y D DEM^VADPT S SRNM=VADM(1)
27 W @IOF,!,"Non-O.R. Procedures for "_SRNM_" ("_VA("PID")_")" I $D(^DPT(DFN,.35)) S Y=$P(^(.35),"^") I Y D D^DIQ S Y=$P(Y,"@")_" "_$P(Y,"@",2) W !," (DIED ON "_Y_")"
28 W !! S (SROP,CNT)=0 F I=0:0 S SROP=$O(^SRF("ANOR",DFN,SROP)) Q:'SROP D LIST
29SEL W !!!,"Select Procedure: " R X:DTIME I '$T!("^"[X) G END
30 I '$D(SRCASE(X)) W !!,"Enter the number corresponding to the procedure for which you want to print",!,"a report." G SEL
31 S SRTN=+SRCASE(X)
32 Q
33LIST ; list case
34 I $Y+5>IOSL S SRBACK=0 D SEL^SROPER Q:$D(SRTN)!(SRSOUT) W @IOF,!,?1,"NON-O.R. PROCEDURES FOR "_VADM(1)_" ("_VA("PID")_")",! I SRBACK S CNT=0,SROP=SRCASE(1)-1,SRDT=$P(SRCASE(1),"^",2)
35 S CNT=CNT+1,SRSDATE=$P(^SRF(SROP,0),"^",9),SROPER=$P(^SRF(SROP,"OP"),"^"),SRCASE(CNT)=SROP
36 K SROPS,MM,MMM S:$L(SROPER)<55 SROPS(1)=SROPER I $L(SROPER)>54 S SROPER=SROPER_" " F M=1:1 D LOOP Q:MMM=""
37 S Y=SRSDATE D D^DIQ S SRSDATE=$P(Y,"@")_" "_$P(Y,"@",2)
38 W !,CNT_".",?4,SRSDATE,?25,SROPS(1) I $D(SROPS(2)) W !,?25,SROPS(2) I $D(SROPS(3)) W !,?25,SROPS(3) I $D(SROPS(4)) W !,?25,SROPS(4)
39 W !
40 Q
41LOOP ; break procedure if greater than 55 characters
42 S SROPS(M)="" F LOOP=1:1 S MM=$P(SROPER," "),MMM=$P(SROPER," ",2,200) Q:MMM="" Q:$L(SROPS(M))+$L(MM)'<55 S SROPS(M)=SROPS(M)_MM_" ",SROPER=MMM
43 Q
44LAST W ! K DIR S DIR(0)="E" D ^DIR K DIR
45 Q
46CODE ; entry point from coding menu
47 N SREXP,SRSINED,SRDTITL,SRSTAT,SRTIU
48 S SRDTITL="Procedure Report"
49 S SRSINED=0,SRTIU=$P($G(^SRF(SRTN,"TIU")),"^",3)
50 I SRTIU S SRSTAT=$$STATUS^SROESUTL(SRTIU) S:SRSTAT=7 SRSINED=1
51 D DISPLY,END
52 Q
Note: See TracBrowser for help on using the repository browser.