- PSGWI008 ; ; 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
- ;;^DD(58.11,30,1,5,"FIELD")
- ;;=INACTIVATION REASON (OTHER)
- ;;^DD(58.11,30,3)
- ;;=Enter date when this item is no longer considered a ward stock item.
- ;;^DD(58.11,30,21,0)
- ;;=^^3^3^2890120^^
- ;;^DD(58.11,30,21,1,0)
- ;;=This contains the date on which the drug/item in the Area of Use
- ;;^DD(58.11,30,21,2,0)
- ;;=was inactivated, and thus is no longer considered part of the
- ;;^DD(58.11,30,21,3,0)
- ;;=standard stock for that Area of Use.
- ;;^DD(58.11,30,"DT")
- ;;=2930519
- ;;^DD(58.11,31,0)
- ;;=INACTIVATION REASON^S^N:NOT USED;O:OTHER;DF:DELETED FROM FORMULARY;^0;4^Q
- ;;^DD(58.11,31,3)
- ;;=
- ;;^DD(58.11,31,5,1,0)
- ;;=58.11^30^4
- ;;^DD(58.11,31,21,0)
- ;;=^^2^2^2871008^^^^
- ;;^DD(58.11,31,21,1,0)
- ;;=This contains the reason that the item has been inactivated from the list
- ;;^DD(58.11,31,21,2,0)
- ;;=of items normally stocked in this Area of Use.
- ;;^DD(58.11,31,"DT")
- ;;=2910415
- ;;^DD(58.11,33,0)
- ;;=INACTIVATION REASON (OTHER)^F^^0;9^K:$L(X)>40!($L(X)<3) X
- ;;^DD(58.11,33,3)
- ;;=Answer must be 3-40 characters in length
- ;;^DD(58.11,33,5,1,0)
- ;;=58.11^30^5
- ;;^DD(58.11,33,21,0)
- ;;=^^3^3^2871008^^
- ;;^DD(58.11,33,21,1,0)
- ;;=This contains the custom reason for inactivating the item from the
- ;;^DD(58.11,33,21,2,0)
- ;;=AOU stock list. An inactivation reason of 'other' should have been
- ;;^DD(58.11,33,21,3,0)
- ;;=entered if a custom reason is to be listed.
- ;;^DD(58.11,33,"DT")
- ;;=2840614
- ;;^DD(58.11,34,0)
- ;;=INACTIVE DATE FLAG^F^^0;10^K:$L(X)>3!($L(X)<1) X
- ;;^DD(58.11,34,3)
- ;;=Answer must be 1-3 characters in length
- ;;^DD(58.11,34,5,1,0)
- ;;=58.11^30^2
- ;;^DD(58.11,34,9)
- ;;=^
- ;;^DD(58.11,34,21,0)
- ;;=^^3^3^2871008^
- ;;^DD(58.11,34,21,1,0)
- ;;=This flag will be set to "YES" if there is an inactivation date
- ;;^DD(58.11,34,21,2,0)
- ;;=for the item in the AOU. If there is no inactivation date for
- ;;^DD(58.11,34,21,3,0)
- ;;=the item, then the flag will be set to "NO".
- ;;^DD(58.11,34,"DT")
- ;;=2841219
- ;;^DD(58.11,35,0)
- ;;=EXPIRATION DATE^D^^EXP;1^S %DT="E" D ^%DT S X=Y K:Y<1 X
- ;;^DD(58.11,35,.1)
- ;;= EXPIRATION DATE
- ;;^DD(58.11,35,1,0)
- ;;=^.1
- ;;^DD(58.11,35,1,1,0)
- ;;=58.1^AEXP^MUMPS
- ;;^DD(58.11,35,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
- ;;^DD(58.11,35,1,1,2)
- ;;=S PSGWDRUG=+^PSI(58.1,DA(1),1,DA,0) K ^PSI(58.1,"AEXP",$E(X,1,30),PSGWDRUG,DA(1)),PSGWDRUG
- ;;^DD(58.11,35,1,1,"%D",0)
- ;;=^^2^2^2930827^
- ;;^DD(58.11,35,1,1,"%D",1,0)
- ;;=This cross-reference is used to sort the expiration dates for stock items
- ;;^DD(58.11,35,1,1,"%D",2,0)
- ;;=for the option "Expiration Date Report".
- ;;^DD(58.11,35,3)
- ;;=Enter the Expiration Date for this Item.
- ;;^DD(58.11,35,21,0)
- ;;=^^1^1^2900706^^^
- ;;^DD(58.11,35,21,1,0)
- ;;=This field contains the expiration date for this item.
- ;;^DD(58.11,35,"DT")
- ;;=2900627
- ;;^DD(58.12,0)
- ;;=INVENTORY SUB-FIELD^NL^5^6
- ;;^DD(58.12,0,"IX","AMIS",58.12,4)
- ;;=
- ;;^DD(58.12,0,"IX","AMISERR",58.12,4)
- ;;=
- ;;^DD(58.12,0,"IX","C",58.12,.01)
- ;;=
- ;;^DD(58.12,0,"NM","INVENTORY")
- ;;=
- ;;^DD(58.12,0,"UP")
- ;;=58.11
- ;;^DD(58.12,.01,0)
- ;;=DATE/TIME FOR INVENTORY^P58.19'X^PSI(58.19,^0;1^S:$D(X) DINUM=X
- ;;^DD(58.12,.01,.1)
- ;;=
- ;;^DD(58.12,.01,1,0)
- ;;=^.1
- ;;^DD(58.12,.01,1,1,0)
- ;;=58.12^C^MUMPS
- ;;^DD(58.12,.01,1,1,1)
- ;;=S $P(^(1,DA,0),"^",2)=$P(^PSI(58.1,DA(2),1,DA(1),0),"^",2)
- ;;^DD(58.12,.01,1,1,2)
- ;;=S $P(^PSI(58.1,DA(2),1,DA(1),1,DA,0),"^",2)=""
- ;;^DD(58.12,.01,1,1,"%D",0)
- ;;=^^2^2^2930811^
- ;;^DD(58.12,.01,1,1,"%D",1,0)
- ;;=This cross-reference automatically sets the field LEVEL (58.12,1) equal
- ;;^DD(58.12,.01,1,1,"%D",2,0)
- ;;=to whatever is in the field STOCK LEVEL (58.11,1).
- ;;^DD(58.12,.01,3)
- ;;=
- ;;^DD(58.12,.01,21,0)
- ;;=^^1^1^2871008^^
- ;;^DD(58.12,.01,21,1,0)
- ;;=This contains the DATE/TIME of the inventory.
- ;;^DD(58.12,.01,"DT")
- ;;=2900213
- ;;^DD(58.12,1,0)
- ;;=LEVEL^RNJ4,0^^0;2^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
- ;;^DD(58.12,1,3)
- ;;=Type a whole number between 0 and 9999
- ;;^DD(58.12,1,9)
- ;;=^
- ;;^DD(58.12,1,21,0)
- ;;=^^1^1^2871008^^
- ;;^DD(58.12,1,21,1,0)
- ;;=This contains the stock level of the item for the inventory DATE/TIME.
- PSGWI008 ; ; 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 ;;^DD(58.11,30,1,5,"FIELD")
- +2 ;;=INACTIVATION REASON (OTHER)
- +3 ;;^DD(58.11,30,3)
- +4 ;;=Enter date when this item is no longer considered a ward stock item.
- +5 ;;^DD(58.11,30,21,0)
- +6 ;;=^^3^3^2890120^^
- +7 ;;^DD(58.11,30,21,1,0)
- +8 ;;=This contains the date on which the drug/item in the Area of Use
- +9 ;;^DD(58.11,30,21,2,0)
- +10 ;;=was inactivated, and thus is no longer considered part of the
- +11 ;;^DD(58.11,30,21,3,0)
- +12 ;;=standard stock for that Area of Use.
- +13 ;;^DD(58.11,30,"DT")
- +14 ;;=2930519
- +15 ;;^DD(58.11,31,0)
- +16 ;;=INACTIVATION REASON^S^N:NOT USED;O:OTHER;DF:DELETED FROM FORMULARY;^0;4^Q
- +17 ;;^DD(58.11,31,3)
- +18 ;;=
- +19 ;;^DD(58.11,31,5,1,0)
- +20 ;;=58.11^30^4
- +21 ;;^DD(58.11,31,21,0)
- +22 ;;=^^2^2^2871008^^^^
- +23 ;;^DD(58.11,31,21,1,0)
- +24 ;;=This contains the reason that the item has been inactivated from the list
- +25 ;;^DD(58.11,31,21,2,0)
- +26 ;;=of items normally stocked in this Area of Use.
- +27 ;;^DD(58.11,31,"DT")
- +28 ;;=2910415
- +29 ;;^DD(58.11,33,0)
- +30 ;;=INACTIVATION REASON (OTHER)^F^^0;9^K:$L(X)>40!($L(X)<3) X
- +31 ;;^DD(58.11,33,3)
- +32 ;;=Answer must be 3-40 characters in length
- +33 ;;^DD(58.11,33,5,1,0)
- +34 ;;=58.11^30^5
- +35 ;;^DD(58.11,33,21,0)
- +36 ;;=^^3^3^2871008^^
- +37 ;;^DD(58.11,33,21,1,0)
- +38 ;;=This contains the custom reason for inactivating the item from the
- +39 ;;^DD(58.11,33,21,2,0)
- +40 ;;=AOU stock list. An inactivation reason of 'other' should have been
- +41 ;;^DD(58.11,33,21,3,0)
- +42 ;;=entered if a custom reason is to be listed.
- +43 ;;^DD(58.11,33,"DT")
- +44 ;;=2840614
- +45 ;;^DD(58.11,34,0)
- +46 ;;=INACTIVE DATE FLAG^F^^0;10^K:$L(X)>3!($L(X)<1) X
- +47 ;;^DD(58.11,34,3)
- +48 ;;=Answer must be 1-3 characters in length
- +49 ;;^DD(58.11,34,5,1,0)
- +50 ;;=58.11^30^2
- +51 ;;^DD(58.11,34,9)
- +52 ;;=^
- +53 ;;^DD(58.11,34,21,0)
- +54 ;;=^^3^3^2871008^
- +55 ;;^DD(58.11,34,21,1,0)
- +56 ;;=This flag will be set to "YES" if there is an inactivation date
- +57 ;;^DD(58.11,34,21,2,0)
- +58 ;;=for the item in the AOU. If there is no inactivation date for
- +59 ;;^DD(58.11,34,21,3,0)
- +60 ;;=the item, then the flag will be set to "NO".
- +61 ;;^DD(58.11,34,"DT")
- +62 ;;=2841219
- +63 ;;^DD(58.11,35,0)
- +64 ;;=EXPIRATION DATE^D^^EXP;1^S %DT="E" D ^%DT S X=Y K:Y<1 X
- +65 ;;^DD(58.11,35,.1)
- +66 ;;= EXPIRATION DATE
- +67 ;;^DD(58.11,35,1,0)
- +68 ;;=^.1
- +69 ;;^DD(58.11,35,1,1,0)
- +70 ;;=58.1^AEXP^MUMPS
- +71 ;;^DD(58.11,35,1,1,1)
- +72 ;;=S PSGWDRUG=+^PSI(58.1,DA(1),1,DA,0),^PSI(58.1,"AEXP",$E(X,1,30),PSGWDRUG,DA(1))="" K PSGWDRUG
- +73 ;;^DD(58.11,35,1,1,2)
- +74 ;;=S PSGWDRUG=+^PSI(58.1,DA(1),1,DA,0) K ^PSI(58.1,"AEXP",$E(X,1,30),PSGWDRUG,DA(1)),PSGWDRUG
- +75 ;;^DD(58.11,35,1,1,"%D",0)
- +76 ;;=^^2^2^2930827^
- +77 ;;^DD(58.11,35,1,1,"%D",1,0)
- +78 ;;=This cross-reference is used to sort the expiration dates for stock items
- +79 ;;^DD(58.11,35,1,1,"%D",2,0)
- +80 ;;=for the option "Expiration Date Report".
- +81 ;;^DD(58.11,35,3)
- +82 ;;=Enter the Expiration Date for this Item.
- +83 ;;^DD(58.11,35,21,0)
- +84 ;;=^^1^1^2900706^^^
- +85 ;;^DD(58.11,35,21,1,0)
- +86 ;;=This field contains the expiration date for this item.
- +87 ;;^DD(58.11,35,"DT")
- +88 ;;=2900627
- +89 ;;^DD(58.12,0)
- +90 ;;=INVENTORY SUB-FIELD^NL^5^6
- +91 ;;^DD(58.12,0,"IX","AMIS",58.12,4)
- +92 ;;=
- +93 ;;^DD(58.12,0,"IX","AMISERR",58.12,4)
- +94 ;;=
- +95 ;;^DD(58.12,0,"IX","C",58.12,.01)
- +96 ;;=
- +97 ;;^DD(58.12,0,"NM","INVENTORY")
- +98 ;;=
- +99 ;;^DD(58.12,0,"UP")
- +100 ;;=58.11
- +101 ;;^DD(58.12,.01,0)
- +102 ;;=DATE/TIME FOR INVENTORY^P58.19'X^PSI(58.19,^0;1^S:$D(X) DINUM=X
- +103 ;;^DD(58.12,.01,.1)
- +104 ;;=
- +105 ;;^DD(58.12,.01,1,0)
- +106 ;;=^.1
- +107 ;;^DD(58.12,.01,1,1,0)
- +108 ;;=58.12^C^MUMPS
- +109 ;;^DD(58.12,.01,1,1,1)
- +110 ;;=S $P(^(1,DA,0),"^",2)=$P(^PSI(58.1,DA(2),1,DA(1),0),"^",2)
- +111 ;;^DD(58.12,.01,1,1,2)
- +112 ;;=S $P(^PSI(58.1,DA(2),1,DA(1),1,DA,0),"^",2)=""
- +113 ;;^DD(58.12,.01,1,1,"%D",0)
- +114 ;;=^^2^2^2930811^
- +115 ;;^DD(58.12,.01,1,1,"%D",1,0)
- +116 ;;=This cross-reference automatically sets the field LEVEL (58.12,1) equal
- +117 ;;^DD(58.12,.01,1,1,"%D",2,0)
- +118 ;;=to whatever is in the field STOCK LEVEL (58.11,1).
- +119 ;;^DD(58.12,.01,3)
- +120 ;;=
- +121 ;;^DD(58.12,.01,21,0)
- +122 ;;=^^1^1^2871008^^
- +123 ;;^DD(58.12,.01,21,1,0)
- +124 ;;=This contains the DATE/TIME of the inventory.
- +125 ;;^DD(58.12,.01,"DT")
- +126 ;;=2900213
- +127 ;;^DD(58.12,1,0)
- +128 ;;=LEVEL^RNJ4,0^^0;2^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
- +129 ;;^DD(58.12,1,3)
- +130 ;;=Type a whole number between 0 and 9999
- +131 ;;^DD(58.12,1,9)
- +132 ;;=^
- +133 ;;^DD(58.12,1,21,0)
- +134 ;;=^^1^1^2871008^^
- +135 ;;^DD(58.12,1,21,1,0)
- +136 ;;=This contains the stock level of the item for the inventory DATE/TIME.