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

PSGWI024.m

Go to the documentation of this file.
  1. PSGWI024 ; ; 04-JAN-1994
  1. ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
  1. Q:'DIFQ(58.5) 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.51,3,3)
  1. ;;=Type a whole number between 1 and 999999
  1. ;;^DD(58.51,3,21,0)
  1. ;;=^^1^1^2890619^^
  1. ;;^DD(58.51,3,21,1,0)
  1. ;;=DOSES RETURNED = QUANTITY RETURNED * AMIS CONVERSION NUMBER
  1. ;;^DD(58.51,4,0)
  1. ;;=RETURNS COST^NJ14,6^^0;5^K:+X'=X!(X>9999999)!(X<0)!(X?.E1"."7N.N) X
  1. ;;^DD(58.51,4,3)
  1. ;;=Type a Number between 0 and 9999999, 6 Decimal Digits
  1. ;;^DD(58.51,4,21,0)
  1. ;;=^^1^1^2890705^^^
  1. ;;^DD(58.51,4,21,1,0)
  1. ;;=RETURNS COST = QUANTITY RETURNED * PRICE PER DISPENSE UNIT
  1. ;;^DD(58.51,4,"DT")
  1. ;;=2891102
  1. ;;^DD(58.52,0)
  1. ;;=RECALCULATE AMIS SUB-FIELD^^2^3
  1. ;;^DD(58.52,0,"IX","B",58.52,.01)
  1. ;;=
  1. ;;^DD(58.52,0,"NM","RECALCULATE AMIS")
  1. ;;=
  1. ;;^DD(58.52,0,"UP")
  1. ;;=58.501
  1. ;;^DD(58.52,.01,0)
  1. ;;=DRUG^MP50'^PSDRUG(^0;1^Q
  1. ;;^DD(58.52,.01,1,0)
  1. ;;=^.1
  1. ;;^DD(58.52,.01,1,1,0)
  1. ;;=58.52^B
  1. ;;^DD(58.52,.01,1,1,1)
  1. ;;=S ^PSI(58.5,DA(2),"S",DA(1),"DRG","B",$E(X,1,30),DA)=""
  1. ;;^DD(58.52,.01,1,1,2)
  1. ;;=K ^PSI(58.5,DA(2),"S",DA(1),"DRG","B",$E(X,1,30),DA)
  1. ;;^DD(58.52,.01,1,2,0)
  1. ;;=58.5^D
  1. ;;^DD(58.52,.01,1,2,1)
  1. ;;=S ^PSI(58.5,"D",$E(X,1,30),DA(2),DA(1),DA)=""
  1. ;;^DD(58.52,.01,1,2,2)
  1. ;;=K ^PSI(58.5,"D",$E(X,1,30),DA(2),DA(1),DA)
  1. ;;^DD(58.52,.01,21,0)
  1. ;;=^^3^3^2890619^^^
  1. ;;^DD(58.52,.01,21,1,0)
  1. ;;=This contains the internal drug number of the drug being dispensed or
  1. ;;^DD(58.52,.01,21,2,0)
  1. ;;=returned. Thus, if cost data is found to be inaccurate, the AMIS may be
  1. ;;^DD(58.52,.01,21,3,0)
  1. ;;=recalculated.
  1. ;;^DD(58.52,1,0)
  1. ;;=CATEGORY^58.53SA^^CAT;0
  1. ;;^DD(58.52,2,0)
  1. ;;=MISSING DATA^S^1:YES;0:NO;^0;2^Q
  1. ;;^DD(58.52,2,1,0)
  1. ;;=^.1
  1. ;;^DD(58.52,2,1,1,0)
  1. ;;=58.5^AEX^MUMPS
  1. ;;^DD(58.52,2,1,1,1)
  1. ;;=I X=1 S ^PSI(58.5,"AEX",DA(2),DA(1),DA)=""
  1. ;;^DD(58.52,2,1,1,2)
  1. ;;=K ^PSI(58.5,"AEX",DA(2),DA(1),DA)
  1. ;;^DD(58.52,2,1,1,"%D",0)
  1. ;;=^^3^3^2930827^
  1. ;;^DD(58.52,2,1,1,"%D",1,0)
  1. ;;=This cross-reference is used to sort drugs with missing AMIS data by
  1. ;;^DD(58.52,2,1,1,"%D",2,0)
  1. ;;=Date/Inpatient Site/Drug. It is used by the options "Inventory Outline",
  1. ;;^DD(58.52,2,1,1,"%D",3,0)
  1. ;;="Print AMIS Report","Incomplete AMIS Data", and "Recalculate AMIS".
  1. ;;^DD(58.52,2,21,0)
  1. ;;=^^4^4^2890906^^^^
  1. ;;^DD(58.52,2,21,1,0)
  1. ;;=This flag is set if data needed to calculate the AMIS is missing at the
  1. ;;^DD(58.52,2,21,2,0)
  1. ;;=time the quantity is dispensed or returned. Also, an "exceptions"
  1. ;;^DD(58.52,2,21,3,0)
  1. ;;=cross-reference is created. Before the AMIS will print, this missing data
  1. ;;^DD(58.52,2,21,4,0)
  1. ;;=must be supplied, the cross-reference deleted, and the flag reset.
  1. ;;^DD(58.53,0)
  1. ;;=CATEGORY SUB-FIELD^^1^2
  1. ;;^DD(58.53,0,"NM","CATEGORY")
  1. ;;=
  1. ;;^DD(58.53,0,"UP")
  1. ;;=58.52
  1. ;;^DD(58.53,.01,0)
  1. ;;=CATEGORY^S^A:AUTOMATIC REPLENISHMENT;W:WARD STOCK;RA:RETURNS - AUTO REPLENISHED;RW:RETURNS - WARD STOCKED;^0;1^Q
  1. ;;^DD(58.53,.01,21,0)
  1. ;;=^^3^3^2890619^^
  1. ;;^DD(58.53,.01,21,1,0)
  1. ;;=Category identifies how the quantity dispensed or returned was originally
  1. ;;^DD(58.53,.01,21,2,0)
  1. ;;=ordered: Automatic Replenishment, On-Demand, returned from Automatic
  1. ;;^DD(58.53,.01,21,3,0)
  1. ;;=Replenishment, or returned from On-Demand.
  1. ;;^DD(58.53,1,0)
  1. ;;=QUANTITY DISPENSED^NJ5,0^^0;2^K:+X'=X!(X>99999)!(X<-99999)!(X?.E1"."1N.N) X
  1. ;;^DD(58.53,1,3)
  1. ;;=Type a Number between -99999 and 99999, 0 Decimal Digits
  1. ;;^DD(58.53,1,21,0)
  1. ;;=^^1^1^2890619^^
  1. ;;^DD(58.53,1,21,1,0)
  1. ;;=This amount identifies the quantity dispensed or returned.
  1. ;;^DD(58.53,1,"DT")
  1. ;;=2891101