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

BSDB.m

Go to the documentation of this file.
  1. BSDB ; IHS/ANMC/LJF - SET UP A CLINIC VIA SCREENMAN ;
  1. ;;5.3;PIMS;**1009,1010**;APR 26, 2002
  1. ;
  1. ;cmi/anch/maw 10/20/2008 PATCH 1010 added INST which is called from DATA VALIDATION of the DIVISION field of the BSD SET UP CLINIC form
  1. ;
  1. SETUP(BSDDA) ;EP; clinic setup
  1. ; called by ^SDB
  1. ;
  1. ; -- if no entry in Clinic Setup Parameters file, add one
  1. NEW DA,DIC,DDR,DLAYGO,BSDERR
  1. I '$D(^BSDSC(BSDDA)) D I $G(BSDERR) D MSG^BDGF(BSDERR) Q
  1. . K DD,DO S DIC="^BSDSC(",DLAYGO=9009017.2,DIC(0)="L"
  1. . S (X,DINUM)=BSDDA D FILE^DICN
  1. . I Y=-1 S BSDERR="Adding to IHS file failed; contact supervisor."
  1. ;
  1. ; -- if new clinic, ask length of appt up front
  1. I '$G(^SC(BSDDA,"SL")) D
  1. . S DIE=44,DA=BSDDA,DR="1912" D ^DIE
  1. ;
  1. ; -- call ScreenMan to add/edit parameters
  1. S DDSFILE=9009017.2,DA=BSDDA,DR="[BSD SET UP CLINIC]" D ^DDS
  1. K DDSFILE,DR
  1. Q
  1. ;
  1. HELP1 ;EP; called by HLPD^SDB1 for help on AVAILABILITY DATE
  1. W !!?5,"For each day of the week that this clinic meets, enter the"
  1. W !?5,"FIRST date available. You will then be asked for the range"
  1. W !?5,"of appointment times and the number of slots per appointment."
  1. W !?5,"If you enter a date that has already been set up, you will"
  1. W !?5,"be changing its appointment schedule. BE CAREFUL!",!
  1. Q
  1. ;
  1. INST(DA,BSDX) ;-- stuff the institution of the division in the HOSPITAL LOCATION file from the DIVISION selected in Set Up A Clinic
  1. N BSDINST
  1. S BSDINST=$P($G(^DG(40.8,BSDX,0)),U,7)
  1. S DIE="^SC(",DR="3////"_$G(BSDINST)
  1. D ^DIE
  1. K DIE
  1. Q
  1. ;