Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSGWI006

PSGWI006.m

Go to the documentation of this file.
  1. PSGWI006 ; ; 04-JAN-1994
  1. ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
  1. 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
  1. Q Q
  1. ;;^DD(58.11,1,1,0)
  1. ;;=^.1
  1. ;;^DD(58.11,1,1,1,0)
  1. ;;=^^TRIGGER^58.11^11
  1. ;;^DD(58.11,1,1,1,1)
  1. ;;=K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^PSI(58.1,D0,1,D1,0)):^(0),1:"") S X=$P(Y(1),U,5) S DIU=X K Y S X=DIV S X="Y" X ^DD(58.11,1,1,1,1.4)
  1. ;;^DD(58.11,1,1,1,1.4)
  1. ;;=S DIH=$S($D(^PSI(58.1,DIV(0),1,DIV(1),0)):^(0),1:""),DIV=X X "F %=0:0 Q:$L($P(DIH,U,4,99)) S DIH=DIH_U" S %=$P(DIH,U,6,999),DIU=$P(DIH,U,5),^(0)=$P(DIH,U,1,4)_U_DIV_$S(%]"":U_%,1:""),DIH=58.11,DIG=11 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
  1. ;;^DD(58.11,1,1,1,2)
  1. ;;=Q
  1. ;;^DD(58.11,1,1,1,"%D",0)
  1. ;;=^^2^2^2930827^
  1. ;;^DD(58.11,1,1,1,"%D",1,0)
  1. ;;=This cross-reference sets a flag in the LEVEL CHG field (58.11,11) if
  1. ;;^DD(58.11,1,1,1,"%D",2,0)
  1. ;;=there has been any change to the stock level for an item.
  1. ;;^DD(58.11,1,1,1,"CREATE VALUE")
  1. ;;="Y"
  1. ;;^DD(58.11,1,1,1,"DELETE VALUE")
  1. ;;=NO EFFECT
  1. ;;^DD(58.11,1,1,1,"FIELD")
  1. ;;=LEVEL CHG
  1. ;;^DD(58.11,1,3)
  1. ;;=Type a whole number between 0 and 9999
  1. ;;^DD(58.11,1,21,0)
  1. ;;=^^2^2^2871008^^^^
  1. ;;^DD(58.11,1,21,1,0)
  1. ;;=This contains the quantity that is the required stock level for the item
  1. ;;^DD(58.11,1,21,2,0)
  1. ;;=in the Area of Use.
  1. ;;^DD(58.11,1,"DT")
  1. ;;=2850227
  1. ;;^DD(58.11,2,0)
  1. ;;=INVENTORY^58.12P^^1;0
  1. ;;^DD(58.11,2,21,0)
  1. ;;=^^2^2^2871008^^^^
  1. ;;^DD(58.11,2,21,1,0)
  1. ;;=This allows selection of inventory by entering a unique key of
  1. ;;^DD(58.11,2,21,2,0)
  1. ;;=DATE AND TIME.
  1. ;;^DD(58.11,3,0)
  1. ;;=TYPE OF INVENTORY^58.13PA^^2;0
  1. ;;^DD(58.11,3,12)
  1. ;;=Enter type for item
  1. ;;^DD(58.11,3,12.1)
  1. ;;=S DIC("S")="I $P(^(0),""^"",1)'=""ALL"""
  1. ;;^DD(58.11,5,0)
  1. ;;=WARD (FOR ITEM)^58.26PA^^4;0
  1. ;;^DD(58.11,10,0)
  1. ;;=LOCATION^F^^0;8^K:$L(X)>12!($L(X)<1) X
  1. ;;^DD(58.11,10,3)
  1. ;;=ANSWER MUST BE 1-12 CHARACTERS IN LENGTH
  1. ;;^DD(58.11,10,21,0)
  1. ;;=^^5^5^2871008^^^
  1. ;;^DD(58.11,10,21,1,0)
  1. ;;=This is the location address of the item in the Area of Use.
  1. ;;^DD(58.11,10,21,2,0)
  1. ;;=It can consist of up to 3 levels, each separated by a comma.
  1. ;;^DD(58.11,10,21,3,0)
  1. ;;=For example, "MR,CA,S3" or "CUR,CB,D1".
  1. ;;^DD(58.11,10,21,4,0)
  1. ;;=This information is used to sort items on inventory sheets and other
  1. ;;^DD(58.11,10,21,5,0)
  1. ;;=printouts.
  1. ;;^DD(58.11,10,"DT")
  1. ;;=2840619
  1. ;;^DD(58.11,11,0)
  1. ;;=LEVEL CHG^F^^0;5^K:$L(X)>10!($L(X)<1) X
  1. ;;^DD(58.11,11,3)
  1. ;;=Answer must be 1-10 characters in length
  1. ;;^DD(58.11,11,5,1,0)
  1. ;;=58.11^1^1
  1. ;;^DD(58.11,11,21,0)
  1. ;;=^^1^1^2871008^^
  1. ;;^DD(58.11,11,21,1,0)
  1. ;;=This contains the change in stock level for the item.
  1. ;;^DD(58.11,11,"DT")
  1. ;;=2841218
  1. ;;^DD(58.11,12,0)
  1. ;;=NON-STANDARD ITEM^S^1:YES;0:NO;^0;6^Q
  1. ;;^DD(58.11,12,21,0)
  1. ;;=^^4^4^2900209^^^
  1. ;;^DD(58.11,12,21,1,0)
  1. ;;=This identifies if an item is a standard stocked item in the Area
  1. ;;^DD(58.11,12,21,2,0)
  1. ;;=of Use or not. Enter 1 if the item is not a standard stocked item,
  1. ;;^DD(58.11,12,21,3,0)
  1. ;;=but is being added as an on-demand request. Enter 0 if the item is
  1. ;;^DD(58.11,12,21,4,0)
  1. ;;=a standard stocked item in the AOU.
  1. ;;^DD(58.11,12,"DT")
  1. ;;=2850208
  1. ;;^DD(58.11,13,0)
  1. ;;=REORDER LEVEL^NJ4,0^^0;11^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
  1. ;;^DD(58.11,13,3)
  1. ;;=Type a Number between 0 and 9999, 0 Decimal Digits
  1. ;;^DD(58.11,13,21,0)
  1. ;;=^^2^2^2881101^
  1. ;;^DD(58.11,13,21,1,0)
  1. ;;=This field contains the on-hand level that must be reached before an item
  1. ;;^DD(58.11,13,21,2,0)
  1. ;;=will have replacements dispensed.
  1. ;;^DD(58.11,13,"DT")
  1. ;;=2881101
  1. ;;^DD(58.11,14,0)
  1. ;;=MINIMUM QUANTITY TO DISPENSE^NJ4,0^^0;12^K:+X'=X!(X>9999)!(X<1)!(X?.E1"."1N.N) X
  1. ;;^DD(58.11,14,3)
  1. ;;=Type a Number between 1 and 9999, 0 Decimal Digits.
  1. ;;^DD(58.11,14,21,0)
  1. ;;=^^1^1^2910117^^^
  1. ;;^DD(58.11,14,21,1,0)
  1. ;;=This field contains the minimum quantity that will be dispensed of an item.
  1. ;;^DD(58.11,14,"DT")
  1. ;;=2910117
  1. ;;^DD(58.11,15,0)
  1. ;;=RETURNS^58.15D^^3;0
  1. ;;^DD(58.11,16,0)
  1. ;;=ON-DEMAND REQUEST DATE/TIME^58.28DA^^5;0
  1. ;;^DD(58.11,30,0)
  1. ;;=INACTIVATION DATE^D^^0;3^S %DT="EX" D ^%DT S X=Y K:Y<1 X
  1. ;;^DD(58.11,30,1,0)
  1. ;;=^.1
  1. ;;^DD(58.11,30,1,1,0)
  1. ;;=58.11^AC^MUMPS
  1. ;;^DD(58.11,30,1,1,1)
  1. ;;=S ^PSI(58.1,DA(1),1,DA,"I",X)=""