Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Details
Print Page as PDF
Sub-Field: 55.07

Package: Pharmacy Data Management

PHARMACY PATIENT(#55)-->55.06-->55.07

Sub-Field: 55.07


Information

Parent File Name Number Package
55.06 DISPENSE DRUG 55.07 Pharmacy Data Management

Details

Field # Name Loc Type Details
.01 DISPENSE DRUG 0;1 POINTER TO DRUG FILE (#50)
************************REQUIRED FIELD************************
DRUG(#50)

  • INPUT TRANSFORM:  S DIC("S")="S X(1)=$P($G(^PSDRUG(+Y,2)),""^"",1) I X(1),X(1)=+$G(^PS(55,DA(1),5,DA,.2))" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
  • LAST EDITED:  MAY 05, 1999
  • HELP-PROMPT:  Enter a medication that will dispensed for this order.
  • DESCRIPTION:  
    This is a medication that will actually be dispensed by pharmacy for this order. Each dispense drug of an order must be tied to the primary drug of the order.
  • TECHNICAL DESCR:  This is a medications that will actually be dispensed by pharmacy for this order. An order may consist of more than one dispense drug. Each dispense drug of the order must be tied to the primary drug of the order
    through the PRIMARY DRUG field in the DRUG file.
  • SCREEN:  S DIC("S")="S X(1)=$P($G(^PSDRUG(+Y,2)),""^"",1) I X(1),X(1)=+$G(^PS(55,DA(1),5,DA,.2))"
  • EXPLANATION:  The dispense drug must be tied to the drug of the order.
  • DELETE TEST:  1,0)= W !?2,"Dispense Drugs for active orders cannot be deleted, but can be given an",!?2,"INACTIVE DATE."
  • LAYGO TEST:  1,0)= S X(1)=$D(^PS(55,DA(1),5,DA,1,"B",+X)) W:X(1) !?2,"This dispense drug has already been entered for this order." I 'X(1)
  • GROUP:  PSJU
  • CROSS-REFERENCE:  55.06^AL701^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(701))#2 KILL^PSGAL5:PSGAL(701)=X K PSGAL
    2)= I '$D(DIU(0)),'$D(PSGPO) S PSGAL(701)=X,PSGAL("C")=6000,PSGALFF=.01,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVITY LOG
    Used by Unit Dose to log any changes made to this field.
  • CROSS-REFERENCE:  55.07^B
    1)= S ^PS(55,DA(2),5,DA(1),1,"B",$E(X,1,30),DA)=""
    2)= K ^PS(55,DA(2),5,DA(1),1,"B",$E(X,1,30),DA)
.02 UNITS PER DOSE 0;2 NUMBER

  • INPUT TRANSFORM:  S:X?1.2N1"/"1.2N X=+$J(+X/$P(X,"/",2),0,2) K:X'?.N.1".".N!(X>30)!(X<0)!(X?.E1"."5.N) X
  • OUTPUT TRANSFORM:  S Y=$S(Y=.5:"1/2",Y=.25:"1/4",Y?1".".N:"0"_Y,1:Y)
  • LAST EDITED:  FEB 21, 2003
  • HELP-PROMPT:  Enter a number between 0 and 30, no more than 4 decimals (will accept fractions).
  • DESCRIPTION:  This is the number of UNITS (tablets, capsules, etc.) to be dispensed as a DOSE for this order. The literals '1/2' and '1/4' may be entered. If there is no entry, it is assumed to be ONE (1).
    ** PLEASE NOTE **
    If a doctor prescribes 30 ml's of a medication that is usually dispensed and administered as 60 ml's, the correct UNITS PER DOSE would be 1/2 (or .5), NOT 30 ml's. (30 ml's would be entered into the DOSAGE ORDERED
    field.)
    If the UNITS PER DOSE ordered is a variable amount (1-2 tab.), it is suggested that the maximum amount be entered into this field and the amount ordered noted either in the DOSAGE ORDERED or SPECIAL INSTRUCTIONS
    fields.
  • EXECUTABLE HELP:  D EN^DDIOL("ONE (1) UNIT PER DOSE WILL BE ASSUMED IF THERE IS NO ENTRY (OR AN ENTRY OF ZERO (0)) INTO THIS FIELD.")
  • GROUP:  PSJU
  • NOTES:  XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER
  • CROSS-REFERENCE:  55.06^AL702^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(702))#2 KILL^PSGAL5:PSGAL(702)=X K PSGAL
    2)= I '$D(DIU(0)),'$D(PSGPO) S PSGAL(702)=X,PSGAL("C")=6000,PSGALFF=.02,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVITY LOG
    Used by Unit Dose to log any changes made to this field.
.03 INACTIVE DATE 0;3 DATE

  • INPUT TRANSFORM:  S %DT="EX" D ^%DT S X=Y K:Y<1 X
  • LAST EDITED:  APR 26, 1992
  • HELP-PROMPT:  Enter the date that this drug will no longer be dispense for this order.
  • DESCRIPTION:  
    This is the date that this dispense drug will no longer be dispensed for this order. Once an order becomes active, dispense drugs cannot be deleted.
  • TECHNICAL DESCR:  
    This is used by pharmacy when the dispense drug is no longer to be dispensed for the order.
  • GROUP:  PSJU
.04 TOTAL UNITS DISPENSED COMPUTED

  • MUMPS CODE:  S Y(55.06,.04,1)=$G(^PS(55,D0,5,D1,1,D2,0)) S X=$P(Y(55.06,.04,1),U,6)+$P(Y(55.06,.04,1),U,10)+$P(Y(55.06,.04,1),U,12)-$P(Y(55.06,.04,1),U,7) S X=$J(X,0,2)
  • ALGORITHM:  UNITS ACTUALLY DISPENSED+TOTAL EXTRA UNITS DISPENSED+TOTAL PRE-EXCHANGE UNITS-TOTAL RETURNS (ALWAYS 2 DECIMAL DIGITS)
  • LAST EDITED:  NOV 20, 1986
  • DESCRIPTION:  
    This is the total number of units actually dispensed for this order, including any EXTRA UNIT DISPENSED, and PRE-EXCHANGE NEEDS.
  • GROUP:  PSJU
.05 UNITS CALLED FOR 0;5 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
  • LAST EDITED:  NOV 11, 1985
  • HELP-PROMPT:  Type a whole number between 0 and 9999.
  • DESCRIPTION:  
    This is the total number of units to be dispensed for this medication as calculated by the package.
  • GROUP:  PSJU
  • CROSS-REFERENCE:  55.06^AL705^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(705))#2 KILL^PSGAL5:PSGAL(705)=X K PSGAL
    2)= I '$D(DIU(0)),'$D(PSGPO) S PSGAL(705)=X,PSGAL("C")=6000,PSGALFF=.05,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVITY LOG
    Used by Unit Dose to log any changes made to this field.
.06 UNITS ACTUALLY DISPENSED 0;6 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
  • LAST EDITED:  JAN 09, 1986
  • HELP-PROMPT:  Type a whole number between 0 and 9999.
  • DESCRIPTION:  
    This is the number of units of this medication actually dispensed as entered by the pharmacist.
  • GROUP:  PSJU
  • CROSS-REFERENCE:  55.06^AL706^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(706))#2 KILL^PSGAL5:PSGAL(706)=X K PSGAL
    2)= I '$D(DIU(0)),'$D(PSGPO) S PSGAL(706)=X,PSGAL("C")=6000,PSGALFF=.06,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVITY LOG
    Used by Unit Dose to log any changes made to this field.
.07 TOTAL RETURNS 0;7 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>9999)!(X<0)!(X?.E1"."1N.N) X
  • LAST EDITED:  AUG 22, 1986
  • HELP-PROMPT:  Type a whole number between 0 and 9999.
  • DESCRIPTION:  
    This is the total number units returned for this medication over the life of the order.
  • GROUP:  PSJU
  • NOTES:  TRIGGERED by the *RETURNS field of the UNIT DOSE sub-field of the PHARMACY PATIENT File
    TRIGGERED by the RETURNS field of the DISPENSE DRUG sub-field of the UNIT DOSE sub-field of the PHARMACY PATIENT File
  • CROSS-REFERENCE:  55.06^AL707^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(707))#2 KILL^PSGAL5:PSGAL(707)=X K PSGAL
    2)= I '$D(PSGRET),'$D(DIU(0)),'$D(PSGPO) S PSGAL(707)=X,PSGAL("C")=6000,PSGALFF=.07,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVITY LOG
    Used by Unit Dose to log any changes made to this field.
.08 RETURNS 0;8 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>100)!(X<-100)!(X?.E1"."1N.N) X
  • LAST EDITED:  MAY 07, 1992
  • HELP-PROMPT:  Enter a whole number between -100 and 100.
  • DESCRIPTION:  
    This is the number of units returned of this medication from the patient's cassette upon the termination of this order.
  • EXECUTABLE HELP:  S Y1=$S('$D(^PS(55,DA(2),5,DA(1),1,DA,0)):0,1:$P(^(0),"^",7)) W !,$S(Y1:Y1_" TOTAL",1:"NO")," UNIT",$E("S",Y1'=1)," RETURNED, SO FAR."
  • GROUP:  PSJU
  • CROSS-REFERENCE:  ^^TRIGGER^55.07^.07
    1)= I X S DIU=$P($G(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",7),$P(^(0),"^",7)=DIU+X I $O(^DD(55.07,.07,1,0)) K DIV S (DIV(0),D0)=DA(2),(DIV(1),D1)=DA(1),(DIV(2),D2)=DA,DIV=DIU+X,DIH=55.07,DIG=.07 D ^DICR
    2)= Q
    CREATE VALUE)= TOTAL RETURNS=TOTAL RETURNS+RETURNS
    DELETE VALUE)= NO EFFECT
    FIELD)= TOTAL RETURNS
    Used to trigger data into field .07.
  • CROSS-REFERENCE:  55.07^AMSRET^MUMPS
    1)= I '$D(DIU(0)),X D EN^PSGAMSA(DA(2),DA(1),DA,4)
    2)= Q
    3)= Needed to register dispense stats.
    This is used to enter returns into this order's dispense log and into the Unit Dose Pick List Stats file.
.09 PRE-EXCHANGE UNITS 0;9 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>99)!(X<0)!(X?.E1"."3N.N) X
  • LAST EDITED:  MAY 07, 1992
  • HELP-PROMPT:  Type a Number between 0 and 99, 2 Decimal Digits.
  • DESCRIPTION:  
    This is the number of actual units required for this order until the next cart exchange.
  • GROUP:  PSJU
  • CROSS-REFERENCE:  55.06^AL709^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(709))#2 KILL^PSGAL5:PSGAL(709)=X K PSGAL
    2)= I '$D(DIU(0)),'$D(PSGPO) S PSGAL(709)=X,PSGAL("C")=6000,PSGALFF=.09,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVITY LOG
    Used by Unit Dose to log any changes made to this field.
  • CROSS-REFERENCE:  55.07^AMSPREX^MUMPS
    1)= I '$D(DIU(0)),X D EN^PSGAMSA(DA(2),DA(1),DA,2)
    2)= Q
    3)= Needed to register pre-exchange needs.
    This is used to update the order's dispense log and the Unit Dose Pick List Stats file.
  • CROSS-REFERENCE:  ^^TRIGGER^55.07^.12
    1)= I X S DIU=$P($G(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",12) S $P(^(0),"^",12)=DIU+X I $O(^DD(55.07,.12,1,0)) K DIV S (DIV,D0)=DA(2),(DIV(1),D1)=DA(1),(DIV(2),D2)=DA,DIV=DIU+X,DIH=55.07,DIG=.12 D ^DICR
    2)= Q
    CREATE CONDITION)= IF PRE-EXCHANGE NEEDS
    CREATE VALUE)= TOTAL PRE-EXCHANGE UNITS+PRE-EXCHANGE UNITS
    DELETE VALUE)= NO EFFECT
    FIELD)= TOTAL PRE-EXCHANGE UNITS
    Used to trigger data into field .12.
.1 TOTAL EXTRA UNITS DISPENSED 0;10 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>100)!(X<-100)!(X?.E1"."1N.N) X
  • LAST EDITED:  AUG 25, 1986
  • HELP-PROMPT:  Type a whole number between -100 and 100.
  • DESCRIPTION:  
    This is the total number of extra units dispensed for this order over the entire life of the order.
  • GROUP:  PSJU
  • NOTES:  TRIGGERED by the *EXTRA UNITS DISPENSED field of the UNIT DOSE sub-field of the PHARMACY PATIENT File
    TRIGGERED by the EXTRA UNITS DISPENSED field of the DISPENSE DRUG sub-field of the UNIT DOSE sub-field of the PHARMACY PATIENT File
  • CROSS-REFERENCE:  55.06^AL710^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(710)) KILL^PSGAL5:PSGAL(710)=X K PSGAL
    2)= I '$D(DIU(0)),'$D(PSGPO) S PSGAL(710)=X,PSGAL("C")=6000,PSGALFF=.1,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVTY LOG
    Used by Unit Dose to log any changes made to this field.
.11 EXTRA UNITS DISPENSED 0;11 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>100)!(X<-100)!(X?.E1"."1N.N) X
  • LAST EDITED:  MAY 07, 1992
  • HELP-PROMPT:  Enter a whole number between -100 and 100.
  • DESCRIPTION:  
    This is the number of units dispensed outside of the normal dispensing process (pick list).
  • GROUP:  PSJU
  • CROSS-REFERENCE:  ^^TRIGGER^55.07^.1
    1)= I X S DIU=$P($G(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",10),$P(^(0),"^",10)=DIU+X I $O(^DD(55.07,.1,1,0)) K DIV S (DIV(0),D0)=DA(2),(DIV(1),D1)=DA(1),(DIV(2),D2)=DA,DIV=DIU+X,DIH=55.07,DIG=.1 D ^DICR
    2)= Q
    CREATE VALUE)= TOTAL EXTRA UNITS DISPENSED+EXTRA UNITS DISPENSED
    DELETE VALUE)= NO EFFECT
    FIELD)= TOTAL EXTRA UNITS DISPENSED
    Used to trigger data into field .1.
  • CROSS-REFERENCE:  55.07^AMSEXTRA^MUMPS
    1)= I '$D(DIU(0)),X D EN^PSGAMSA(DA(2),DA(1),DA,3)
    2)= Q
    3)= Needed to register extra units dispensed.
    This is used to update the order's dispense log and the Unit Dose Pick List Stats file.
.12 TOTAL PRE-EXCHANGE UNITS 0;12 NUMBER

  • INPUT TRANSFORM:  K:+X'=X!(X>9999)!(X<0)!(X?.E1"."3N.N) X
  • LAST EDITED:  JUL 30, 1992
  • HELP-PROMPT:  Enter a number between 0 and 9999.
  • DESCRIPTION:  
    This is the total number of pre-exchange units dispensed over the life of the order.
  • GROUP:  PSJU
  • NOTES:  TRIGGERED by the PRE-EXCHANGE UNITS field of the DISPENSE DRUG sub-field of the UNIT DOSE sub-field of the PHARMACY PATIENT File
  • CROSS-REFERENCE:  55.07^AL712^MUMPS
    1)= I '$D(DIU(0)) D:$D(PSGAL(712))#2 KILL^PSGAL5:PSGAL(712)=X K PSGAL
    2)= I '$D(PSGPEN),'$D(DIU(0)),'$D(PSGPO) S PSGAL(712)=X,PSGAL("C")=6000,PSGALFF=.12,PSGALFN=55.07 D ^PSGAL5
    3)= UNIT DOSE ACTIVITY LOG
    Used by Unit Dose to log any changes made to this field.
Info |  Details