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

PSGWI008.m

Go to the documentation of this file.
  1. PSGWI008 ; ; 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,30,1,5,"FIELD")
  1. ;;=INACTIVATION REASON (OTHER)
  1. ;;^DD(58.11,30,3)
  1. ;;=Enter date when this item is no longer considered a ward stock item.
  1. ;;^DD(58.11,30,21,0)
  1. ;;=^^3^3^2890120^^
  1. ;;^DD(58.11,30,21,1,0)
  1. ;;=This contains the date on which the drug/item in the Area of Use
  1. ;;^DD(58.11,30,21,2,0)
  1. ;;=was inactivated, and thus is no longer considered part of the
  1. ;;^DD(58.11,30,21,3,0)
  1. ;;=standard stock for that Area of Use.
  1. ;;^DD(58.11,30,"DT")
  1. ;;=2930519
  1. ;;^DD(58.11,31,0)
  1. ;;=INACTIVATION REASON^S^N:NOT USED;O:OTHER;DF:DELETED FROM FORMULARY;^0;4^Q
  1. ;;^DD(58.11,31,3)
  1. ;;=
  1. ;;^DD(58.11,31,5,1,0)
  1. ;;=58.11^30^4
  1. ;;^DD(58.11,31,21,0)
  1. ;;=^^2^2^2871008^^^^
  1. ;;^DD(58.11,31,21,1,0)
  1. ;;=This contains the reason that the item has been inactivated from the list
  1. ;;^DD(58.11,31,21,2,0)
  1. ;;=of items normally stocked in this Area of Use.
  1. ;;^DD(58.11,31,"DT")
  1. ;;=2910415
  1. ;;^DD(58.11,33,0)
  1. ;;=INACTIVATION REASON (OTHER)^F^^0;9^K:$L(X)>40!($L(X)<3) X
  1. ;;^DD(58.11,33,3)
  1. ;;=Answer must be 3-40 characters in length
  1. ;;^DD(58.11,33,5,1,0)
  1. ;;=58.11^30^5
  1. ;;^DD(58.11,33,21,0)
  1. ;;=^^3^3^2871008^^
  1. ;;^DD(58.11,33,21,1,0)
  1. ;;=This contains the custom reason for inactivating the item from the
  1. ;;^DD(58.11,33,21,2,0)
  1. ;;=AOU stock list. An inactivation reason of 'other' should have been
  1. ;;^DD(58.11,33,21,3,0)
  1. ;;=entered if a custom reason is to be listed.
  1. ;;^DD(58.11,33,"DT")
  1. ;;=2840614
  1. ;;^DD(58.11,34,0)
  1. ;;=INACTIVE DATE FLAG^F^^0;10^K:$L(X)>3!($L(X)<1) X
  1. ;;^DD(58.11,34,3)
  1. ;;=Answer must be 1-3 characters in length
  1. ;;^DD(58.11,34,5,1,0)
  1. ;;=58.11^30^2
  1. ;;^DD(58.11,34,9)
  1. ;;=^
  1. ;;^DD(58.11,34,21,0)
  1. ;;=^^3^3^2871008^
  1. ;;^DD(58.11,34,21,1,0)
  1. ;;=This flag will be set to "YES" if there is an inactivation date
  1. ;;^DD(58.11,34,21,2,0)
  1. ;;=for the item in the AOU. If there is no inactivation date for
  1. ;;^DD(58.11,34,21,3,0)
  1. ;;=the item, then the flag will be set to "NO".
  1. ;;^DD(58.11,34,"DT")
  1. ;;=2841219
  1. ;;^DD(58.11,35,0)
  1. ;;=EXPIRATION DATE^D^^EXP;1^S %DT="E" D ^%DT S X=Y K:Y<1 X
  1. ;;^DD(58.11,35,.1)
  1. ;;= EXPIRATION DATE
  1. ;;^DD(58.11,35,1,0)
  1. ;;=^.1
  1. ;;^DD(58.11,35,1,1,0)
  1. ;;=58.1^AEXP^MUMPS
  1. ;;^DD(58.11,35,1,1,1)
  1. ;;=S PSGWDRUG=+^PSI(58.1,DA(1),1,DA,0),^PSI(58.1,"AEXP",$E(X,1,30),PSGWDRUG,DA(1))="" K PSGWDRUG
  1. ;;^DD(58.11,35,1,1,2)
  1. ;;=S PSGWDRUG=+^PSI(58.1,DA(1),1,DA,0) K ^PSI(58.1,"AEXP",$E(X,1,30),PSGWDRUG,DA(1)),PSGWDRUG
  1. ;;^DD(58.11,35,1,1,"%D",0)
  1. ;;=^^2^2^2930827^
  1. ;;^DD(58.11,35,1,1,"%D",1,0)
  1. ;;=This cross-reference is used to sort the expiration dates for stock items
  1. ;;^DD(58.11,35,1,1,"%D",2,0)
  1. ;;=for the option "Expiration Date Report".
  1. ;;^DD(58.11,35,3)
  1. ;;=Enter the Expiration Date for this Item.
  1. ;;^DD(58.11,35,21,0)
  1. ;;=^^1^1^2900706^^^
  1. ;;^DD(58.11,35,21,1,0)
  1. ;;=This field contains the expiration date for this item.
  1. ;;^DD(58.11,35,"DT")
  1. ;;=2900627
  1. ;;^DD(58.12,0)
  1. ;;=INVENTORY SUB-FIELD^NL^5^6
  1. ;;^DD(58.12,0,"IX","AMIS",58.12,4)
  1. ;;=
  1. ;;^DD(58.12,0,"IX","AMISERR",58.12,4)
  1. ;;=
  1. ;;^DD(58.12,0,"IX","C",58.12,.01)
  1. ;;=
  1. ;;^DD(58.12,0,"NM","INVENTORY")
  1. ;;=
  1. ;;^DD(58.12,0,"UP")
  1. ;;=58.11
  1. ;;^DD(58.12,.01,0)
  1. ;;=DATE/TIME FOR INVENTORY^P58.19'X^PSI(58.19,^0;1^S:$D(X) DINUM=X
  1. ;;^DD(58.12,.01,.1)
  1. ;;=
  1. ;;^DD(58.12,.01,1,0)
  1. ;;=^.1
  1. ;;^DD(58.12,.01,1,1,0)
  1. ;;=58.12^C^MUMPS
  1. ;;^DD(58.12,.01,1,1,1)
  1. ;;=S $P(^(1,DA,0),"^",2)=$P(^PSI(58.1,DA(2),1,DA(1),0),"^",2)
  1. ;;^DD(58.12,.01,1,1,2)
  1. ;;=S $P(^PSI(58.1,DA(2),1,DA(1),1,DA,0),"^",2)=""
  1. ;;^DD(58.12,.01,1,1,"%D",0)
  1. ;;=^^2^2^2930811^
  1. ;;^DD(58.12,.01,1,1,"%D",1,0)
  1. ;;=This cross-reference automatically sets the field LEVEL (58.12,1) equal
  1. ;;^DD(58.12,.01,1,1,"%D",2,0)
  1. ;;=to whatever is in the field STOCK LEVEL (58.11,1).
  1. ;;^DD(58.12,.01,3)
  1. ;;=
  1. ;;^DD(58.12,.01,21,0)
  1. ;;=^^1^1^2871008^^
  1. ;;^DD(58.12,.01,21,1,0)
  1. ;;=This contains the DATE/TIME of the inventory.
  1. ;;^DD(58.12,.01,"DT")
  1. ;;=2900213
  1. ;;^DD(58.12,1,0)
  1. ;;=LEVEL^RNJ4,0^^0;2^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
  1. ;;^DD(58.12,1,3)
  1. ;;=Type a whole number between 0 and 9999
  1. ;;^DD(58.12,1,9)
  1. ;;=^
  1. ;;^DD(58.12,1,21,0)
  1. ;;=^^1^1^2871008^^
  1. ;;^DD(58.12,1,21,1,0)
  1. ;;=This contains the stock level of the item for the inventory DATE/TIME.