1 | A1B2OSR2 ;ALB/AAS - PRINT ODS SUMMARY REPORT ; 11-JAN-91
|
---|
2 | ;;Version 1.55 (local for MAS v5 sites);;
|
---|
3 | ;
|
---|
4 | % S CNTF=0,PAGE=0,TAB=IOM/2,A1B2QUIT=0 S Y=DT D D^DIQ S A1B2DATE=Y
|
---|
5 | I '$D(^UTILITY($J)) W !,"No Matches Found"
|
---|
6 | I 'A1B2NSR S FAC="" F I=0:0 S FAC=$O(^UTILITY($J,"ODS-FAC",FAC)) Q:FAC=""!(A1B2QUIT) S CNTF=CNTF+1 D RPRT,PAUSE:'A1B2QUIT Q:A1B2QUIT
|
---|
7 | ;I 'A1B2QUIT S A1B2NSR=1 D ^A1B2OSR3
|
---|
8 | G END
|
---|
9 | Q
|
---|
10 | ;
|
---|
11 | PAUSE I $E(IOST,1,2)["C-" S DIR(0)="E" D ^DIR S A1B2QUIT='Y
|
---|
12 | Q
|
---|
13 | LINE ; --write line in report
|
---|
14 | I ($Y+6)>IOSL S A1B2X=X,A1B2Y=Y D PAUSE Q:A1B2QUIT D HDR S X=A1B2X,Y=A1B2Y
|
---|
15 | W !?(TAB-$L(X)),X,": ",Y Q
|
---|
16 | ;
|
---|
17 | RPRT ; --write report
|
---|
18 | D HDR W !
|
---|
19 | S X="Total Admissions",Y=$S($D(^UTILITY($J,"ODS-ADM",FAC)):^(FAC),1:0) D LINE Q:A1B2QUIT
|
---|
20 | S X="Total Discharges",Y=$S($D(^UTILITY($J,"ODS-DIS",FAC)):^(FAC),1:0) D LINE Q:A1B2QUIT
|
---|
21 | S X="Patients Treated",Y=Y+$S($D(^UTILITY($J,"ODS-PTRM",FAC)):^(FAC),1:0) D LINE Q:A1B2QUIT
|
---|
22 | S X="No. Unique Patients Admitted",Y=$S($D(^UTILITY($J,"ODS-UNQ-ADM",FAC)):^(FAC),1:0) D LINE Q:A1B2QUIT
|
---|
23 | I $D(^UTILITY($J,"ODS-UNQA-SPC",FAC)) W ! S X="No. Pts. Admitted to",Y="" D LINE Q:A1B2QUIT D SPC Q:A1B2QUIT
|
---|
24 | I $D(^UTILITY($J,"ODS-UNQA-BOS",FAC)) W ! S X="No. Pts. Admitted from",Y="" D LINE Q:A1B2QUIT D BOS Q:A1B2QUIT
|
---|
25 | W ! S X="No. ODS pts. to Non-VA Care",Y=$S($D(^UTILITY($J,"ODS-TRF-NVA",FAC)):^(FAC),1:0) D LINE Q:A1B2QUIT
|
---|
26 | S X="No. Vets Displaced to Non-VA Care",Y=$S($D(^UTILITY($J,"ODS-DISP-NVA",FAC)):^(FAC),1:0) D LINE Q:A1B2QUIT
|
---|
27 | S X="No. Vets Displaced to VA Care",Y=$S($D(^UTILITY($J,"ODS-DISP-VA",FAC)):^(FAC),1:0) D LINE Q:A1B2QUIT
|
---|
28 | F M=0:0 Q:($Y+6)>IOSL W !
|
---|
29 | W ?IOM-30,"DATE PRINTED: ",A1B2DATE
|
---|
30 | Q
|
---|
31 | ;
|
---|
32 | HDR S PAGE=PAGE+1,X="OPERATION DESERT SHIELD" W @IOF,?(IOM-$L(X))/2,X,?(IOM-10),"PAGE: ",PAGE
|
---|
33 | S X="STATISTICAL SUMMARY REPORT" W !!,?(IOM-$L(X))/2,X
|
---|
34 | I A1B2NSR S X="Medical Center Summary Report" W !!,?(IOM-$L(X))/2,X
|
---|
35 | I 'A1B2NSR S Y=FAC_" - "_^UTILITY($J,"ODS-FAC",FAC)
|
---|
36 | I 'A1B2NSR S X="Medical Center: "_Y W !!,?(IOM-$L(X))/2,X
|
---|
37 | S X="For Period: " S Y=A1B2BDT D D^DIQ S Y1=Y,Y=A1B2EDT/1 D D^DIQ S X=X_Y1_" to "_Y W !!,?(IOM-$L(X))/2,X
|
---|
38 | S X="-----------------------------" W !,?(IOM-$L(X))/2,X
|
---|
39 | I A1B2NSR S X="-----------------------------" W !,?(IOM-$L(X))/2,X
|
---|
40 | Q
|
---|
41 | ;
|
---|
42 | SPC S X1="" F J=0:0 S X1=$O(^UTILITY($J,"ODS-UNQA-SPC",FAC,X1)) Q:X1=""!(A1B2QUIT) S Y=^(X1),X=$P($T(@(X1)),";",3) D LINE Q:A1B2QUIT
|
---|
43 | Q
|
---|
44 | ;
|
---|
45 | BOS S X1="" F J=0:0 S X1=$O(^UTILITY($J,"ODS-UNQA-BOS",FAC,X1)) Q:X1=""!(A1B2QUIT) S Y=^(X1),X=$S($D(^DIC(23,X1,0)):$P(^(0),"^"),1:"UNKNOWN") D LINE Q:A1B2QUIT
|
---|
46 | Q
|
---|
47 | ;
|
---|
48 | END Q
|
---|
49 | Q
|
---|
50 | ;
|
---|
51 | M ;;Medicine
|
---|
52 | S ;;Surgery
|
---|
53 | R ;;Rehab Medicine
|
---|
54 | P ;;Psychiatry
|
---|
55 | NH ;;NHCU
|
---|
56 | I ;;Intermediate
|
---|
57 | SCI ;;Spinal Cord Injury
|
---|
58 | D ;;Domiciliary
|
---|
59 | B ;;Blind Rehab
|
---|
60 | RE ;;Respite Care
|
---|
61 | NE ;;Neurology
|
---|