A1B2OSR3 ;ALB/AAS - PRINT ODS SUMMARY REPORT ; 11-JAN-91
;;Version 1.55 (local for MAS v5 sites);;
;
;
RPRT ; --write report
D HDR^A1B2OSR2 W !
S X="Total Admissions",Y=$S($D(^UTILITY($J,"ODS-ADM-NAT")):^("ODS-ADM-NAT"),1:0) D LINE^A1B2OSR2 Q:A1B2QUIT
S X="Total Discharges",Y=$S($D(^UTILITY($J,"ODS-DIS-NAT")):^("ODS-DIS-NAT"),1:0) D LINE^A1B2OSR2 Q:A1B2QUIT
S X="Patients Treated",Y=Y+$S($D(^UTILITY($J,"ODS-PTRM-NAT")):^("ODS-PTRM-NAT"),1:0) D LINE^A1B2OSR2 Q:A1B2QUIT
S X="No. Unique Patients Admitted",Y=$S($D(^UTILITY($J,"ODS-UNQ-ADM-NAT")):^("ODS-UNQ-ADM-NAT"),1:0) D LINE^A1B2OSR2 Q:A1B2QUIT
I $D(^UTILITY($J,"ODS-UNQA-SPC-NAT")) W ! S X="No. Pts. Admitted to",Y="" D LINE^A1B2OSR2 Q:A1B2QUIT D SPC Q:A1B2QUIT
I $D(^UTILITY($J,"ODS-UNQA-BOS-NAT")) W ! S X="No. Pts. Admitted from",Y="" D LINE^A1B2OSR2 Q:A1B2QUIT D BOS Q:A1B2QUIT
W ! S X="No. ODS pts. to Non-VA Care",Y=$S($D(^UTILITY($J,"ODS-TRF-NVA-NAT")):^("ODS-TRF-NVA-NAT"),1:0) D LINE^A1B2OSR2 Q:A1B2QUIT
S X="No. Vets Displaced to Non-VA Care",Y=$S($D(^UTILITY($J,"ODS-DISP-NVA-NAT")):^("ODS-DISP-NVA-NAT"),1:0) D LINE^A1B2OSR2 Q:A1B2QUIT
S X="No. Vets Displaced to VA Care",Y=$S($D(^UTILITY($J,"ODS-DISP-VA-NAT")):^("ODS-DISP-VA-NAT"),1:0) D LINE^A1B2OSR2 Q:A1B2QUIT
F M=0:0 Q:($Y+6)>IOSL W !
W ?IOM-30,"DATE PRINTED: ",A1B2DATE,!
Q
;
SPC S SPC="" F J=0:0 S SPC=$O(^UTILITY($J,"ODS-UNQA-SPC-NAT",SPC)) Q:SPC=""!(A1B2QUIT) S Y=^(SPC),X=$P($T(@(SPC)),";",3) D LINE^A1B2OSR2 Q:A1B2QUIT
Q
;
BOS S BOS="" F J=0:0 S BOS=$O(^UTILITY($J,"ODS-UNQA-BOS-NAT",BOS)) Q:BOS=""!(A1B2QUIT) S Y=^(BOS),X=$S($D(^DIC(23,BOS,0)):$P(^(0),"^"),1:"UNKNOWN") D LINE^A1B2OSR2 Q:A1B2QUIT
Q
;
M ;;Medicine
S ;;Surgery
R ;;Rehab Medicine
P ;;Psychiatry
NH ;;NHCU
I ;;Intermediate
SCI ;;Spinal Cord Injury
D ;;Domiciliary
B ;;Blind Rehab
RE ;;Respite Care
NE ;;Neurology
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HA1B2OSR3 1871 printed Nov 22, 2024@17:31:23 Page 2
A1B2OSR3 ;ALB/AAS - PRINT ODS SUMMARY REPORT ; 11-JAN-91
+1 ;;Version 1.55 (local for MAS v5 sites);;
+2 ;
+3 ;
RPRT ; --write report
+1 DO HDR^A1B2OSR2
WRITE !
+2 SET X="Total Admissions"
SET Y=$SELECT($DATA(^UTILITY($JOB,"ODS-ADM-NAT")):^("ODS-ADM-NAT"),1:0)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+3 SET X="Total Discharges"
SET Y=$SELECT($DATA(^UTILITY($JOB,"ODS-DIS-NAT")):^("ODS-DIS-NAT"),1:0)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+4 SET X="Patients Treated"
SET Y=Y+$SELECT($DATA(^UTILITY($JOB,"ODS-PTRM-NAT")):^("ODS-PTRM-NAT"),1:0)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+5 SET X="No. Unique Patients Admitted"
SET Y=$SELECT($DATA(^UTILITY($JOB,"ODS-UNQ-ADM-NAT")):^("ODS-UNQ-ADM-NAT"),1:0)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+6 IF $DATA(^UTILITY($JOB,"ODS-UNQA-SPC-NAT"))
WRITE !
SET X="No. Pts. Admitted to"
SET Y=""
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
DO SPC
if A1B2QUIT
QUIT
+7 IF $DATA(^UTILITY($JOB,"ODS-UNQA-BOS-NAT"))
WRITE !
SET X="No. Pts. Admitted from"
SET Y=""
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
DO BOS
if A1B2QUIT
QUIT
+8 WRITE !
SET X="No. ODS pts. to Non-VA Care"
SET Y=$SELECT($DATA(^UTILITY($JOB,"ODS-TRF-NVA-NAT")):^("ODS-TRF-NVA-NAT"),1:0)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+9 SET X="No. Vets Displaced to Non-VA Care"
SET Y=$SELECT($DATA(^UTILITY($JOB,"ODS-DISP-NVA-NAT")):^("ODS-DISP-NVA-NAT"),1:0)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+10 SET X="No. Vets Displaced to VA Care"
SET Y=$SELECT($DATA(^UTILITY($JOB,"ODS-DISP-VA-NAT")):^("ODS-DISP-VA-NAT"),1:0)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+11 FOR M=0:0
if ($Y+6)>IOSL
QUIT
WRITE !
+12 WRITE ?IOM-30,"DATE PRINTED: ",A1B2DATE,!
+13 QUIT
+14 ;
SPC SET SPC=""
FOR J=0:0
SET SPC=$ORDER(^UTILITY($JOB,"ODS-UNQA-SPC-NAT",SPC))
if SPC=""!(A1B2QUIT)
QUIT
SET Y=^(SPC)
SET X=$PIECE($TEXT(@(SPC)),";",3)
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+1 QUIT
+2 ;
BOS SET BOS=""
FOR J=0:0
SET BOS=$ORDER(^UTILITY($JOB,"ODS-UNQA-BOS-NAT",BOS))
if BOS=""!(A1B2QUIT)
QUIT
SET Y=^(BOS)
SET X=$SELECT($DATA(^DIC(23,BOS,0)):$PIECE(^(0),"^"),1:"UNKNOWN")
DO LINE^A1B2OSR2
if A1B2QUIT
QUIT
+1 QUIT
+2 ;
M ;;Medicine
S ;;Surgery
R ;;Rehab Medicine
P ;;Psychiatry
NH ;;NHCU
I ;;Intermediate
SCI ;;Spinal Cord Injury
D ;;Domiciliary
B ;;Blind Rehab
RE ;;Respite Care
NE ;;Neurology