Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Desc |  Directly Accessed By Routines |  Accessed By FileMan Db Calls |  Pointer To FileMan Files |  Fields |  Found Entries |  All
Print Page as PDF
Global: ^APSPP(31

Package: IHS Changes To Pharmacy

Global: ^APSPP(31


Information

FileMan FileNo FileMan Filename Package
9009031 APSP PREPACK LOG IHS Changes To Pharmacy

Description

Directly Accessed By Routines, Total: 21

Package Total Routines
IHS Changes To Pharmacy 21 APSER    APSLR    APSPE    APSPE2    APSPE3    APSPR    APSPRT    APSPRT1
APSPT09    APSPT091    APSPT092    APSPT093    APSPT10    APSPT102    APSPT103    APSPT104
APSPT105    APSPT106    APSPT13    APSPT14    APSPT15    

Accessed By FileMan Db Calls, Total: 15

Package Total Routines
IHS Changes To Pharmacy 15 APSPE    APSPE2    APSPE3    APSPLDEL    APSPRT    APSPT09    APSPT091    APSPT092
APSPT093    APSPT10    APSPT102    APSPT103    APSPT104    APSPT105    APSPT106    

Pointer To FileMan Files, Total: 4

Package Total FileMan Files
IHS Changes To Pharmacy 3 APSP PREPACK LABELS(#9009031.1)[.03]    APSP PREPACK LOCATION(#9009031.2)[#9009031.15(.01)]    APSP MANUFACTURER(#9009031.3)[.04]    
Kernel 1 USER(#3)[.13.14]    

Fields, Total: 16

Field # Name Loc Type Details
.01 IHS CONTROL # 0;1 FREE TEXT
************************REQUIRED FIELD************************

  • INPUT TRANSFORM:  K:$L(X)>10!($L(X)<3)!'(X'?1P.E) X
  • LAST EDITED:  JUL 21, 1989
  • HELP-PROMPT:  Answer must be 3-10 characters in length. ie 100P,100U,020789P
  • DESCRIPTION:  
    This field represents the Indian Health Service prepack log indentification number.
  • DELETE TEST:  1,0)= I '$D(APSP("LOG DEL FLG"))
  • CROSS-REFERENCE:  9009031^B
    1)= S ^APSPP(31,"B",$E(X,1,30),DA)=""
    2)= K ^APSPP(31,"B",$E(X,1,30),DA)
.02 FILL DATE 0;2 DATE
************************REQUIRED FIELD************************

  • INPUT TRANSFORM:  S %DT="ETX" D ^%DT S X=Y K:Y<1 X
  • LAST EDITED:  AUG 19, 1989
  • HELP-PROMPT:  Please enter the date that the prepacks were prepared
  • DESCRIPTION:  
    This is the date that the prepack was prepared.  It can be any standard Fileman compatable date for input.
  • CROSS-REFERENCE:  9009031^AD^MUMPS
    1)= S ^APSPP(31,"AD",X,DA,0)=""
    2)= K ^APSPP(31,"AD",X,DA,0)
.03 DRUG 0;3 POINTER TO APSP PREPACK LABELS FILE (#9009031.1)
************************REQUIRED FIELD************************
APSP PREPACK LABELS(#9009031.1)

  • INPUT TRANSFORM:  S DIC("S")="I $S('$D(^APSPP(31.1,Y,""I"")):1,1:0)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
  • OUTPUT TRANSFORM:  S:$D(^APSPP(31,D0,"TN")) Y=^("TN")
  • LAST EDITED:  AUG 21, 1989
  • HELP-PROMPT:  Please enter the generic name of the drug that you wish to print labels for. ie. AMPICILLIN 250MG
  • DESCRIPTION:  
    This is the drug that was prepacked or unit dosed.  This is a pointer to the APSP PREPACK LABEL file which in turn points to the DRUG file.  No entries that have an inactive date will be allowed.
  • SCREEN:  S DIC("S")="I $S('$D(^APSPP(31.1,Y,""I"")):1,1:0)"
  • EXPLANATION:  This prevents all Prepack Drugs that have been inactivated to not be displayed or selectable.
  • CROSS-REFERENCE:  9009031^AC
    1)= S ^APSPP(31,"AC",$E(X,1,30),DA)=""
    2)= K ^APSPP(31,"AC",$E(X,1,30),DA)
.035 TRADE NAME TN;1 FREE TEXT

  • INPUT TRANSFORM:  K:$L(X)>32!($L(X)<1) X
  • LAST EDITED:  AUG 19, 1989
  • HELP-PROMPT:  Enter name to replace drug name on the label, cannot exceed 32 characters.
.04 MANUFACTURER 0;4 POINTER TO APSP MANUFACTURER FILE (#9009031.3)
************************REQUIRED FIELD************************
APSP MANUFACTURER(#9009031.3)

  • INPUT TRANSFORM:  S DIC("S")="I $S('$D(^APSPP(31.3,U,""I"")):1,1:0)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
  • LAST EDITED:  JUL 24, 1989
  • HELP-PROMPT:  Enter the name of the company that manufacturered the drug you are using for your prepacks or unit doses.
  • DESCRIPTION:  This is the manufacturer of the drug that was used in preparation of the prepacks. It is a pointer field to the APSP MANUFACTURER file. Any entries in that file that have a inactive date will not be allowed for
    selection.
  • SCREEN:  S DIC("S")="I $S('$D(^APSPP(31.3,U,""I"")):1,1:0)"
  • EXPLANATION:  Any manufacturers that have an inactive date will not be selectable.
.05 LOT # 0;5 FREE TEXT
************************REQUIRED FIELD************************

  • INPUT TRANSFORM:  K:$L(X)>15!($L(X)<1) X
  • LAST EDITED:  JUL 23, 1989
  • HELP-PROMPT:  Answer must be 1-15 characters in length. Please enter the lot number on the container used to prepare the prepacks.
  • DESCRIPTION:  
    This is the lot number from the stock bottle that was used to prepare the preacks and unit dose items.
.06 EXPIRATION DATE 0;6 DATE
************************REQUIRED FIELD************************

  • INPUT TRANSFORM:  S %DT="E" D ^%DT S X=Y K:Y<1 X
  • LAST EDITED:  JUL 23, 1989
  • HELP-PROMPT:  Enter the expiration date of the prepack.
  • DESCRIPTION:  
    This is the expiration date for the prepack that you are preparing.  Normally it is not recommended to have a expiration date longer than 6 months from the date you prepare the prepacks.
.07 TYPE 0;7 SET
************************REQUIRED FIELD************************
  • 'P' FOR PREPACK;
  • 'U' FOR UNIT DOSE;

  • LAST EDITED:  AUG 20, 1989
  • HELP-PROMPT:  If the prepacks are for the after hour rooms or for field clinics please enter a 'P', if for a unit dose tablet or capsule enter a 'U'.
  • DESCRIPTION:  This is the type of prepack you are doing. There are two types: 1) P for prepack, this would be for after hour cabinets, field clinics,
    etc.  The type of label produced will be your standard field clinic
    label.
    2) U for unit dose, this would be for inpatient dispensing.  It will
    produce a small label with just the name,lot#,expiration date on
    the label.
.08 QTY PER CONTAINER 0;8 NUMBER
************************REQUIRED FIELD************************

  • INPUT TRANSFORM:  K:+X<.01!(+X>9999.99)!($L(X)>10)!'(X?1.4N!(X?.4N1"."1.2N)!(X?1.4N1" ".ANP)!(X?.4N1"."1.2N1" ".ANP)) X
  • LAST EDITED:  MAY 23, 1990
  • HELP-PROMPT:  Type a Number between 0 and 9999.99inclusive. An alpha suffix is allowed after a space, but total entry cannot exceed 10 characters.
  • DESCRIPTION:  
    This the number of tablets, capsules, gms, or mls that are in each prepack. you can enter characters after a space follwing the numbers. ie 10 ml, 15 gms
  • NOTES:  XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER
  • CROSS-REFERENCE:  ^^TRIGGER^9009031^.11
    1)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$D(DIU(0))=0 I X S X=DIV S Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y X ^DD(9009031,.08,1,1,1.1) X ^DD(9009031,.08,1,1,1.4)
    1.1)= S X=DIV X ^DD(9009031,.08,1,1,49.3) S X=$P(Y(201),U,6),Y(202)=X S X=$P(Y(1),U,9)*DIV,Y=X,X=Y(202),X=X*Y S D0=I(0,0)
    1.4)= S DIH=$S($D(^APSPP(31,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,11)=DIV,DIH=9009031,DIG=.11 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    2)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$D(DIU(0))=0 I X S X=DIV S Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X="" X ^DD(9009031,.08,1,1,2.4)
    2.4)= S DIH=$S($D(^APSPP(31,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,11)=DIV,DIH=9009031,DIG=.11 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    49.2)= S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:""),D0=$P(Y(1),U,3) S:'$D(^APSPP(31.1,+D0,0)) D0=-1 S I(100,0)=$S($D(D0):D0,1:"")
    49.3)= X ^DD(9009031,.08,1,1,49.2) S Y(101)=$S($D(^APSPP(31.1,D0,0)):^(0),1:""),D0=$P(Y(101),U,1) S:'$D(^PSDRUG(+D0,0)) D0=-1 S Y(201)=$S($D(^PSDRUG(D0,660)):^(660),1:"")
    CREATE CONDITION)= S X=$D(DIU(0))=0
    CREATE VALUE)= #.03:#.01:#16*(NUMBER OF PREPACKS*QTY PER CONTAINER)
    DELETE CONDITION)= S X=$D(DIU(0))=0
    DELETE VALUE)= @
    FIELD)= TOTAL COST
  • CROSS-REFERENCE:  ^^TRIGGER^50^50
    1)= X ^DD(9009031,.08,1,2,1.3) I X S X=DIV X ^DD(9009031,.08,1,2,89.3) S X=$P(Y(201),U,1) S D0=I(0,0) S DIU=X K Y X ^DD(9009031,.08,1,2,1.1) X ^DD(9009031,.08,1,2,1.4)
    1.1)= S X=DIV S Y(2)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=DIU,Y(1)=X S X=DIV*$P(Y(2),U,9),Y=X,X=Y(1),X=X-Y
    1.3)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(9009031,.08,1,2,69.2) S X=X="YES",Y(3)=X S X=$P(Y(1),U,9)'="",Y=X,X=Y(3),X=X&Y S:X X=$D(DIU(0))=0
    1.4)= S DIH=$S($D(^PSDRUG(DIV(0),660.1)):^(660.1),1:""),DIV=X I $D(^(0)) S $P(^(660.1),U,1)=DIV,DIH=50,DIG=50 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    2)= X ^DD(9009031,.08,1,2,2.3) I X S X=DIV X ^DD(9009031,.08,1,2,89.3) S X=$P(Y(201),U,1) S D0=I(0,0) S DIU=X K Y X ^DD(9009031,.08,1,2,2.1) X ^DD(9009031,.08,1,2,2.4)
    2.1)= S X=DIV S Y(2)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=DIU,Y(1)=X S X=DIV*$P(Y(2),U,9),Y=X,X=Y(1),X=X+Y
    2.3)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(9009031,.08,1,2,79.2) S X=X="YES",Y(3)=X S X=$P(Y(1),U,9)'="",Y=X,X=Y(3),X=X&Y S:X X=$D(DIU(0))=0
    2.4)= S DIH=$S($D(^PSDRUG(DIV(0),660.1)):^(660.1),1:""),DIV=X I $D(^(0)) S $P(^(660.1),U,1)=DIV,DIH=50,DIG=50 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    69.2)= S Y(2)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,16)_":",2),$C(59),1)
    79.2)= S Y(2)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,16)_":",2),$C(59),1)
    89.2)= S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:""),D0=$P(Y(1),U,3) S:'$D(^APSPP(31.1,+D0,0)) D0=-1 S DIV(0)=D0 S I(100,0)=$S($D(D0):D0,1:"")
    89.3)= X ^DD(9009031,.08,1,2,89.2) S Y(101)=$S($D(^APSPP(31.1,D0,0)):^(0),1:""),D0=$P(Y(101),U,1) S:'$D(^PSDRUG(+D0,0)) D0=-1 S DIV(0)=D0 S Y(201)=$S($D(^PSDRUG(D0,660.1)):^(660.1),1:"")
    CREATE CONDITION)= SUBTRACT FROM INVENTORY="YES"&(NUMBER OF PREPACKS'="")
    CREATE VALUE)= CURRENT INVENTORY-(QTY PER CONTAINER*NUMBER OF PREPACKS)
    DELETE CONDITION)= SUBTRACT FROM INVENTORY="YES"&(NUMBER OF PREPACKS'="")
    DELETE VALUE)= CURRENT INVENTORY+(OLD QTY PER CONTAINER*NUMBER OF PREPACKS)
    FIELD)= #.03:#.01:#50
  • CROSS-REFERENCE:  9009031^APSPZ1^MUMPS
    1)= K APSP("PREPACK LOG FLG")
    2)= S APSP("PREPACK LOG FLG")=""
.09 NUMBER OF PREPACKS 0;9 NUMBER
************************REQUIRED FIELD************************

  • INPUT TRANSFORM:  K:+X'=X!(X>999)!(X<0)!(X?.E1"."1N.N) X
  • LAST EDITED:  AUG 02, 1994
  • HELP-PROMPT:  Type a Number between 0 and 999, 0 Decimal Digits
  • DESCRIPTION:  This is the number of prepacks that you are preparing. This will also be the number of labels you print out if you desire to print the labels. This field is also involved in calculating out the total cost of the prepacks
    and also in subtraction from your Drug inventory.
  • CROSS-REFERENCE:  ^^TRIGGER^9009031^.11
    1)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$D(DIU(0))=0 I X S X=DIV S Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y X ^DD(9009031,.09,1,1,1.1) X ^DD(9009031,.09,1,1,1.4)
    1.1)= S X=DIV X ^DD(9009031,.09,1,1,49.3) S X=$P(Y(201),U,6),Y(202)=X S X=DIV*$P(Y(1),U,8),Y=X,X=Y(202),X=X*Y S D0=I(0,0)
    1.4)= S DIH=$S($D(^APSPP(31,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,11)=DIV,DIH=9009031,DIG=.11 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    2)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X=$D(DIU(0))=0 I X S X=DIV S Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P(Y(1),U,11),X=X S DIU=X K Y S X="" X ^DD(9009031,.09,1,1,2.4)
    2.4)= S DIH=$S($D(^APSPP(31,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,11)=DIV,DIH=9009031,DIG=.11 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    49.2)= S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:""),D0=$P(Y(1),U,3) S:'$D(^APSPP(31.1,+D0,0)) D0=-1 S I(100,0)=$S($D(D0):D0,1:"")
    49.3)= X ^DD(9009031,.09,1,1,49.2) S Y(101)=$S($D(^APSPP(31.1,D0,0)):^(0),1:""),D0=$P(Y(101),U,1) S:'$D(^PSDRUG(+D0,0)) D0=-1 S Y(201)=$S($D(^PSDRUG(D0,660)):^(660),1:"")
    CREATE CONDITION)= S X=$D(DIU(0))=0
    CREATE VALUE)= #.03:#.01:#16*(NUMBER OF PREPACKS*QTY PER CONTAINER)
    DELETE CONDITION)= S X=$D(DIU(0))=0
    DELETE VALUE)= @
    FIELD)= TOTAL COST
  • CROSS-REFERENCE:  ^^TRIGGER^50^50
    1)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(9009031,.09,1,2,69.2) S X=X="YES" S:X X=$D(DIU(0))=0 I X S X=DIV X ^DD(9009031,.09,1,2,89.3) S X=$P(Y(201),U,1) S D0=I(0,0) S DIU=X K Y X ^DD(9009031,.09,1,2,1.1) X ^DD(9009
    031,.09,1,2,1.4)
    1.1)= S X=DIV S Y(2)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=DIU,Y(1)=X S X=$P(Y(2),U,8)*DIV,Y=X,X=Y(1),X=X-Y
    1.4)= S DIH=$S($D(^PSDRUG(DIV(0),660.1)):^(660.1),1:""),DIV=X I $D(^(0)) S $P(^(660.1),U,1)=DIV,DIH=50,DIG=50 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    2)= X ^DD(9009031,.09,1,2,2.3) S:X X=$D(DIU(0))=0 I X S X=DIV X ^DD(9009031,.09,1,2,89.3) S X=$P(Y(201),U,1) S D0=I(0,0) S DIU=X K Y X ^DD(9009031,.09,1,2,2.1) X ^DD(9009031,.09,1,2,2.4)
    2.1)= S X=DIV S Y(2)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=DIU,Y(1)=X S X=$P(Y(2),U,8)*DIV,Y=X,X=Y(1),X=X+Y
    2.3)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(9009031,.09,1,2,79.2) S X=X="YES",Y(3)=X S:$D(APSP("PREPACK LOG FLG")) X=0 S Y=X,X=Y(3),X=X&Y
    2.4)= S DIH=$S($D(^PSDRUG(DIV(0),660.1)):^(660.1),1:""),DIV=X I $D(^(0)) S $P(^(660.1),U,1)=DIV,DIH=50,DIG=50 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    69.2)= S Y(2)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,16)_":",2),$C(59),1)
    79.2)= S Y(2)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,16)_":",2),$C(59),1)
    89.2)= S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:""),D0=$P(Y(1),U,3) S:'$D(^APSPP(31.1,+D0,0)) D0=-1 S DIV(0)=D0 S I(100,0)=$S($D(D0):D0,1:"")
    89.3)= X ^DD(9009031,.09,1,2,89.2) S Y(101)=$S($D(^APSPP(31.1,D0,0)):^(0),1:""),D0=$P(Y(101),U,1) S:'$D(^PSDRUG(+D0,0)) D0=-1 S DIV(0)=D0 S Y(201)=$S($D(^PSDRUG(D0,660.1)):^(660.1),1:"")
    CREATE CONDITION)= SUBTRACT FROM INVENTORY="YES"
    CREATE VALUE)= CURRENT INVENTORY-(QTY PER CONTAINER*NUMBER OF PREPACKS)
    DELETE CONDITION)= SUBTRACT FROM INVENTORY="YES"&('$D(APSP("PREPACK LOG FLG")))
    DELETE VALUE)= CURRENT INVENTORY+(QTY PER CONTAINER*OLD NUMBER OF PREPACKS)
    FIELD)= #.03:#.01:#50
  • CROSS-REFERENCE:  9009031^APSPZ2^MUMPS
    1)= Q
    2)= K APSP("PREPACK LOG FLG")
.11 TOTAL COST 0;11 NUMBER

  • INPUT TRANSFORM:  S:X["$" X=$P(X,"$",2) K:X'?.N.1".".2N!(X>999.99)!(X<0) X
  • LAST EDITED:  JUL 23, 1989
  • HELP-PROMPT:  Type a Dollar Amount between 0 and 999.99, 2 Decimal Digits
  • DESCRIPTION:  
    This field is calculated from the cost fields in the Drug file and the Number of Prepacks times Qty per container.
    WRITE AUTHORITY:  ^
  • NOTES:  TRIGGERED by the QTY PER CONTAINER field of the APSP PREPACK LOG File
    TRIGGERED by the NUMBER OF PREPACKS field of the APSP PREPACK LOG File
.12 REMARKS 0;12 FREE TEXT

  • INPUT TRANSFORM:  K:$L(X)>80!($L(X)<1) X
  • LAST EDITED:  JUL 21, 1989
  • HELP-PROMPT:  Answer must be 1-80 characters in length.
  • DESCRIPTION:  
    This is a simple free text field for entering a small comment about the prepack just prepared.
.13 CLERK CODE 0;13 POINTER TO USER FILE (#3)
************************REQUIRED FIELD************************
USER(#3)

  • LAST EDITED:  JUL 23, 1989
  • HELP-PROMPT:  Enter the name or initials of the person preparing the prepacks.
  • DESCRIPTION:  
    This is the name of the person preparing the prepacks.  The person must be entered on the computer system as a user of the system.
    UNEDITABLE
.14 PHARMACIST 0;14 POINTER TO USER FILE (#3)
************************REQUIRED FIELD************************
USER(#3)

  • INPUT TRANSFORM:  S DIC("S")="I $D(^XUSEC(""PSORPH"",Y))" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
  • LAST EDITED:  JUN 14, 1993
  • HELP-PROMPT:  Please enter the name or initials of the pharmacist checking the prepacks for completeness.
  • DESCRIPTION:  
    This is the name of the pharmacist who verifed the prepacks as being correct.
  • SCREEN:  S DIC("S")="I $D(^XUSEC(""PSORPH"",Y))"
  • EXPLANATION:  Only select a user with a pharmacist's key
    UNEDITABLE
  • NOTES:  XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER
.16 SUBTRACT FROM INVENTORY 0;16 SET
************************REQUIRED FIELD************************
  • 'y' FOR YES;
  • 'n' FOR NO;

  • LAST EDITED:  AUG 18, 1989
  • HELP-PROMPT:  If you wish these prepacks to subtract the drugs from the inventory, enter a 'y' or 'Y' for yes.
  • DESCRIPTION:  This field determines if the total number of dispensed units should be subtracted from your DRUG file current inventory field. It will not be asked if you have the Inventory system turned off in the regular Pharmacy Site
    site parameters.
  • CROSS-REFERENCE:  ^^TRIGGER^50^50
    1)= Q
    2)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(9009031,.16,1,1,79.3) S X=X&Y I X S X=DIV X ^DD(9009031,.16,1,1,89.3) S X=$P(Y(201),U,1) S D0=I(0,0) S DIU=X K Y X ^DD(9009031,.16,1,1,2.1) X ^DD(9009031,.16,1,1,2.4)
    2.1)= S X=DIV S Y(2)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=DIU,Y(1)=X S X=$P(Y(2),U,8)*$P(Y(2),U,9),Y=X,X=Y(1),X=X+Y
    2.4)= S DIH=$S($D(^PSDRUG(DIV(0),660.1)):^(660.1),1:""),DIV=X I $D(^(0)) S $P(^(660.1),U,1)=DIV,DIH=50,DIG=50 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    79.2)= S Y(1)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(4)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(3)=$S($D(^APSPP(31,D0,0)):^(0),1:"")
    79.3)= X ^DD(9009031,.16,1,1,79.2) S X=$P($P(Y(1),$C(59)_X_":",2),$C(59),1)="YES",Y(2)=X S X=$P($P(Y(4),$C(59)_$P(Y(3),U,16)_":",2),$C(59),1)="NO",Y=X,X=Y(2),X=X
    89.2)= S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:""),D0=$P(Y(1),U,3) S:'$D(^APSPP(31.1,+D0,0)) D0=-1 S DIV(0)=D0 S I(100,0)=$S($D(D0):D0,1:"")
    89.3)= X ^DD(9009031,.16,1,1,89.2) S Y(101)=$S($D(^APSPP(31.1,D0,0)):^(0),1:""),D0=$P(Y(101),U,1) S:'$D(^PSDRUG(+D0,0)) D0=-1 S DIV(0)=D0 S Y(201)=$S($D(^PSDRUG(D0,660.1)):^(660.1),1:"")
    CREATE VALUE)= NO EFFECT
    DELETE CONDITION)= OLD SUBTRACT FROM INVENTORY="YES"&(SUBTRACT FROM INVENTORY="NO")
    DELETE VALUE)= CURRENT INVENTORY+(QTY PER CONTAINER*NUMBER OF PREPACKS)
    FIELD)= #.03:#.01:#50
  • CROSS-REFERENCE:  ^^TRIGGER^50^50
    1)= Q
    2)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X X ^DD(9009031,.16,1,2,79.3) S X=X&Y I X S X=DIV X ^DD(9009031,.16,1,2,89.3) S X=$P(Y(201),U,1) S D0=I(0,0) S DIU=X K Y X ^DD(9009031,.16,1,2,2.1) X ^DD(9009031,.16,1,2,2.4)
    2.1)= S X=DIV S Y(2)=$S($D(^APSPP(31,D0,0)):^(0),1:"") S X=DIU,Y(1)=X S X=$P(Y(2),U,8)*$P(Y(2),U,9),Y=X,X=Y(1),X=X-Y
    2.4)= S DIH=$S($D(^PSDRUG(DIV(0),660.1)):^(660.1),1:""),DIV=X I $D(^(0)) S $P(^(660.1),U,1)=DIV,DIH=50,DIG=50 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
    79.2)= S Y(1)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(4)=$C(59)_$S($D(^DD(9009031,.16,0)):$P(^(0),U,3),1:""),Y(3)=$S($D(^APSPP(31,D0,0)):^(0),1:"")
    79.3)= X ^DD(9009031,.16,1,2,79.2) S X=$P($P(Y(1),$C(59)_X_":",2),$C(59),1)="NO",Y(2)=X S X=$P($P(Y(4),$C(59)_$P(Y(3),U,16)_":",2),$C(59),1)="YES",Y=X,X=Y(2),X=X
    89.2)= S I(0,0)=$S($D(D0):D0,1:""),Y(1)=$S($D(^APSPP(31,D0,0)):^(0),1:""),D0=$P(Y(1),U,3) S:'$D(^APSPP(31.1,+D0,0)) D0=-1 S DIV(0)=D0 S I(100,0)=$S($D(D0):D0,1:"")
    89.3)= X ^DD(9009031,.16,1,2,89.2) S Y(101)=$S($D(^APSPP(31.1,D0,0)):^(0),1:""),D0=$P(Y(101),U,1) S:'$D(^PSDRUG(+D0,0)) D0=-1 S DIV(0)=D0 S Y(201)=$S($D(^PSDRUG(D0,660.1)):^(660.1),1:"")
    CREATE VALUE)= NO EFFECT
    DELETE CONDITION)= OLD SUBTRACT FROM INVENTORY="NO"&(SUBTRACT FROM INVENTORY="YES")
    DELETE VALUE)= CURRENT INVENTORY-(QTY PER CONTAINER*NUMBER OF PREPACKS)
    FIELD)= #.03:#.01:#50
1501 LOCATION 15;0 POINTER Multiple #9009031.15 9009031.15

  • DESCRIPTION:  This field is used to specify a certain location that the prepacks were dispensed to. This enables the pharmacist to list a printout of prepacks and total costs and number for a certain field site or location. This field
    points to the APSP PREPACK LOCATION file.
Info |  Desc |  Directly Accessed By Routines |  Accessed By FileMan Db Calls |  Pointer To FileMan Files |  Fields |  Found Entries |  All