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

PSALOC1.m

Go to the documentation of this file.
  1. PSALOC1 ;BIR/MNT,DB-Set Up/Edit a Pharmacy Location ;7/23/97
  1. ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**21**; 10/24/97
  1. W !,"This option lets you change the location type. For example: Inpatient and",!,"Outpatient locations can be changed to a Combined (IP/OP) location."
  1. W !,"Combined (IP/OP) locations, can be changed to either an Inpatient Location",!,"an Outpatient location, or BOTH.",! Q
  1. PSAHLP2 ;
  1. PSAHLP3 ;
  1. W !,"An Inpatient site is required to allow linking of IV rooms to the location."
  1. Q
  1. PSAHLP4 ;
  1. W !,^DD(58.8,20,3),! F X=1,2 W !,^DD(58.8,20,21,X,0)
  1. Q
  1. PSAHLP5 ;
  1. W !,^DD(58.831,.01,3) W ! F X=1:1:4 W !,^DD(58.831,.01,21,X,0)
  1. Q
  1. PSAHLP6 ;
  1. W !,^DD(58.842,.01,3) W ! F X=1,2 W !,^DD(58.842,.01,21,X,0)
  1. Q
  1. PSAHLP7 ;
  1. W !,"This option allows editting of a location's inactivation date.",! Q
  1. PSAHLP8 ;
  1. W !,"The Enter/Edit a Drug option adds a new drug to the pharmacy location.",!,"It also displays the balance of an existing drug." Q
  1. PSAHLP9 ;
  1. W !,"This option sets up a flag on a pharmacy location or master vault to maintain",!,"the stock and reorder levels or removes the flag.",! Q
  1. PSAHLP10 ;
  1. W !,"This option allows the re-activation of an inactive pharmacy location.",!
  1. Q
  1. PSASETUP ;Setup mail message recipients
  1. S X="PSA REORDER LEVEL",DIC="^XMB(3.8," D ^DIC S PSAREORD=+Y,PSAREORD(1)=X
  1. S X="PSA UPDATE NDC",DIC="^XMB(3.8," D ^DIC S PSAUPDT=+Y,PSAUPDT(1)=X
  1. K XMY
  1. W !,"Currently, any user who holds the 'PSA ORDERS' key, receives the mail message",!,"'Drug Balances Below Reorder Level' & 'NDC/PRICE change messages'."
  1. W !,"Two mail groups have been established to determine who receives the message.",!
  1. W !,"Members added to the mail group must first possess the 'PSA ORDERS' key.",!
  1. ;
  1. 1 S PSAGRP="PSA REORDER LEVEL" D MEMBER
  1. S PSAGRP="PSA NDC UPDATES"
  1. MEMBER W !,"Do you want to edit the users for the "_PSAGRP_" mail group? YES//" R AN:DTIME Q:AN["^" S:AN="" AN="Y" S AN=$E(AN)
  1. I "yYNn"'[AN W !,"Answer 'Y'es and you will be able to edit the members of this mailgroup." K AN G MEMBER
  1. I "nN"[AN Q
  1. ;
  1. MEMASK S DIC(0)="AEQMZ",DIC="^VA(200,",DIC("S")="I $D(^XUSEC(""PSA ORDERS"",+Y))" D ^DIC I +Y'>0 Q
  1. K XMY S XMY(+Y)=""
  1. ACTION R !,"Select 'A' to Add the user or 'D' to delete the user. ADD//",AN:DTIME S:AN="" AN="A" I "AadD"'[AN W !,"Enter a 'D' and if the user is already a member of the group, they'll be deleted." K AN G ACTION
  1. I "Aa"[AN S X5=$$MG^XMBGRP(PSAGRP,0,DUZ,1,.XMY,,0)
  1. I "dD"[AN S X5=$$DM^XMBGRP(PSAGRP,.XMY,0)
  1. I X5'>0 W !,"Sorry, couldn't perform action." G MEMASK
  1. W !,"task completed." G MEMASK
  1. Q Q