PSGWI004 ; ; 04-JAN-1994
;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
Q:'DIFQ(58.1) F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) X NO E S @X=Y
Q Q
;;^DIC(58.1,0,"GL")
;;=^PSI(58.1,
;;^DIC("B","PHARMACY AOU STOCK",58.1)
;;=
;;^DIC(58.1,"%",0)
;;=^1.005^1^1
;;^DIC(58.1,"%",1,0)
;;=PSGW
;;^DIC(58.1,"%","B","PSGW",1)
;;=
;;^DIC(58.1,"%D",0)
;;=^^3^3^2930603^^^^
;;^DIC(58.1,"%D",1,0)
;;=This file defines the items, their location, and quantity for each area
;;^DIC(58.1,"%D",2,0)
;;=of use (AOU) in the hospital. Additionally, information for each
;;^DIC(58.1,"%D",3,0)
;;=inventory, by item, is stored for an audit trail of usage.
;;^DD(58.1,0)
;;=FIELD^^7^10
;;^DD(58.1,0,"DDA")
;;=N
;;^DD(58.1,0,"DT")
;;=2930308
;;^DD(58.1,0,"ID","WRITE")
;;=I $D(^("I")),^("I")]"",^("I")'>DT W " *** INACTIVE ***"
;;^DD(58.1,0,"IX","AD",58.11,30)
;;=
;;^DD(58.1,0,"IX","AEXP",58.11,35)
;;=
;;^DD(58.1,0,"IX","ASITE",58.1,4)
;;=
;;^DD(58.1,0,"IX","B",58.1,.01)
;;=
;;^DD(58.1,0,"IX","D",58.26,.01)
;;=
;;^DD(58.1,0,"IX","OND",58.28,.01)
;;=
;;^DD(58.1,0,"NM","PHARMACY AOU STOCK")
;;=
;;^DD(58.1,0,"PT",58.21,.01)
;;=
;;^DD(58.1,0,"PT",58.24,.01)
;;=
;;^DD(58.1,0,"PT",58.31,.01)
;;=
;;^DD(58.1,.01,0)
;;=AREA OF USE (AOU)^RF^^0;1^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>30!($L(X)<2) X
;;^DD(58.1,.01,1,0)
;;=^.1^^-1
;;^DD(58.1,.01,1,1,0)
;;=58.1^B
;;^DD(58.1,.01,1,1,1)
;;=S ^PSI(58.1,"B",$E(X,1,30),DA)=""
;;^DD(58.1,.01,1,1,2)
;;=K ^PSI(58.1,"B",$E(X,1,30),DA)
;;^DD(58.1,.01,3)
;;=Answer must be 2-30 characters in length
;;^DD(58.1,.01,21,0)
;;=^^4^4^2930714^^
;;^DD(58.1,.01,21,1,0)
;;=This is the name of the Area Of Use. The AOU may represent a single
;;^DD(58.1,.01,21,2,0)
;;=ward or a combination of wards and their percentages of the total use.
;;^DD(58.1,.01,21,3,0)
;;=Areas of Use may also represent an area of the hospital with no affiliated
;;^DD(58.1,.01,21,4,0)
;;=wards, i.e. cardiac cath lab or dental clinic.
;;^DD(58.1,.01,"DEL",13000,0)
;;=I $O(^PSI(58.1,DA,1,0)) W !,"AOUs CANNOT BE DELETED IF THERE ARE ITEMS DEFINED!"
;;^DD(58.1,.01,"DT")
;;=2890920
;;^DD(58.1,.5,0)
;;=RETURNS CREDITED TO^S^A:AUTOMATIC REPLENISHMENT;W:WARD STOCK - ON DEMAND;^0;2^Q
;;^DD(58.1,.5,3)
;;=Enter "A" or "W".
;;^DD(58.1,.5,21,0)
;;=^^2^2^2930714^
;;^DD(58.1,.5,21,1,0)
;;=For returns purposes, identify the "usual" method of drug
;;^DD(58.1,.5,21,2,0)
;;=distribution for this Area of Use.
;;^DD(58.1,.5,"DT")
;;=2870603
;;^DD(58.1,.75,0)
;;=COUNT ON AMIS?^S^0:YES;1:NO;^0;3^Q
;;^DD(58.1,.75,3)
;;=Enter "yes" or "no".
;;^DD(58.1,.75,21,0)
;;=^^5^5^2910221^^^^
;;^DD(58.1,.75,21,1,0)
;;=Some AOUs are created for internal Inpatient Pharmacy inventory
;;^DD(58.1,.75,21,2,0)
;;=purposes and should not be included in AMIS counts. "COUNT ON AMIS?"
;;^DD(58.1,.75,21,3,0)
;;=will be checked when quantity dispensed is entered to determine
;;^DD(58.1,.75,21,4,0)
;;=if the data should be added to the AR/WS Stats File. If answered
;;^DD(58.1,.75,21,5,0)
;;="NO", then NO data is collected for AMIS calculation for this AOU.
;;^DD(58.1,.75,"DT")
;;=2870814
;;^DD(58.1,1,0)
;;=ITEM^58.11IP^^1;0
;;^DD(58.1,2,0)
;;=WARD/LOCATION (FOR PERCENTAGE)^58.14P^^2;0
;;^DD(58.1,3,0)
;;=INACTIVE DATE^D^^I;1^S %DT="ETX" D ^%DT S X=Y K:Y<1 X
;;^DD(58.1,3,3)
;;=Enter date when this AOU is no longer active.
;;^DD(58.1,3,21,0)
;;=^^1^1^2890606^^
;;^DD(58.1,3,21,1,0)
;;=This contains the date on which the AOU was inactivated.
;;^DD(58.1,3,"DT")
;;=2890606
;;^DD(58.1,4,0)
;;=INPATIENT SITE^R*P59.4'^PS(59.4,^SITE;1^S DIC("S")="I $P(^(0),""^"",26)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
;;^DD(58.1,4,1,0)
;;=^.1
;;^DD(58.1,4,1,1,0)
;;=58.1^ASITE
;;^DD(58.1,4,1,1,1)
;;=S ^PSI(58.1,"ASITE",$E(X,1,30),DA)=""
;;^DD(58.1,4,1,1,2)
;;=K ^PSI(58.1,"ASITE",$E(X,1,30),DA)
;;^DD(58.1,4,3)
;;=Enter the INPATIENT SITE that will receive credit for the AMIS statistics for this AOU. Enter "^" to Exit option.
;;^DD(58.1,4,12)
;;=Select only sites that are 'Selectable for AR/WS' in file #59.4.
;;^DD(58.1,4,12.1)
;;=S DIC("S")="I $P(^(0),""^"",26)"
;;^DD(58.1,4,21,0)
;;=^^2^2^2890906^^
;;^DD(58.1,4,21,1,0)
;;=This field will point to the AR/WS INPATIENT SITE that will receive the
PSGWI004 ; ; 04-JAN-1994
+1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
+2 IF 'DIFQ(58.1)
QUIT
FOR I=1:2
SET X=$TEXT(Q+I)
IF X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
IF $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
IF $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
XECUTE NO
IF '$TEST
SET @X=Y
Q QUIT
+1 ;;^DIC(58.1,0,"GL")
+2 ;;=^PSI(58.1,
+3 ;;^DIC("B","PHARMACY AOU STOCK",58.1)
+4 ;;=
+5 ;;^DIC(58.1,"%",0)
+6 ;;=^1.005^1^1
+7 ;;^DIC(58.1,"%",1,0)
+8 ;;=PSGW
+9 ;;^DIC(58.1,"%","B","PSGW",1)
+10 ;;=
+11 ;;^DIC(58.1,"%D",0)
+12 ;;=^^3^3^2930603^^^^
+13 ;;^DIC(58.1,"%D",1,0)
+14 ;;=This file defines the items, their location, and quantity for each area
+15 ;;^DIC(58.1,"%D",2,0)
+16 ;;=of use (AOU) in the hospital. Additionally, information for each
+17 ;;^DIC(58.1,"%D",3,0)
+18 ;;=inventory, by item, is stored for an audit trail of usage.
+19 ;;^DD(58.1,0)
+20 ;;=FIELD^^7^10
+21 ;;^DD(58.1,0,"DDA")
+22 ;;=N
+23 ;;^DD(58.1,0,"DT")
+24 ;;=2930308
+25 ;;^DD(58.1,0,"ID","WRITE")
+26 ;;=I $D(^("I")),^("I")]"",^("I")'>DT W " *** INACTIVE ***"
+27 ;;^DD(58.1,0,"IX","AD",58.11,30)
+28 ;;=
+29 ;;^DD(58.1,0,"IX","AEXP",58.11,35)
+30 ;;=
+31 ;;^DD(58.1,0,"IX","ASITE",58.1,4)
+32 ;;=
+33 ;;^DD(58.1,0,"IX","B",58.1,.01)
+34 ;;=
+35 ;;^DD(58.1,0,"IX","D",58.26,.01)
+36 ;;=
+37 ;;^DD(58.1,0,"IX","OND",58.28,.01)
+38 ;;=
+39 ;;^DD(58.1,0,"NM","PHARMACY AOU STOCK")
+40 ;;=
+41 ;;^DD(58.1,0,"PT",58.21,.01)
+42 ;;=
+43 ;;^DD(58.1,0,"PT",58.24,.01)
+44 ;;=
+45 ;;^DD(58.1,0,"PT",58.31,.01)
+46 ;;=
+47 ;;^DD(58.1,.01,0)
+48 ;;=AREA OF USE (AOU)^RF^^0;1^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>30!($L(X)<2) X
+49 ;;^DD(58.1,.01,1,0)
+50 ;;=^.1^^-1
+51 ;;^DD(58.1,.01,1,1,0)
+52 ;;=58.1^B
+53 ;;^DD(58.1,.01,1,1,1)
+54 ;;=S ^PSI(58.1,"B",$E(X,1,30),DA)=""
+55 ;;^DD(58.1,.01,1,1,2)
+56 ;;=K ^PSI(58.1,"B",$E(X,1,30),DA)
+57 ;;^DD(58.1,.01,3)
+58 ;;=Answer must be 2-30 characters in length
+59 ;;^DD(58.1,.01,21,0)
+60 ;;=^^4^4^2930714^^
+61 ;;^DD(58.1,.01,21,1,0)
+62 ;;=This is the name of the Area Of Use. The AOU may represent a single
+63 ;;^DD(58.1,.01,21,2,0)
+64 ;;=ward or a combination of wards and their percentages of the total use.
+65 ;;^DD(58.1,.01,21,3,0)
+66 ;;=Areas of Use may also represent an area of the hospital with no affiliated
+67 ;;^DD(58.1,.01,21,4,0)
+68 ;;=wards, i.e. cardiac cath lab or dental clinic.
+69 ;;^DD(58.1,.01,"DEL",13000,0)
+70 ;;=I $O(^PSI(58.1,DA,1,0)) W !,"AOUs CANNOT BE DELETED IF THERE ARE ITEMS DEFINED!"
+71 ;;^DD(58.1,.01,"DT")
+72 ;;=2890920
+73 ;;^DD(58.1,.5,0)
+74 ;;=RETURNS CREDITED TO^S^A:AUTOMATIC REPLENISHMENT;W:WARD STOCK - ON DEMAND;^0;2^Q
+75 ;;^DD(58.1,.5,3)
+76 ;;=Enter "A" or "W".
+77 ;;^DD(58.1,.5,21,0)
+78 ;;=^^2^2^2930714^
+79 ;;^DD(58.1,.5,21,1,0)
+80 ;;=For returns purposes, identify the "usual" method of drug
+81 ;;^DD(58.1,.5,21,2,0)
+82 ;;=distribution for this Area of Use.
+83 ;;^DD(58.1,.5,"DT")
+84 ;;=2870603
+85 ;;^DD(58.1,.75,0)
+86 ;;=COUNT ON AMIS?^S^0:YES;1:NO;^0;3^Q
+87 ;;^DD(58.1,.75,3)
+88 ;;=Enter "yes" or "no".
+89 ;;^DD(58.1,.75,21,0)
+90 ;;=^^5^5^2910221^^^^
+91 ;;^DD(58.1,.75,21,1,0)
+92 ;;=Some AOUs are created for internal Inpatient Pharmacy inventory
+93 ;;^DD(58.1,.75,21,2,0)
+94 ;;=purposes and should not be included in AMIS counts. "COUNT ON AMIS?"
+95 ;;^DD(58.1,.75,21,3,0)
+96 ;;=will be checked when quantity dispensed is entered to determine
+97 ;;^DD(58.1,.75,21,4,0)
+98 ;;=if the data should be added to the AR/WS Stats File. If answered
+99 ;;^DD(58.1,.75,21,5,0)
+100 ;;="NO", then NO data is collected for AMIS calculation for this AOU.
+101 ;;^DD(58.1,.75,"DT")
+102 ;;=2870814
+103 ;;^DD(58.1,1,0)
+104 ;;=ITEM^58.11IP^^1;0
+105 ;;^DD(58.1,2,0)
+106 ;;=WARD/LOCATION (FOR PERCENTAGE)^58.14P^^2;0
+107 ;;^DD(58.1,3,0)
+108 ;;=INACTIVE DATE^D^^I;1^S %DT="ETX" D ^%DT S X=Y K:Y<1 X
+109 ;;^DD(58.1,3,3)
+110 ;;=Enter date when this AOU is no longer active.
+111 ;;^DD(58.1,3,21,0)
+112 ;;=^^1^1^2890606^^
+113 ;;^DD(58.1,3,21,1,0)
+114 ;;=This contains the date on which the AOU was inactivated.
+115 ;;^DD(58.1,3,"DT")
+116 ;;=2890606
+117 ;;^DD(58.1,4,0)
+118 ;;=INPATIENT SITE^R*P59.4'^PS(59.4,^SITE;1^S DIC("S")="I $P(^(0),""^"",26)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
+119 ;;^DD(58.1,4,1,0)
+120 ;;=^.1
+121 ;;^DD(58.1,4,1,1,0)
+122 ;;=58.1^ASITE
+123 ;;^DD(58.1,4,1,1,1)
+124 ;;=S ^PSI(58.1,"ASITE",$E(X,1,30),DA)=""
+125 ;;^DD(58.1,4,1,1,2)
+126 ;;=K ^PSI(58.1,"ASITE",$E(X,1,30),DA)
+127 ;;^DD(58.1,4,3)
+128 ;;=Enter the INPATIENT SITE that will receive credit for the AMIS statistics for this AOU. Enter "^" to Exit option.
+129 ;;^DD(58.1,4,12)
+130 ;;=Select only sites that are 'Selectable for AR/WS' in file #59.4.
+131 ;;^DD(58.1,4,12.1)
+132 ;;=S DIC("S")="I $P(^(0),""^"",26)"
+133 ;;^DD(58.1,4,21,0)
+134 ;;=^^2^2^2890906^^
+135 ;;^DD(58.1,4,21,1,0)
+136 ;;=This field will point to the AR/WS INPATIENT SITE that will receive the