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

DVBCLKT2.m

Go to the documentation of this file.
  1. DVBCLKT2 ;ALB/GTS-AMIE C&P APPT LINK MNGT ROUTINE 2 ; 10/20/94 11:45 PM
  1. ;;2.7;AMIE;;Apr 10, 1995
  1. ;
  1. ;** NOTICE: This routine is part of an implementation of a Nationally
  1. ;** Controlled Procedure. Local modifications to this routine
  1. ;** are prohibited per VHA Directive 10-93-142
  1. ;
  1. ;** Version Changes
  1. ; 2.7 - New routine (Enhc 13)
  1. ;
  1. LNKQS ;** Question user to see if selected appt is rebook of existing link
  1. S DIR(0)="Y^A^"
  1. S DIR("A")="Was "_$P(DVBAAPT,U,1)_" scheduled to rebook a previous appointment"
  1. S DIR("?",1)="Enter NO to indicate this appointment is the first time the exam is scheduled."
  1. S DIR("?",2)="Enter YES to indicate this appointment is a rebook of an existing appointment"
  1. S DIR("?",3)=" for the exam."
  1. S DIR("?")="(If YES, you will be asked to select the appointment being rebooked.)"
  1. D ^DIR K DIR,X
  1. Q
  1. ;
  1. ERRMESS ;** Error: Appointment link not selected
  1. S DIR("A",1)=" "
  1. S DIR("A",2)="You have not selected an appointment link which to modify with the selected"
  1. S DIR("A",3)=" appointment. If the desired appointment was not displayed for selection,"
  1. S DIR("A",4)=" it must first be added as a new link to the 2507 request. You may then "
  1. S DIR("A",5)=" modify the link as you have attempted here."
  1. S DIR("A",6)=" "
  1. S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
  1. Q
  1. ;
  1. APPTERR ;** Error if appt was not selected
  1. S DIR("A",1)=" "
  1. S DIR("A",2)="You have not selected a C&P appointment to link the request to."
  1. S DIR("A",3)="This is required before further processing with the AMIE link"
  1. S DIR("A",4)=" management option."
  1. S DIR("A",5)=" "
  1. S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue or '^' to STOP."
  1. D ^DIR
  1. I $D(DUOUT)!($D(DTOUT)) S DVBAOUT=""
  1. K DIR,X,Y,DTOUT,DUOUT
  1. Q
  1. ;
  1. NOAPTERR ;** Veteran does not have C&P appointments
  1. S DIR("A",1)=" "
  1. S DIR("A",2)="You have selected a veteran that does not have C&P appointments"
  1. S DIR("A",3)=" to link to this request. This is required before further processing with "
  1. S DIR("A",4)=" the AMIE link management option."
  1. S DIR("A",5)=" "
  1. S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
  1. S DVBAOUT=""
  1. Q
  1. ;
  1. DELERR ;** Error if link exists and user is not a supervisor
  1. S DIR("A",1)=" "
  1. S DIR("A",2)="You have selected a C&P appointment that is Currently Linked to the request."
  1. S DIR("A",3)="(NOTE: *CL) If you want to remove this link, see your supervisor."
  1. S DIR("A",4)=" "
  1. S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
  1. Q
  1. ;
  1. DELCK ;** Question supervisor to delete link
  1. D LINKINF^DVBCUTL6(DVBADA,$P(DVBAAPT,U,4))
  1. S DIR(0)="Y^A^"
  1. S DIR("A",1)=" "
  1. S DIR("A")="Do you want to REMOVE this link"
  1. S DIR("?",1)="Enter YES to remove this appointment from the 2507."
  1. S DIR("?",2)="Enter NO leave this appointment associated with the 2507."
  1. S DIR("?",3)="If you enter YES incorrectly, you will need to use this tool to relink the"
  1. S DIR("?")=" appointment to the request."
  1. D ^DIR
  1. I +Y>0 S DVBADEL=""
  1. K DIR,X,Y
  1. Q
  1. ;
  1. DODEL ;** Delete existing link
  1. S DA="" S DA=$O(^DVB(396.95,"AB",DVBADA,$P(DVBAAPT,U,4),DA))
  1. S DIK="^DVB(396.95," D ^DIK K DIK,DA
  1. Q
  1. ;
  1. NOLNK ;** Error that no links exist
  1. S DIR("A",1)=" "
  1. S DIR("A",2)="No appointments are currently linked to this 2507 request."
  1. S DIR("A",3)="You will need to create a link to the cancelled appointment"
  1. S DIR("A",4)=" before proceding with the link to this appointment."
  1. S DIR("A",5)=" "
  1. S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
  1. Q