- PSGWPAW1 ;BHAM ISC/PTD,CML-Print AMIS Data Worksheet for All Drugs in All AOUs - CONTINUED ; 05/22/90 10:10
- ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
- PRINT S PSGWPG=1,$P(PSGWLN,"_",33)="" D PG1,HDR
- F PSGWTY=0:0 S PSGWTY=$O(^TMP("PSGWPAW",$J,PSGWTY)),PSGWNM=0 G:PSGWTY=9999 ONDM G:'PSGWTY DONE D:$Y+5>IOSL HDR D WRTYPE F J=0:0 S PSGWNM=$O(^TMP("PSGWPAW",$J,PSGWTY,PSGWNM)) Q:PSGWNM="" D:$Y+5>IOSL HDR W !!?5,PSGWNM,?45,PSGWLN
- ;
- ONDM S PSGWNM=0 D:$Y+5>IOSL HDR D WRTYPE F J=0:0 S PSGWNM=$O(^TMP("PSGWPAW",$J,9999,PSGWNM)) Q:PSGWNM="" I '$D(^TMP("PSGWPAW",$J,"DN",PSGWNM)) D:$Y+5>IOSL HDR W !!?5,PSGWNM,?45,PSGWLN
- ;
- DONE I $E(IOST)'="C" W @IOF
- END K ^TMP("PSGWPAW",$J),I,J,K,PSGWAOU,PSGWDR,PSGWITM,PSGWNM,PSGWTY,PSGWPG,PSGWIO,ZTSK,PSGWDT,PSGWLN,%,%H,%I,%DT,ZTIO,IO("Q"),X,Y
- D ^%ZISC
- S:$D(ZTQUEUED) ZTREQ="@" Q
- ;
- PG1 F I=1:1:10 W !
- W !?30,"AMIS DATA WORKSHEET",!!!?5,"For each drug listed on the following page(s), determine the AMIS category",!,"and AMIS conversion number to be entered for AR/WS AMIS statistics.",!!!
- W "AMIS CATEGORY will classify the drug for AR/WS AMIS.",!,"You will enter ""0"", ""1"", ""2"", or ""3"".",!!?5,"==> ""0"" Means the drug is classified as field 03 or 04.",!?10,"Include tablets, capsules, multi-dose vials, etc."
- W !?10,"Exclude multiple-dose externals, liquids, or antacids.",!!?5,"==> ""1"" Means the drug is classified as field 06 or 07.",!?10,"Include multiple-dose externals, liquids, antacids, otics,",!?10,"opthalmics, and inhalations.",!!
- W ?5,"==> ""2"" Means the drug is classified as field 17.",!?10,"Include solutions and administration sets.",!!
- W ?5,"==> ""3"" Means the drug is classified as field 22.",!?10,"Include blood and blood products.",!!!
- W "AMIS CONVERSION NUMBER:",!?5,"This number reflects the number of doses/units contained in a single",!?5,"quantity dispensed. For example:",!?10,"For a 20cc vial, quantity dispensed is 1, and conversion number is 20."
- W !?10,"For 5oz. antacid, quantity dispensed is 1, and conversion number is 1.",!?10,"For a bottle of 100 aspirin, quantity dispensed is 1, and",!?10,"conversion number is 100.",!!!
- Q
- ;
- HDR ;PRINT REPORT MAIN HEADER
- S %DT="",X="T" D ^%DT X ^DD("DD") W:$Y @IOF W !!,"PAGE: ",PSGWPG,?60,"DATE: ",Y,!?30,"AMIS DATA WORKSHEET",!!,"TYPE",?45,"AMIS CATEGORY",?65,"AMIS CONVERSION",!?5,"DRUG NAME",?45,"(0,1,2, or 3)",?70,"NUMBER",!
- F J=1:1:80 W "="
- S PSGWPG=PSGWPG+1
- Q
- ;
- WRTYPE W !!,$S((PSGWTY'=9999)&($D(^PSI(58.16,PSGWTY,0))):$P(^PSI(58.16,PSGWTY,0),"^"),1:"** UNCLASSIFIED BY TYPE: ") Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSGWPAW1 2563 printed Mar 13, 2025@20:44:27 Page 2
- PSGWPAW1 ;BHAM ISC/PTD,CML-Print AMIS Data Worksheet for All Drugs in All AOUs - CONTINUED ; 05/22/90 10:10
- +1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
- PRINT SET PSGWPG=1
- SET $PIECE(PSGWLN,"_",33)=""
- DO PG1
- DO HDR
- +1 FOR PSGWTY=0:0
- SET PSGWTY=$ORDER(^TMP("PSGWPAW",$JOB,PSGWTY))
- SET PSGWNM=0
- if PSGWTY=9999
- GOTO ONDM
- if 'PSGWTY
- GOTO DONE
- if $Y+5>IOSL
- DO HDR
- DO WRTYPE
- FOR J=0:0
- SET PSGWNM=$ORDER(^TMP("PSGWPAW",$JOB,PSGWTY,PSGWNM))
- if PSGWNM=""
- QUIT
- if $Y+5>IOSL
- DO HDR
- WRITE !!?5,PSGWNM,?45,PSGWLN
- +2 ;
- ONDM SET PSGWNM=0
- if $Y+5>IOSL
- DO HDR
- DO WRTYPE
- FOR J=0:0
- SET PSGWNM=$ORDER(^TMP("PSGWPAW",$JOB,9999,PSGWNM))
- if PSGWNM=""
- QUIT
- IF '$DATA(^TMP("PSGWPAW",$JOB,"DN",PSGWNM))
- if $Y+5>IOSL
- DO HDR
- WRITE !!?5,PSGWNM,?45,PSGWLN
- +1 ;
- DONE IF $EXTRACT(IOST)'="C"
- WRITE @IOF
- END KILL ^TMP("PSGWPAW",$JOB),I,J,K,PSGWAOU,PSGWDR,PSGWITM,PSGWNM,PSGWTY,PSGWPG,PSGWIO,ZTSK,PSGWDT,PSGWLN,%,%H,%I,%DT,ZTIO,IO("Q"),X,Y
- +1 DO ^%ZISC
- +2 if $DATA(ZTQUEUED)
- SET ZTREQ="@"
- QUIT
- +3 ;
- PG1 FOR I=1:1:10
- WRITE !
- +1 WRITE !?30,"AMIS DATA WORKSHEET",!!!?5,"For each drug listed on the following page(s), determine the AMIS category",!,"and AMIS conversion number to be entered for AR/WS AMIS statistics.",!!!
- +2 WRITE "AMIS CATEGORY will classify the drug for AR/WS AMIS.",!,"You will enter ""0"", ""1"", ""2"", or ""3"".",!!?5,"==> ""0"" Means the drug is classified as field 03 or 04.",!?10,"Include tablets, capsules, multi-dose vials, etc."
- +3 WRITE !?10,"Exclude multiple-dose externals, liquids, or antacids.",!!?5,"==> ""1"" Means the drug is classified as field 06 or 07.",!?10,"Include multiple-dose externals, liquids, antacids, otics,",!?10,"opthalmics, and inhalations.",!!
- +4 WRITE ?5,"==> ""2"" Means the drug is classified as field 17.",!?10,"Include solutions and administration sets.",!!
- +5 WRITE ?5,"==> ""3"" Means the drug is classified as field 22.",!?10,"Include blood and blood products.",!!!
- +6 WRITE "AMIS CONVERSION NUMBER:",!?5,"This number reflects the number of doses/units contained in a single",!?5,"quantity dispensed. For example:",!?10,"For a 20cc vial, quantity dispensed is 1, and conversion number is 20."
- +7 WRITE !?10,"For 5oz. antacid, quantity dispensed is 1, and conversion number is 1.",!?10,"For a bottle of 100 aspirin, quantity dispensed is 1, and",!?10,"conversion number is 100.",!!!
- +8 QUIT
- +9 ;
- HDR ;PRINT REPORT MAIN HEADER
- +1 SET %DT=""
- SET X="T"
- DO ^%DT
- XECUTE ^DD("DD")
- if $Y
- WRITE @IOF
- WRITE !!,"PAGE: ",PSGWPG,?60,"DATE: ",Y,!?30,"AMIS DATA WORKSHEET",!!,"TYPE",?45,"AMIS CATEGORY",?65,"AMIS CONVERSION",!?5,"DRUG NAME",?45,"(0,1,2, or 3)",?70,"NUMBER",!
- +2 FOR J=1:1:80
- WRITE "="
- +3 SET PSGWPG=PSGWPG+1
- +4 QUIT
- +5 ;
- WRTYPE WRITE !!,$SELECT((PSGWTY'=9999)&($DATA(^PSI(58.16,PSGWTY,0))):$PIECE(^PSI(58.16,PSGWTY,0),"^"),1:"** UNCLASSIFIED BY TYPE: ")
- QUIT