PSGWI018 ; ; 04-JAN-1994
;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
Q:'DIFQ(58.2) 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.2,0,"GL")
;;=^PSI(58.2,
;;^DIC("B","AOU INVENTORY GROUP",58.2)
;;=
;;^DIC(58.2,"%",0)
;;=^1.005^2^2
;;^DIC(58.2,"%",1,0)
;;=PSGW
;;^DIC(58.2,"%",2,0)
;;=PSD
;;^DIC(58.2,"%","B","PSD",2)
;;=
;;^DIC(58.2,"%","B","PSGW",1)
;;=
;;^DIC(58.2,"%D",0)
;;=^^10^10^2920213^^^^
;;^DIC(58.2,"%D",1,0)
;;=Entries in this file define standard inventories by defining the areas
;;^DIC(58.2,"%D",2,0)
;;=of use and type of inventory items inventoried. This saves the user
;;^DIC(58.2,"%D",3,0)
;;=from having to re-define the inventory boundaries every time a particular
;;^DIC(58.2,"%D",4,0)
;;=inventory is scheduled. Instead, the user can name inventory groups and
;;^DIC(58.2,"%D",5,0)
;;=the computer then knows what will be inventoried by accessing this file.
;;^DIC(58.2,"%D",6,0)
;;=
;;^DIC(58.2,"%D",7,0)
;;=This file is designed to be used by both the Automatic Replenishment/
;;^DIC(58.2,"%D",8,0)
;;=Ward Stock module and the Controlled Substance module. Areas of use
;;^DIC(58.2,"%D",9,0)
;;=intended for AR/WS are defined in field #1 - AREA OF USE (AOU). Areas of
;;^DIC(58.2,"%D",10,0)
;;=use intended for CS are defined in field #3 - NARCOTIC AREA OF USE (NAOU).
;;^DD(58.2,0)
;;=FIELD^^3^4
;;^DD(58.2,0,"DT")
;;=2920309
;;^DD(58.2,0,"IX","B",58.2,.01)
;;=
;;^DD(58.2,0,"IX","CS",58.29,.01)
;;=
;;^DD(58.2,0,"IX","WS",58.21,.01)
;;=
;;^DD(58.2,0,"NM","AOU INVENTORY GROUP")
;;=
;;^DD(58.2,.01,0)
;;=NAME^RFX^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E)!(X'?.ANP)!(X[",") X
;;^DD(58.2,.01,1,0)
;;=^.1
;;^DD(58.2,.01,1,1,0)
;;=58.2^B
;;^DD(58.2,.01,1,1,1)
;;=S ^PSI(58.2,"B",$E(X,1,30),DA)=""
;;^DD(58.2,.01,1,1,2)
;;=K ^PSI(58.2,"B",$E(X,1,30),DA)
;;^DD(58.2,.01,3)
;;=Name must be 3-30 characters, not numeric or starting with punctuation
;;^DD(58.2,.01,21,0)
;;=^^7^7^2890906^^^
;;^DD(58.2,.01,21,1,0)
;;=This group name represents the Areas of Use which are inventoried
;;^DD(58.2,.01,21,2,0)
;;=together as a "batch" or "cluster". This grouping establishes
;;^DD(58.2,.01,21,3,0)
;;=the elements of the inventory so that they do not have to be
;;^DD(58.2,.01,21,4,0)
;;=redefined every time the inventory is scheduled.
;;^DD(58.2,.01,21,5,0)
;;=Inventory groups may be established by (1) location, (2) time,
;;^DD(58.2,.01,21,6,0)
;;=(3) category or "type" of item to be inventoried, or any combination
;;^DD(58.2,.01,21,7,0)
;;=of these three.
;;^DD(58.2,.01,"DT")
;;=2850410
;;^DD(58.2,1,0)
;;=AREA OF USE (AOU)^58.21P^^1;0
;;^DD(58.2,1,21,0)
;;=^^3^3^2931014^^^^
;;^DD(58.2,1,21,1,0)
;;=Enter name of AOU that is to be inventoried when specifying this inventory
;;^DD(58.2,1,21,2,0)
;;=group at the time of creating an inventory date. This is a way to 'group'
;;^DD(58.2,1,21,3,0)
;;=commonly inventoried AOUs under an easy to remember inventory group name.
;;^DD(58.2,2,0)
;;=GROUP DESCRIPTION^58.23^^2;0
;;^DD(58.2,2,21,0)
;;=^^3^3^2910304^^^
;;^DD(58.2,2,21,1,0)
;;=This text describes the inventory group and its use, and perhaps
;;^DD(58.2,2,21,2,0)
;;=the times when normally processed. This is purely for documentation
;;^DD(58.2,2,21,3,0)
;;=of your site specific information.
;;^DD(58.2,3,0)
;;=NARCOTIC AREA OF USE (NAOU)^58.29P^^3;0
;;^DD(58.2,3,21,0)
;;=^^4^4^2920309^^
;;^DD(58.2,3,21,1,0)
;;=Enter name of NAOU that is to be inventoried when specifying this
;;^DD(58.2,3,21,2,0)
;;=inventory group at the time of creating an inventory date. This is
;;^DD(58.2,3,21,3,0)
;;=a way to 'group' commonly inventoried NAOUs under an easy to remember
;;^DD(58.2,3,21,4,0)
;;=inventory group name.
;;^DD(58.21,0)
;;=AREA OF USE (AOU) SUB-FIELD^NL^2^3
;;^DD(58.21,0,"DT")
;;=2920213
;;^DD(58.21,0,"IX","B",58.21,.01)
;;=
;;^DD(58.21,0,"IX","D",58.21,2)
;;=
;;^DD(58.21,0,"NM","AREA OF USE (AOU)")
;;=
;;^DD(58.21,0,"UP")
;;=58.2
;;^DD(58.21,.01,0)
;;=AREA OF USE (AOU)^MRP58.1'X^PSI(58.1,^0;1^S:$D(X) DINUM=X
;;^DD(58.21,.01,1,0)
;;=^.1
;;^DD(58.21,.01,1,1,0)
;;=58.21^B
;;^DD(58.21,.01,1,1,1)
;;=S ^PSI(58.2,DA(1),1,"B",$E(X,1,30),DA)=""
PSGWI018 ; ; 04-JAN-1994
+1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
+2 IF 'DIFQ(58.2)
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.2,0,"GL")
+2 ;;=^PSI(58.2,
+3 ;;^DIC("B","AOU INVENTORY GROUP",58.2)
+4 ;;=
+5 ;;^DIC(58.2,"%",0)
+6 ;;=^1.005^2^2
+7 ;;^DIC(58.2,"%",1,0)
+8 ;;=PSGW
+9 ;;^DIC(58.2,"%",2,0)
+10 ;;=PSD
+11 ;;^DIC(58.2,"%","B","PSD",2)
+12 ;;=
+13 ;;^DIC(58.2,"%","B","PSGW",1)
+14 ;;=
+15 ;;^DIC(58.2,"%D",0)
+16 ;;=^^10^10^2920213^^^^
+17 ;;^DIC(58.2,"%D",1,0)
+18 ;;=Entries in this file define standard inventories by defining the areas
+19 ;;^DIC(58.2,"%D",2,0)
+20 ;;=of use and type of inventory items inventoried. This saves the user
+21 ;;^DIC(58.2,"%D",3,0)
+22 ;;=from having to re-define the inventory boundaries every time a particular
+23 ;;^DIC(58.2,"%D",4,0)
+24 ;;=inventory is scheduled. Instead, the user can name inventory groups and
+25 ;;^DIC(58.2,"%D",5,0)
+26 ;;=the computer then knows what will be inventoried by accessing this file.
+27 ;;^DIC(58.2,"%D",6,0)
+28 ;;=
+29 ;;^DIC(58.2,"%D",7,0)
+30 ;;=This file is designed to be used by both the Automatic Replenishment/
+31 ;;^DIC(58.2,"%D",8,0)
+32 ;;=Ward Stock module and the Controlled Substance module. Areas of use
+33 ;;^DIC(58.2,"%D",9,0)
+34 ;;=intended for AR/WS are defined in field #1 - AREA OF USE (AOU). Areas of
+35 ;;^DIC(58.2,"%D",10,0)
+36 ;;=use intended for CS are defined in field #3 - NARCOTIC AREA OF USE (NAOU).
+37 ;;^DD(58.2,0)
+38 ;;=FIELD^^3^4
+39 ;;^DD(58.2,0,"DT")
+40 ;;=2920309
+41 ;;^DD(58.2,0,"IX","B",58.2,.01)
+42 ;;=
+43 ;;^DD(58.2,0,"IX","CS",58.29,.01)
+44 ;;=
+45 ;;^DD(58.2,0,"IX","WS",58.21,.01)
+46 ;;=
+47 ;;^DD(58.2,0,"NM","AOU INVENTORY GROUP")
+48 ;;=
+49 ;;^DD(58.2,.01,0)
+50 ;;=NAME^RFX^^0;1^K:$L(X)>30!(X?.N)!($L(X)<3)!'(X'?1P.E)!(X'?.ANP)!(X[",") X
+51 ;;^DD(58.2,.01,1,0)
+52 ;;=^.1
+53 ;;^DD(58.2,.01,1,1,0)
+54 ;;=58.2^B
+55 ;;^DD(58.2,.01,1,1,1)
+56 ;;=S ^PSI(58.2,"B",$E(X,1,30),DA)=""
+57 ;;^DD(58.2,.01,1,1,2)
+58 ;;=K ^PSI(58.2,"B",$E(X,1,30),DA)
+59 ;;^DD(58.2,.01,3)
+60 ;;=Name must be 3-30 characters, not numeric or starting with punctuation
+61 ;;^DD(58.2,.01,21,0)
+62 ;;=^^7^7^2890906^^^
+63 ;;^DD(58.2,.01,21,1,0)
+64 ;;=This group name represents the Areas of Use which are inventoried
+65 ;;^DD(58.2,.01,21,2,0)
+66 ;;=together as a "batch" or "cluster". This grouping establishes
+67 ;;^DD(58.2,.01,21,3,0)
+68 ;;=the elements of the inventory so that they do not have to be
+69 ;;^DD(58.2,.01,21,4,0)
+70 ;;=redefined every time the inventory is scheduled.
+71 ;;^DD(58.2,.01,21,5,0)
+72 ;;=Inventory groups may be established by (1) location, (2) time,
+73 ;;^DD(58.2,.01,21,6,0)
+74 ;;=(3) category or "type" of item to be inventoried, or any combination
+75 ;;^DD(58.2,.01,21,7,0)
+76 ;;=of these three.
+77 ;;^DD(58.2,.01,"DT")
+78 ;;=2850410
+79 ;;^DD(58.2,1,0)
+80 ;;=AREA OF USE (AOU)^58.21P^^1;0
+81 ;;^DD(58.2,1,21,0)
+82 ;;=^^3^3^2931014^^^^
+83 ;;^DD(58.2,1,21,1,0)
+84 ;;=Enter name of AOU that is to be inventoried when specifying this inventory
+85 ;;^DD(58.2,1,21,2,0)
+86 ;;=group at the time of creating an inventory date. This is a way to 'group'
+87 ;;^DD(58.2,1,21,3,0)
+88 ;;=commonly inventoried AOUs under an easy to remember inventory group name.
+89 ;;^DD(58.2,2,0)
+90 ;;=GROUP DESCRIPTION^58.23^^2;0
+91 ;;^DD(58.2,2,21,0)
+92 ;;=^^3^3^2910304^^^
+93 ;;^DD(58.2,2,21,1,0)
+94 ;;=This text describes the inventory group and its use, and perhaps
+95 ;;^DD(58.2,2,21,2,0)
+96 ;;=the times when normally processed. This is purely for documentation
+97 ;;^DD(58.2,2,21,3,0)
+98 ;;=of your site specific information.
+99 ;;^DD(58.2,3,0)
+100 ;;=NARCOTIC AREA OF USE (NAOU)^58.29P^^3;0
+101 ;;^DD(58.2,3,21,0)
+102 ;;=^^4^4^2920309^^
+103 ;;^DD(58.2,3,21,1,0)
+104 ;;=Enter name of NAOU that is to be inventoried when specifying this
+105 ;;^DD(58.2,3,21,2,0)
+106 ;;=inventory group at the time of creating an inventory date. This is
+107 ;;^DD(58.2,3,21,3,0)
+108 ;;=a way to 'group' commonly inventoried NAOUs under an easy to remember
+109 ;;^DD(58.2,3,21,4,0)
+110 ;;=inventory group name.
+111 ;;^DD(58.21,0)
+112 ;;=AREA OF USE (AOU) SUB-FIELD^NL^2^3
+113 ;;^DD(58.21,0,"DT")
+114 ;;=2920213
+115 ;;^DD(58.21,0,"IX","B",58.21,.01)
+116 ;;=
+117 ;;^DD(58.21,0,"IX","D",58.21,2)
+118 ;;=
+119 ;;^DD(58.21,0,"NM","AREA OF USE (AOU)")
+120 ;;=
+121 ;;^DD(58.21,0,"UP")
+122 ;;=58.2
+123 ;;^DD(58.21,.01,0)
+124 ;;=AREA OF USE (AOU)^MRP58.1'X^PSI(58.1,^0;1^S:$D(X) DINUM=X
+125 ;;^DD(58.21,.01,1,0)
+126 ;;=^.1
+127 ;;^DD(58.21,.01,1,1,0)
+128 ;;=58.21^B
+129 ;;^DD(58.21,.01,1,1,1)
+130 ;;=S ^PSI(58.2,DA(1),1,"B",$E(X,1,30),DA)=""