PSGWI017 ; ; 04-JAN-1994
;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
Q:'DIFQ(58.19) 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
;;^DD(58.19,.01,4)
;;=
;;^DD(58.19,.01,21,0)
;;=^^4^4^2931206^^^^
;;^DD(58.19,.01,21,1,0)
;;=This contains the date that the AOU inventory takes place for Automatic
;;^DD(58.19,.01,21,2,0)
;;=Replenishment. Primary inventory information is stored here.
;;^DD(58.19,.01,21,3,0)
;;=Inventory entries in File 58.1 - the Pharmacy AOU Stock File point to
;;^DD(58.19,.01,21,4,0)
;;=this value when processing an inventory.
;;^DD(58.19,.01,"DEL",.01,0)
;;=I 1 W !,"INVENTORIES MAY NOT BE DELETED!"
;;^DD(58.19,.01,"DT")
;;=2930714
;;^DD(58.19,.5,0)
;;=AREA OF USE^58.24PA^^1;0
;;^DD(58.19,1,0)
;;=PERSON DOING INVENTORY^RP200'^VA(200,^0;3^Q
;;^DD(58.19,1,3)
;;=Enter name of person primarily responsible for this inventory.
;;^DD(58.19,1,5,1,0)
;;=58.19^.01^3
;;^DD(58.19,1,21,0)
;;=^^2^2^2900712^^
;;^DD(58.19,1,21,1,0)
;;=This points to File 200 - the New Person File, identifying the person who
;;^DD(58.19,1,21,2,0)
;;=creates the inventory.
;;^DD(58.19,1,"DT")
;;=2900712
;;^DD(58.19,2,0)
;;=DAY OF WEEK^S^MON:MONDAY;TUE:TUESDAY;WED:WEDNESDAY;THU:THURSDAY;FRI:FRIDAY;SAT:SATURDAY;SUN:SUNDAY;^0;2^Q
;;^DD(58.19,2,3)
;;=Enter day of the week on which the inventory was done.
;;^DD(58.19,2,5,1,0)
;;=58.19^.01^2
;;^DD(58.19,2,9)
;;=^
;;^DD(58.19,2,21,0)
;;=^^1^1^2930816^^^
;;^DD(58.19,2,21,1,0)
;;=This contains the day of the week when the inventory was done.
;;^DD(58.19,3,0)
;;=INVENTORY GROUP^F^^0;4^K:$L(X)>25!($L(X)<1) X
;;^DD(58.19,3,1,0)
;;=^.1^^0
;;^DD(58.19,3,3)
;;=Answer must be 1-25 characters in length
;;^DD(58.19,3,21,0)
;;=^^2^2^2871009^
;;^DD(58.19,3,21,1,0)
;;=This points to File 58.2 - AOU Inventory Group File. It contains
;;^DD(58.19,3,21,2,0)
;;=the inventory group - cluster of AOUs which are inventoried together.
;;^DD(58.19,3,"DT")
;;=2900228
;;^DD(58.24,0)
;;=AREA OF USE SUB-FIELD^NL^2^3
;;^DD(58.24,0,"IX","B",58.24,.01)
;;=
;;^DD(58.24,0,"IX","C",58.24,2)
;;=
;;^DD(58.24,0,"NM","AREA OF USE")
;;=
;;^DD(58.24,0,"UP")
;;=58.19
;;^DD(58.24,.01,0)
;;=AREA OF USE (AOU)^MRP58.1'X^PSI(58.1,^0;1^S:$D(X) DINUM=X
;;^DD(58.24,.01,1,0)
;;=^.1
;;^DD(58.24,.01,1,1,0)
;;=58.24^B
;;^DD(58.24,.01,1,1,1)
;;=S ^PSI(58.19,DA(1),1,"B",$E(X,1,30),DA)=""
;;^DD(58.24,.01,1,1,2)
;;=K ^PSI(58.19,DA(1),1,"B",$E(X,1,30),DA)
;;^DD(58.24,.01,21,0)
;;=^^2^2^2900129^^^^
;;^DD(58.24,.01,21,1,0)
;;=This contains the name of the Area of Use as defined in File 58.1 -
;;^DD(58.24,.01,21,2,0)
;;=Pharmacy AOU Stock File.
;;^DD(58.24,.01,"DT")
;;=2900213
;;^DD(58.24,1,0)
;;=INVENTORY TYPE^58.25PA^^1;0
;;^DD(58.24,2,0)
;;=SORT KEY^NJ9,0^^0;2^K:+X'=X!(X>999999999)!(X<0)!(X?.E1"."1N.N) X
;;^DD(58.24,2,1,0)
;;=^.1
;;^DD(58.24,2,1,1,0)
;;=58.24^C
;;^DD(58.24,2,1,1,1)
;;=S ^PSI(58.19,DA(1),1,"C",$E(X,1,30),DA)=""
;;^DD(58.24,2,1,1,2)
;;=K ^PSI(58.19,DA(1),1,"C",$E(X,1,30),DA)
;;^DD(58.24,2,3)
;;=Type a Number between 0 and 999999999, 0 Decimal Digits
;;^DD(58.24,2,21,0)
;;=^^3^3^2871009^
;;^DD(58.24,2,21,1,0)
;;=The sort key is used to place the AOUs within an Inventory Group
;;^DD(58.24,2,21,2,0)
;;=in the order in which they are inventoried. This sort order is
;;^DD(58.24,2,21,3,0)
;;=reflected in the inventory sheet.
;;^DD(58.24,2,"DT")
;;=2891031
;;^DD(58.25,0)
;;=INVENTORY TYPE SUB-FIELD^NL^.01^1
;;^DD(58.25,0,"NM","INVENTORY TYPE")
;;=
;;^DD(58.25,0,"UP")
;;=58.24
;;^DD(58.25,.01,0)
;;=INVENTORY TYPE^MRP58.16'X^PSI(58.16,^0;1^S:$D(X) DINUM=X
;;^DD(58.25,.01,1,0)
;;=^.1^^0
;;^DD(58.25,.01,21,0)
;;=^^2^2^2871009^^
;;^DD(58.25,.01,21,1,0)
;;=This defines the Inventory Type which will be used to select the appropriate
;;^DD(58.25,.01,21,2,0)
;;=items from this AOU for inventory.
;;^DD(58.25,.01,"DT")
;;=2900213
PSGWI017 ; ; 04-JAN-1994
+1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
+2 IF 'DIFQ(58.19)
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 ;;^DD(58.19,.01,4)
+2 ;;=
+3 ;;^DD(58.19,.01,21,0)
+4 ;;=^^4^4^2931206^^^^
+5 ;;^DD(58.19,.01,21,1,0)
+6 ;;=This contains the date that the AOU inventory takes place for Automatic
+7 ;;^DD(58.19,.01,21,2,0)
+8 ;;=Replenishment. Primary inventory information is stored here.
+9 ;;^DD(58.19,.01,21,3,0)
+10 ;;=Inventory entries in File 58.1 - the Pharmacy AOU Stock File point to
+11 ;;^DD(58.19,.01,21,4,0)
+12 ;;=this value when processing an inventory.
+13 ;;^DD(58.19,.01,"DEL",.01,0)
+14 ;;=I 1 W !,"INVENTORIES MAY NOT BE DELETED!"
+15 ;;^DD(58.19,.01,"DT")
+16 ;;=2930714
+17 ;;^DD(58.19,.5,0)
+18 ;;=AREA OF USE^58.24PA^^1;0
+19 ;;^DD(58.19,1,0)
+20 ;;=PERSON DOING INVENTORY^RP200'^VA(200,^0;3^Q
+21 ;;^DD(58.19,1,3)
+22 ;;=Enter name of person primarily responsible for this inventory.
+23 ;;^DD(58.19,1,5,1,0)
+24 ;;=58.19^.01^3
+25 ;;^DD(58.19,1,21,0)
+26 ;;=^^2^2^2900712^^
+27 ;;^DD(58.19,1,21,1,0)
+28 ;;=This points to File 200 - the New Person File, identifying the person who
+29 ;;^DD(58.19,1,21,2,0)
+30 ;;=creates the inventory.
+31 ;;^DD(58.19,1,"DT")
+32 ;;=2900712
+33 ;;^DD(58.19,2,0)
+34 ;;=DAY OF WEEK^S^MON:MONDAY;TUE:TUESDAY;WED:WEDNESDAY;THU:THURSDAY;FRI:FRIDAY;SAT:SATURDAY;SUN:SUNDAY;^0;2^Q
+35 ;;^DD(58.19,2,3)
+36 ;;=Enter day of the week on which the inventory was done.
+37 ;;^DD(58.19,2,5,1,0)
+38 ;;=58.19^.01^2
+39 ;;^DD(58.19,2,9)
+40 ;;=^
+41 ;;^DD(58.19,2,21,0)
+42 ;;=^^1^1^2930816^^^
+43 ;;^DD(58.19,2,21,1,0)
+44 ;;=This contains the day of the week when the inventory was done.
+45 ;;^DD(58.19,3,0)
+46 ;;=INVENTORY GROUP^F^^0;4^K:$L(X)>25!($L(X)<1) X
+47 ;;^DD(58.19,3,1,0)
+48 ;;=^.1^^0
+49 ;;^DD(58.19,3,3)
+50 ;;=Answer must be 1-25 characters in length
+51 ;;^DD(58.19,3,21,0)
+52 ;;=^^2^2^2871009^
+53 ;;^DD(58.19,3,21,1,0)
+54 ;;=This points to File 58.2 - AOU Inventory Group File. It contains
+55 ;;^DD(58.19,3,21,2,0)
+56 ;;=the inventory group - cluster of AOUs which are inventoried together.
+57 ;;^DD(58.19,3,"DT")
+58 ;;=2900228
+59 ;;^DD(58.24,0)
+60 ;;=AREA OF USE SUB-FIELD^NL^2^3
+61 ;;^DD(58.24,0,"IX","B",58.24,.01)
+62 ;;=
+63 ;;^DD(58.24,0,"IX","C",58.24,2)
+64 ;;=
+65 ;;^DD(58.24,0,"NM","AREA OF USE")
+66 ;;=
+67 ;;^DD(58.24,0,"UP")
+68 ;;=58.19
+69 ;;^DD(58.24,.01,0)
+70 ;;=AREA OF USE (AOU)^MRP58.1'X^PSI(58.1,^0;1^S:$D(X) DINUM=X
+71 ;;^DD(58.24,.01,1,0)
+72 ;;=^.1
+73 ;;^DD(58.24,.01,1,1,0)
+74 ;;=58.24^B
+75 ;;^DD(58.24,.01,1,1,1)
+76 ;;=S ^PSI(58.19,DA(1),1,"B",$E(X,1,30),DA)=""
+77 ;;^DD(58.24,.01,1,1,2)
+78 ;;=K ^PSI(58.19,DA(1),1,"B",$E(X,1,30),DA)
+79 ;;^DD(58.24,.01,21,0)
+80 ;;=^^2^2^2900129^^^^
+81 ;;^DD(58.24,.01,21,1,0)
+82 ;;=This contains the name of the Area of Use as defined in File 58.1 -
+83 ;;^DD(58.24,.01,21,2,0)
+84 ;;=Pharmacy AOU Stock File.
+85 ;;^DD(58.24,.01,"DT")
+86 ;;=2900213
+87 ;;^DD(58.24,1,0)
+88 ;;=INVENTORY TYPE^58.25PA^^1;0
+89 ;;^DD(58.24,2,0)
+90 ;;=SORT KEY^NJ9,0^^0;2^K:+X'=X!(X>999999999)!(X<0)!(X?.E1"."1N.N) X
+91 ;;^DD(58.24,2,1,0)
+92 ;;=^.1
+93 ;;^DD(58.24,2,1,1,0)
+94 ;;=58.24^C
+95 ;;^DD(58.24,2,1,1,1)
+96 ;;=S ^PSI(58.19,DA(1),1,"C",$E(X,1,30),DA)=""
+97 ;;^DD(58.24,2,1,1,2)
+98 ;;=K ^PSI(58.19,DA(1),1,"C",$E(X,1,30),DA)
+99 ;;^DD(58.24,2,3)
+100 ;;=Type a Number between 0 and 999999999, 0 Decimal Digits
+101 ;;^DD(58.24,2,21,0)
+102 ;;=^^3^3^2871009^
+103 ;;^DD(58.24,2,21,1,0)
+104 ;;=The sort key is used to place the AOUs within an Inventory Group
+105 ;;^DD(58.24,2,21,2,0)
+106 ;;=in the order in which they are inventoried. This sort order is
+107 ;;^DD(58.24,2,21,3,0)
+108 ;;=reflected in the inventory sheet.
+109 ;;^DD(58.24,2,"DT")
+110 ;;=2891031
+111 ;;^DD(58.25,0)
+112 ;;=INVENTORY TYPE SUB-FIELD^NL^.01^1
+113 ;;^DD(58.25,0,"NM","INVENTORY TYPE")
+114 ;;=
+115 ;;^DD(58.25,0,"UP")
+116 ;;=58.24
+117 ;;^DD(58.25,.01,0)
+118 ;;=INVENTORY TYPE^MRP58.16'X^PSI(58.16,^0;1^S:$D(X) DINUM=X
+119 ;;^DD(58.25,.01,1,0)
+120 ;;=^.1^^0
+121 ;;^DD(58.25,.01,21,0)
+122 ;;=^^2^2^2871009^^
+123 ;;^DD(58.25,.01,21,1,0)
+124 ;;=This defines the Inventory Type which will be used to select the appropriate
+125 ;;^DD(58.25,.01,21,2,0)
+126 ;;=items from this AOU for inventory.
+127 ;;^DD(58.25,.01,"DT")
+128 ;;=2900213