PSGWARP ;BHAM ISC/PTD,CML-Print AMIS Report - CONTINUED ; 23 Mar 93 / 12:43 PM
;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
HDR ;PRINT REPORT MAIN HEADER
W:$Y @IOF W !,?43,"AUTOMATIC REPLENISHMENT/WARD STOCK AMIS REPORT",!?46,"FOR INPATIENT SITE: ",SITE(SITE),!!?11,"FROM " S Y=BDT X ^DD("DD") W Y," TO " S Y=EDT X ^DD("DD") W Y
W ?93,"PRINTED ON: ",$$PSGWDT^PSGWUTL1,! F J=1:1:132 W "-"
Q
;
SUB1 ;PRINT SUB-HEADER FOR SECTION 1: DOSES BY TYPE.
W !,"(INPATIENT SEGMENT 158)",!?3,"DOSES BY TYPE:",!?116,"AVERAGE",!?6,"FIELD",?19,"DOSES",?33,"COST OF",?50,"DOSES",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?115,"COST PER"
W !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"DOSE",!," " F J=1:1:120 W "-"
Q
;
SUB2 ;PRINT SUB-HEADER FOR SECTION 2: UNITS OF ISSUE.
W !!?3,"UNITS OF ISSUE:",!?116,"AVERAGE",!?6,"FIELD",?19,"UNITS",?33,"COST OF",?50,"UNITS",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?115,"COST PER"
W !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"UNIT",!," " F J=1:1:120 W "-"
Q
;
SUB3 ;PRINT SUB-HEADER FOR SECTION 3: FLUIDS & ADMIN SETS.
W !!?3,"FLUIDS AND ADMINISTRATION SETS:",!?116,"AVERAGE",!?6,"FIELD",?33,"COST OF",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?117,"UNIT"
W !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"COST",!," " F J=1:1:120 W "-"
Q
SUB4 ;PRINT SUB-HEADER FOR SECTION 4: BLOOD AND BLOOD PRODUCTS.
W !!!,"(OUTPATIENT SEGMENT 157)",!?3,"BLOOD AND BLOOD PRODUCTS:",!?116,"AVERAGE",!?6,"FIELD",?33,"COST OF",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?117,"UNIT"
W !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"COST",!," " F J=1:1:120 W "-"
Q
;
SUMRY ;PRINT SUMMARY OF FIELDS THAT ARE ACTUALLY REPORTED ON AMIS
S $P(LN,"-",23)="" W !!!!?52,"SUMMARY OF REPORTED FIELDS:",!!?34,"INPATIENT SEGMENT 158",?75,"OUTPATIENT SEGMENT 157",!?33,LN,?75,LN
W !?33,"FIELD 03 ",$J($P(LOC("03"),"^",5),10,0),?75,"FIELD 22 ",$J($P(LOC("22"),"^",6),10,2),!?33,"FIELD 04 ",$J($P(LOC("04"),"^",5),10,0),!?33,"FIELD 05 ",$J($P(LOC("05"),"^",7),10,2)
W !?33,"FIELD 06 ",$J($P(LOC("06"),"^",5),10,0),!?33,"FIELD 07 ",$J($P(LOC("07"),"^",5),10,0),!?33,"FIELD 08 ",$J($P(LOC("08"),"^",7),10,2)
W !?33,"FIELD 17 ",$J($P(LOC("17"),"^",5),10,0),!?33,"FIELD 18 ",$J($P(LOC("18"),"^",7),10,2)
Q
PSGWARP ;BHAM ISC/PTD,CML-Print AMIS Report - CONTINUED ; 23 Mar 93 / 12:43 PM
+1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
HDR ;PRINT REPORT MAIN HEADER
+1 IF $Y
WRITE @IOF
WRITE !,?43,"AUTOMATIC REPLENISHMENT/WARD STOCK AMIS REPORT",!?46,"FOR INPATIENT SITE: ",SITE(SITE),!!?11,"FROM "
SET Y=BDT
XECUTE ^DD("DD")
WRITE Y," TO "
SET Y=EDT
XECUTE ^DD("DD")
WRITE Y
+2 WRITE ?93,"PRINTED ON: ",$$PSGWDT^PSGWUTL1,!
FOR J=1:1:132
WRITE "-"
+3 QUIT
+4 ;
SUB1 ;PRINT SUB-HEADER FOR SECTION 1: DOSES BY TYPE.
+1 WRITE !,"(INPATIENT SEGMENT 158)",!?3,"DOSES BY TYPE:",!?116,"AVERAGE",!?6,"FIELD",?19,"DOSES",?33,"COST OF",?50,"DOSES",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?115,"COST PER"
+2 WRITE !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"DOSE",!," "
FOR J=1:1:120
WRITE "-"
+3 QUIT
+4 ;
SUB2 ;PRINT SUB-HEADER FOR SECTION 2: UNITS OF ISSUE.
+1 WRITE !!?3,"UNITS OF ISSUE:",!?116,"AVERAGE",!?6,"FIELD",?19,"UNITS",?33,"COST OF",?50,"UNITS",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?115,"COST PER"
+2 WRITE !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"UNIT",!," "
FOR J=1:1:120
WRITE "-"
+3 QUIT
+4 ;
SUB3 ;PRINT SUB-HEADER FOR SECTION 3: FLUIDS & ADMIN SETS.
+1 WRITE !!?3,"FLUIDS AND ADMINISTRATION SETS:",!?116,"AVERAGE",!?6,"FIELD",?33,"COST OF",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?117,"UNIT"
+2 WRITE !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"COST",!," "
FOR J=1:1:120
WRITE "-"
+3 QUIT
SUB4 ;PRINT SUB-HEADER FOR SECTION 4: BLOOD AND BLOOD PRODUCTS.
+1 WRITE !!!,"(OUTPATIENT SEGMENT 157)",!?3,"BLOOD AND BLOOD PRODUCTS:",!?116,"AVERAGE",!?6,"FIELD",?33,"COST OF",?65,"COST OF",?83,"TOTAL",?99,"TOTAL",?117,"UNIT"
+2 WRITE !?17,"DISPENSED",?32,"DISPENSED",?49,"RETURNED",?65,"RETURNS",?81,"DISPENSED",?99,"COST",?117,"COST",!," "
FOR J=1:1:120
WRITE "-"
+3 QUIT
+4 ;
SUMRY ;PRINT SUMMARY OF FIELDS THAT ARE ACTUALLY REPORTED ON AMIS
+1 SET $PIECE(LN,"-",23)=""
WRITE !!!!?52,"SUMMARY OF REPORTED FIELDS:",!!?34,"INPATIENT SEGMENT 158",?75,"OUTPATIENT SEGMENT 157",!?33,LN,?75,LN
+2 WRITE !?33,"FIELD 03 ",$JUSTIFY($PIECE(LOC("03"),"^",5),10,0),?75,"FIELD 22 ",$JUSTIFY($PIECE(LOC("22"),"^",6),10,2),!?33,"FIELD 04 ",$JUSTIFY($PIECE(LOC("04"),"^",5),10,0),!?33,"FIELD 05 ",$JUSTIFY($PIECE(LOC("05"),"^",7),10,2)
+3 WRITE !?33,"FIELD 06 ",$JUSTIFY($PIECE(LOC("06"),"^",5),10,0),!?33,"FIELD 07 ",$JUSTIFY($PIECE(LOC("07"),"^",5),10,0),!?33,"FIELD 08 ",$JUSTIFY($PIECE(LOC("08"),"^",7),10,2)
+4 WRITE !?33,"FIELD 17 ",$JUSTIFY($PIECE(LOC("17"),"^",5),10,0),!?33,"FIELD 18 ",$JUSTIFY($PIECE(LOC("18"),"^",7),10,2)
+5 QUIT