- PSGWI005 ; ; 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.1,4,21,2,0)
- ;;=credit for the AMIS statistics for this AOU.
- ;;^DD(58.1,4,"DT")
- ;;=2890627
- ;;^DD(58.1,5,0)
- ;;=ASK EXPIRATION DATE?^S^0:NO;1:YES;^0;4^Q
- ;;^DD(58.1,5,3)
- ;;=Enter '1' or 'Y' if you wish to be prompted for Expiration Dates for items in this Area of Use when entering on-demands or quantities dispensed.
- ;;^DD(58.1,5,21,0)
- ;;=^^5^5^2900705^
- ;;^DD(58.1,5,21,1,0)
- ;;=If this field is set to '1' or 'Yes' for the Area of Use, the user will
- ;;^DD(58.1,5,21,2,0)
- ;;=be prompted for Expiration Dates when on-demands or quantities dispensed
- ;;^DD(58.1,5,21,3,0)
- ;;=(for inventories) are entered. If this field is set to '0' or 'No',
- ;;^DD(58.1,5,21,4,0)
- ;;=Expiration Dates can only be entered through the supervisor option
- ;;^DD(58.1,5,21,5,0)
- ;;='Expiration Date Enter/Edit'.
- ;;^DD(58.1,5,"DT")
- ;;=2900705
- ;;^DD(58.1,6,0)
- ;;=CRASH CART FLAG^S^0:NO;1:YES;^0;5^Q
- ;;^DD(58.1,6,1,0)
- ;;=^.1
- ;;^DD(58.1,6,1,1,0)
- ;;=^^TRIGGER^58.1^7
- ;;^DD(58.1,6,1,1,1)
- ;;=Q
- ;;^DD(58.1,6,1,1,2)
- ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^PSI(58.1,D0,0)):^(0),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X="" S DIH=$S($D(^PSI(58.1,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,6)=DIV,DIH=58.1,DIG=7 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
- ;;^DD(58.1,6,1,1,"%D",0)
- ;;=^^2^2^2930830^
- ;;^DD(58.1,6,1,1,"%D",1,0)
- ;;=This cross-reference deletes any data in the CRASH CART LOCATION field
- ;;^DD(58.1,6,1,1,"%D",2,0)
- ;;=(58.1,7) if the CRASH CART FLAG is set to "NO".
- ;;^DD(58.1,6,1,1,"CREATE VALUE")
- ;;=NO EFFECT
- ;;^DD(58.1,6,1,1,"DELETE VALUE")
- ;;=@
- ;;^DD(58.1,6,1,1,"FIELD")
- ;;=CRASH CART LOCATION
- ;;^DD(58.1,6,3)
- ;;=Enter '1' or 'Y' if this Area of Use is a Crash Cart.
- ;;^DD(58.1,6,20,0)
- ;;=^.3LA^1^1
- ;;^DD(58.1,6,20,1,0)
- ;;=PSGW
- ;;^DD(58.1,6,21,0)
- ;;=^^3^3^2910503^^
- ;;^DD(58.1,6,21,1,0)
- ;;=This field will be set to '1' (for 'yes') if this area of use is a
- ;;^DD(58.1,6,21,2,0)
- ;;=crash cart. This flag will be used as a screen to list only crash
- ;;^DD(58.1,6,21,3,0)
- ;;=carts for the option 'Update Crash Cart Locations'.
- ;;^DD(58.1,6,"DT")
- ;;=2910503
- ;;^DD(58.1,7,0)
- ;;=CRASH CART LOCATION^P44'^SC(^0;6^Q
- ;;^DD(58.1,7,3)
- ;;=Enter the Location of this AOU. This field should only be used to enter locations for CRASH CARTS.
- ;;^DD(58.1,7,5,1,0)
- ;;=58.1^6^1
- ;;^DD(58.1,7,21,0)
- ;;=^^5^5^2910528^^
- ;;^DD(58.1,7,21,1,0)
- ;;=This field is meant to be used to record the location of an area of use
- ;;^DD(58.1,7,21,2,0)
- ;;=that is a crash cart. This field will be printed on the Expiration Date
- ;;^DD(58.1,7,21,3,0)
- ;;=report and will be updated in the option 'Update Crash Cart Locations'.
- ;;^DD(58.1,7,21,4,0)
- ;;=Only areas of use that have the field CRASH CART FLAG set to '1' (for
- ;;^DD(58.1,7,21,5,0)
- ;;='yes') will be selectable in the update option.
- ;;^DD(58.1,7,"DT")
- ;;=2910503
- ;;^DD(58.11,0)
- ;;=ITEM SUB-FIELD^NL^35^17
- ;;^DD(58.11,0,"DT")
- ;;=2930308
- ;;^DD(58.11,0,"ID",1)
- ;;=W ""
- ;;^DD(58.11,0,"ID",10)
- ;;=W:$D(^("0")) " ",$P(^("0"),U,8)
- ;;^DD(58.11,0,"IX","AC",58.11,30)
- ;;=
- ;;^DD(58.11,0,"IX","B",58.11,.01)
- ;;=
- ;;^DD(58.11,0,"NM","ITEM")
- ;;=
- ;;^DD(58.11,0,"UP")
- ;;=58.1
- ;;^DD(58.11,.01,0)
- ;;=ITEM^MR*P50'X^PSDRUG(^0;1^S DIC("S")="D DRGSCRN^PSGWUTL" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X I $D(X) D EDCHK^PSGWUTL
- ;;^DD(58.11,.01,1,0)
- ;;=^.1
- ;;^DD(58.11,.01,1,1,0)
- ;;=58.11^B
- ;;^DD(58.11,.01,1,1,1)
- ;;=S ^PSI(58.1,DA(1),1,"B",$E(X,1,30),DA)=""
- ;;^DD(58.11,.01,1,1,2)
- ;;=K ^PSI(58.1,DA(1),1,"B",$E(X,1,30),DA)
- ;;^DD(58.11,.01,3)
- ;;=
- ;;^DD(58.11,.01,4)
- ;;=
- ;;^DD(58.11,.01,12)
- ;;=Do not select INACTIVE or NON-PHARMACY items. NOTE: Items containing significant data can not be modified.
- ;;^DD(58.11,.01,12.1)
- ;;=S DIC("S")="D DRGSCRN^PSGWUTL"
- ;;^DD(58.11,.01,21,0)
- ;;=^^1^1^2930513^^^^
- ;;^DD(58.11,.01,21,1,0)
- ;;=ITEM defines the name of the drug stocked in this Area of Use.
- ;;^DD(58.11,.01,"DEL",13000,0)
- ;;=I 1 W !,"ITEMS CANNOT BE DELETED,MUST BE INACTIVATED!"
- ;;^DD(58.11,.01,"DT")
- ;;=2930603
- ;;^DD(58.11,1,0)
- ;;=STOCK LEVEL^RNJ4,0^^0;2^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
- PSGWI005 ; ; 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.1,4,21,2,0)
- +2 ;;=credit for the AMIS statistics for this AOU.
- +3 ;;^DD(58.1,4,"DT")
- +4 ;;=2890627
- +5 ;;^DD(58.1,5,0)
- +6 ;;=ASK EXPIRATION DATE?^S^0:NO;1:YES;^0;4^Q
- +7 ;;^DD(58.1,5,3)
- +8 ;;=Enter '1' or 'Y' if you wish to be prompted for Expiration Dates for items in this Area of Use when entering on-demands or quantities dispensed.
- +9 ;;^DD(58.1,5,21,0)
- +10 ;;=^^5^5^2900705^
- +11 ;;^DD(58.1,5,21,1,0)
- +12 ;;=If this field is set to '1' or 'Yes' for the Area of Use, the user will
- +13 ;;^DD(58.1,5,21,2,0)
- +14 ;;=be prompted for Expiration Dates when on-demands or quantities dispensed
- +15 ;;^DD(58.1,5,21,3,0)
- +16 ;;=(for inventories) are entered. If this field is set to '0' or 'No',
- +17 ;;^DD(58.1,5,21,4,0)
- +18 ;;=Expiration Dates can only be entered through the supervisor option
- +19 ;;^DD(58.1,5,21,5,0)
- +20 ;;='Expiration Date Enter/Edit'.
- +21 ;;^DD(58.1,5,"DT")
- +22 ;;=2900705
- +23 ;;^DD(58.1,6,0)
- +24 ;;=CRASH CART FLAG^S^0:NO;1:YES;^0;5^Q
- +25 ;;^DD(58.1,6,1,0)
- +26 ;;=^.1
- +27 ;;^DD(58.1,6,1,1,0)
- +28 ;;=^^TRIGGER^58.1^7
- +29 ;;^DD(58.1,6,1,1,1)
- +30 ;;=Q
- +31 ;;^DD(58.1,6,1,1,2)
- +32 ;;=K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^PSI(58.1,D0,0)):^(0),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X="" S DIH=$S($D(^PSI(58.1,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,6)=DIV,DIH=58.1,DIG=7 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
- +33 ;;^DD(58.1,6,1,1,"%D",0)
- +34 ;;=^^2^2^2930830^
- +35 ;;^DD(58.1,6,1,1,"%D",1,0)
- +36 ;;=This cross-reference deletes any data in the CRASH CART LOCATION field
- +37 ;;^DD(58.1,6,1,1,"%D",2,0)
- +38 ;;=(58.1,7) if the CRASH CART FLAG is set to "NO".
- +39 ;;^DD(58.1,6,1,1,"CREATE VALUE")
- +40 ;;=NO EFFECT
- +41 ;;^DD(58.1,6,1,1,"DELETE VALUE")
- +42 ;;=@
- +43 ;;^DD(58.1,6,1,1,"FIELD")
- +44 ;;=CRASH CART LOCATION
- +45 ;;^DD(58.1,6,3)
- +46 ;;=Enter '1' or 'Y' if this Area of Use is a Crash Cart.
- +47 ;;^DD(58.1,6,20,0)
- +48 ;;=^.3LA^1^1
- +49 ;;^DD(58.1,6,20,1,0)
- +50 ;;=PSGW
- +51 ;;^DD(58.1,6,21,0)
- +52 ;;=^^3^3^2910503^^
- +53 ;;^DD(58.1,6,21,1,0)
- +54 ;;=This field will be set to '1' (for 'yes') if this area of use is a
- +55 ;;^DD(58.1,6,21,2,0)
- +56 ;;=crash cart. This flag will be used as a screen to list only crash
- +57 ;;^DD(58.1,6,21,3,0)
- +58 ;;=carts for the option 'Update Crash Cart Locations'.
- +59 ;;^DD(58.1,6,"DT")
- +60 ;;=2910503
- +61 ;;^DD(58.1,7,0)
- +62 ;;=CRASH CART LOCATION^P44'^SC(^0;6^Q
- +63 ;;^DD(58.1,7,3)
- +64 ;;=Enter the Location of this AOU. This field should only be used to enter locations for CRASH CARTS.
- +65 ;;^DD(58.1,7,5,1,0)
- +66 ;;=58.1^6^1
- +67 ;;^DD(58.1,7,21,0)
- +68 ;;=^^5^5^2910528^^
- +69 ;;^DD(58.1,7,21,1,0)
- +70 ;;=This field is meant to be used to record the location of an area of use
- +71 ;;^DD(58.1,7,21,2,0)
- +72 ;;=that is a crash cart. This field will be printed on the Expiration Date
- +73 ;;^DD(58.1,7,21,3,0)
- +74 ;;=report and will be updated in the option 'Update Crash Cart Locations'.
- +75 ;;^DD(58.1,7,21,4,0)
- +76 ;;=Only areas of use that have the field CRASH CART FLAG set to '1' (for
- +77 ;;^DD(58.1,7,21,5,0)
- +78 ;;='yes') will be selectable in the update option.
- +79 ;;^DD(58.1,7,"DT")
- +80 ;;=2910503
- +81 ;;^DD(58.11,0)
- +82 ;;=ITEM SUB-FIELD^NL^35^17
- +83 ;;^DD(58.11,0,"DT")
- +84 ;;=2930308
- +85 ;;^DD(58.11,0,"ID",1)
- +86 ;;=W ""
- +87 ;;^DD(58.11,0,"ID",10)
- +88 ;;=W:$D(^("0")) " ",$P(^("0"),U,8)
- +89 ;;^DD(58.11,0,"IX","AC",58.11,30)
- +90 ;;=
- +91 ;;^DD(58.11,0,"IX","B",58.11,.01)
- +92 ;;=
- +93 ;;^DD(58.11,0,"NM","ITEM")
- +94 ;;=
- +95 ;;^DD(58.11,0,"UP")
- +96 ;;=58.1
- +97 ;;^DD(58.11,.01,0)
- +98 ;;=ITEM^MR*P50'X^PSDRUG(^0;1^S DIC("S")="D DRGSCRN^PSGWUTL" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X I $D(X) D EDCHK^PSGWUTL
- +99 ;;^DD(58.11,.01,1,0)
- +100 ;;=^.1
- +101 ;;^DD(58.11,.01,1,1,0)
- +102 ;;=58.11^B
- +103 ;;^DD(58.11,.01,1,1,1)
- +104 ;;=S ^PSI(58.1,DA(1),1,"B",$E(X,1,30),DA)=""
- +105 ;;^DD(58.11,.01,1,1,2)
- +106 ;;=K ^PSI(58.1,DA(1),1,"B",$E(X,1,30),DA)
- +107 ;;^DD(58.11,.01,3)
- +108 ;;=
- +109 ;;^DD(58.11,.01,4)
- +110 ;;=
- +111 ;;^DD(58.11,.01,12)
- +112 ;;=Do not select INACTIVE or NON-PHARMACY items. NOTE: Items containing significant data can not be modified.
- +113 ;;^DD(58.11,.01,12.1)
- +114 ;;=S DIC("S")="D DRGSCRN^PSGWUTL"
- +115 ;;^DD(58.11,.01,21,0)
- +116 ;;=^^1^1^2930513^^^^
- +117 ;;^DD(58.11,.01,21,1,0)
- +118 ;;=ITEM defines the name of the drug stocked in this Area of Use.
- +119 ;;^DD(58.11,.01,"DEL",13000,0)
- +120 ;;=I 1 W !,"ITEMS CANNOT BE DELETED,MUST BE INACTIVATED!"
- +121 ;;^DD(58.11,.01,"DT")
- +122 ;;=2930603
- +123 ;;^DD(58.11,1,0)
- +124 ;;=STOCK LEVEL^RNJ4,0^^0;2^K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X