source: FOIAVistA/trunk/r/SURGERY-SR/SROALSL.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1SROALSL ;BIR/ADM - SUMMARY LIST OF ASSESSED CASES ;11/13/07
2 ;;3.0; Surgery ;**166**;24 Jun 93;Build 6
3 N SRTOT,SRINC,SRCOM,SRTR,SREX
4 S (GRAND,SRSOUT,SRTOT,SRINC,SRCOM,SRTR,SREX)=0,(SRHDR,SRPAGE)=1,SRTITLE="SUMMARY LIST OF ASSESSED CASES" K ^TMP("SRA",$J)
5 N SRJ,SRNM S SRJ=0 F S SRJ=$O(^SRO(137.45,SRJ)) Q:'SRJ S SRNM=$P(^SRO(137.45,SRJ,0),"^"),^TMP("SRA",$J,SRNM)="0^0^0^0^0"
6 ; total assessments^incomplete^complete^transmitted^excluded"
7 S ^TMP("SRA",$J,"SPECIALTY NOT ENTERED")="0^0^0^0^0"
8 F S SRSD=$O(^SRF("AC",SRSD)) Q:'SRSD!(SRSD>SRED)!SRSOUT S SRTN=0 F S SRTN=$O(^SRF("AC",SRSD,SRTN)) Q:'SRTN!SRSOUT I $D(^SRF(SRTN,0)),$$MANDIV^SROUTL0(SRINSTP,SRTN) D UTL
9 I SRFLG,SRASP S SRSPEC=$P(^SRO(137.45,SRASP,0),"^") D SRASP Q
10 I SRSP S SRNM="" F S SRNM=$O(^TMP("SRA",$J,SRNM)) Q:SRNM="" D SRSS Q:SRSOUT
11 I $Y+5>IOSL!SRHDR D PAGE I SRSOUT Q
12 D TOT
13 Q
14UTL ; set up TMP global
15 N SRJ,SRK,SRST I '$P($G(^SRF(SRTN,.2)),"^",3)&'$P($G(^SRF(SRTN,.2)),"^",12) Q
16 I $P($G(^SRF(SRTN,30)),"^") Q
17 S SRJ=$P(^SRF(SRTN,0),"^",4) I SRFLG,SRJ'=SRASP Q
18 S SRNM=$S(SRJ:$P(^SRO(137.45,SRJ,0),"^"),1:"SPECIALTY NOT ENTERED")
19 S SRA=$G(^SRF(SRTN,"RA")) I $P(SRA,"^",2)="N",$P(SRA,"^",7)'="" D EXCL Q
20 Q:$P(SRA,"^",6)'="Y"
21 S SRST=$P(SRA,"^") Q:SRST=""!("ICT"'[SRST) D
22 .S $P(^TMP("SRA",$J,SRNM),"^")=$P(^TMP("SRA",$J,SRNM),"^")+1,SRTOT=SRTOT+1
23 .I SRST="I" S $P(^TMP("SRA",$J,SRNM),"^",2)=$P(^TMP("SRA",$J,SRNM),"^",2)+1,SRINC=SRINC+1 Q
24 .I SRST="C" S $P(^TMP("SRA",$J,SRNM),"^",3)=$P(^TMP("SRA",$J,SRNM),"^",3)+1,SRCOM=SRCOM+1 Q
25 .S $P(^TMP("SRA",$J,SRNM),"^",4)=$P(^TMP("SRA",$J,SRNM),"^",4)+1,SRTR=SRTR+1
26 Q
27SRSS ;
28 I $Y+5>IOSL!SRHDR D PAGE I SRSOUT Q
29 S SRX=^TMP("SRA",$J,SRNM) Q:'$P(SRX,"^")
30 W !,$E(SRNM,1,30),?37,$J($P(SRX,"^",2),5),?48,$J($P(SRX,"^",3),5),?60,$J($P(SRX,"^",4),5),?72,$J($P(SRX,"^",5),5)
31 Q
32SRASP D HDR S SRX=^TMP("SRA",$J,SRSPEC) W !,$E(SRSPEC,1,30),?37,$J($P(SRX,"^",2),5),?48,$J($P(SRX,"^",3),5),?60,$J($P(SRX,"^",4),5),?72,$J($P(SRX,"^",5),5)
33 Q
34EXCL ; add excluded cases
35 S $P(^TMP("SRA",$J,SRNM),"^")=$P(^TMP("SRA",$J,SRNM),"^")+1,SRTOT=SRTOT+1
36 S $P(^TMP("SRA",$J,SRNM),"^",5)=$P(^TMP("SRA",$J,SRNM),"^",5)+1,SREX=SREX+1
37 Q
38PAGE I $E(IOST)="P"!SRHDR G HDR
39 W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
40 I X["?" W !!,"If you want to continue the listing, press the 'Enter' key.",!,"Type '^' to return to the menu." G PAGE
41HDR ; print heading
42 W @IOF,!,?(80-$L(SRTITLE)\2),SRTITLE,?70,$J("PAGE "_SRPAGE,9) W:$E(IOST)="P" !,?(80-$L(SRINST)\2),SRINST W !,?(80-$L(SRFRTO)\2),SRFRTO
43 W:$E(IOST)="P" !,?(80-$L(SRPRINT)\2),SRPRINT
44 W !!,"SURGICAL SPECIALTY",?33,"INCOMPLETE | COMPLETE | TRANSMITTED | EXCLUDED",! F LINE=1:1:80 W "="
45 S SRHDR=0,SRPAGE=SRPAGE+1
46 Q
47TOT W !!,"TOTAL FOR ALL SPECIALTIES: ",?37,$J(SRINC,5),?48,$J(SRCOM,5),?60,$J(SRTR,5),?72,$J(SREX,5)
48 Q
Note: See TracBrowser for help on using the repository browser.