source: FOIAVistA/trunk/r/SURGERY-SR/SROATT0.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1SROATT0 ;B'HAM ISC/MAM - ATTENDING SURGEON REPORT (1 SURGEON) ; [ 05/11/04 2:33 PM ]
2 ;;3.0; Surgery ;**50,129**;24 Jun 93
3 W !! K DIC S DIC=200,DIC(0)="QEAMZ",DIC("A")="Print the Report for which Attending Surgeon ? " D ^DIC I Y<0 S SRSOUT=1 G END
4 S SRATT=+Y
5REPORT W !!,"Do you want to view the totals for attending codes only ? NO// " R SRYN:DTIME I '$T!(SRYN["^") S SRSOUT=1 G END
6 S SRYN=$E(SRYN) S:SRYN="" SRYN="N"
7 I "YyNn"'[SRYN W !!,"Enter RETURN to dispay individual case information and the total number of",!,"cases for each code. If you only want to display the totals for the attending",!,"codes, enter 'YES'." G REPORT
8 S SRBOTH=1 I "Yy"[SRYN S SRBOTH=0
9 W:SRBOTH !!,"This report is designed to use a 132 column format."
10 W:'SRBOTH !!,"This report is designed to use an 80 column format."
11 W ! K IOP,POP,IO("Q"),%ZIS S %ZIS="QM",%ZIS("A")="Print the report on which Device ? " D ^%ZIS I POP S SRSOUT=1 G END
12 I $D(IO("Q")) K IO("Q") S ZTDESC="Attending Surgeon Report",ZTRTN="EN^SROATT0",(ZTSAVE("SRSD"),ZTSAVE("SRED"),ZTSAVE("SRATT"),ZTSAVE("SRBOTH"),ZTSAVE("SRSITE*"))="" D ^%ZTLOAD G END
13EN ; entry when queued
14 U IO S SRSOUT=0,SRINST=SRSITE("SITE"),SRINSTP=SRSITE("DIV"),Y=DT X ^DD("DD") S SRPRINT="DATE PRINTED: "_Y S Y=SRSD X ^DD("DD") S SRFRTO="FROM: "_Y_" TO: ",Y=SRED X ^DD("DD") S SRFRTO=SRFRTO_Y
15 K ^TMP("SR",$J),^TMP("SRTOT",$J)
16 S ^TMP("SRTOT",$J)=0,^TMP("SRTOT",$J,"ZZ")=0
17 S SRSDATE=SRSD-.0001,SREDT=SRED+.9999 F S SRSDATE=$O(^SRF("AC",SRSDATE)) Q:'SRSDATE!(SRSDATE>SREDT) S SRTN=0 F S SRTN=$O(^SRF("AC",SRSDATE,SRTN)) Q:'SRTN I $D(^SRF(SRTN,0)),$$DIV^SROUTL0(SRTN) D UTIL
18 S SRATT="ATTENDING SURGEON: "_$P(^VA(200,SRATT,0),"^"),SRATT1="" F LINE=1:1:$L(SRATT) S SRATT1=SRATT1_"-"
19 I SRBOTH D ^SROAT0P G:SRSOUT END
20 D ^SROAT0T
21END I $E(IOST)'="P",'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
22 W:$E(IOST)="P" @IOF K ^TMP("SRTOT",$J) I $D(ZTQUEUED) K ^TMP("SR",$J) Q:$G(ZTSTOP) S ZTREQ="@" Q
23 D ^%ZISC K SRTN D ^SRSKILL W @IOF
24 Q
25UTIL I '$D(^SRF(SRTN,.2))!'$D(^SRF(SRTN,.1)) Q
26 I '$P(^SRF(SRTN,.2),"^",12) Q
27 S X=$P(^SRF(SRTN,.1),"^",13) I X'=SRATT Q
28 S SRCODE=$P(^SRF(SRTN,.1),"^",10) S:SRCODE="" SRCODE="ZZ"
29 I '$D(^TMP("SRTOT",$J,SRCODE)) S ^TMP("SRTOT",$J,SRCODE)=0
30 S ^TMP("SR",$J,SRSDATE,SRTN)="",^TMP("SRTOT",$J)=^TMP("SRTOT",$J)+1,^TMP("SRTOT",$J,SRCODE)=^TMP("SRTOT",$J,SRCODE)+1
Note: See TracBrowser for help on using the repository browser.