source: FOIAVistA/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBCLKT2.m@ 1470

Last change on this file since 1470 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1DVBCLKT2 ;ALB/GTS-AMIE C&P APPT LINK MNGT ROUTINE 2 ; 10/20/94 11:45 PM
2 ;;2.7;AMIE;;Apr 10, 1995
3 ;
4 ;** NOTICE: This routine is part of an implementation of a Nationally
5 ;** Controlled Procedure. Local modifications to this routine
6 ;** are prohibited per VHA Directive 10-93-142
7 ;
8 ;** Version Changes
9 ; 2.7 - New routine (Enhc 13)
10 ;
11LNKQS ;** Question user to see if selected appt is rebook of existing link
12 S DIR(0)="Y^A^"
13 S DIR("A")="Was "_$P(DVBAAPT,U,1)_" scheduled to rebook a previous appointment"
14 S DIR("?",1)="Enter NO to indicate this appointment is the first time the exam is scheduled."
15 S DIR("?",2)="Enter YES to indicate this appointment is a rebook of an existing appointment"
16 S DIR("?",3)=" for the exam."
17 S DIR("?")="(If YES, you will be asked to select the appointment being rebooked.)"
18 D ^DIR K DIR,X
19 Q
20 ;
21ERRMESS ;** Error: Appointment link not selected
22 S DIR("A",1)=" "
23 S DIR("A",2)="You have not selected an appointment link which to modify with the selected"
24 S DIR("A",3)=" appointment. If the desired appointment was not displayed for selection,"
25 S DIR("A",4)=" it must first be added as a new link to the 2507 request. You may then "
26 S DIR("A",5)=" modify the link as you have attempted here."
27 S DIR("A",6)=" "
28 S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
29 Q
30 ;
31APPTERR ;** Error if appt was not selected
32 S DIR("A",1)=" "
33 S DIR("A",2)="You have not selected a C&P appointment to link the request to."
34 S DIR("A",3)="This is required before further processing with the AMIE link"
35 S DIR("A",4)=" management option."
36 S DIR("A",5)=" "
37 S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue or '^' to STOP."
38 D ^DIR
39 I $D(DUOUT)!($D(DTOUT)) S DVBAOUT=""
40 K DIR,X,Y,DTOUT,DUOUT
41 Q
42 ;
43NOAPTERR ;** Veteran does not have C&P appointments
44 S DIR("A",1)=" "
45 S DIR("A",2)="You have selected a veteran that does not have C&P appointments"
46 S DIR("A",3)=" to link to this request. This is required before further processing with "
47 S DIR("A",4)=" the AMIE link management option."
48 S DIR("A",5)=" "
49 S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
50 S DVBAOUT=""
51 Q
52 ;
53DELERR ;** Error if link exists and user is not a supervisor
54 S DIR("A",1)=" "
55 S DIR("A",2)="You have selected a C&P appointment that is Currently Linked to the request."
56 S DIR("A",3)="(NOTE: *CL) If you want to remove this link, see your supervisor."
57 S DIR("A",4)=" "
58 S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
59 Q
60 ;
61DELCK ;** Question supervisor to delete link
62 D LINKINF^DVBCUTL6(DVBADA,$P(DVBAAPT,U,4))
63 S DIR(0)="Y^A^"
64 S DIR("A",1)=" "
65 S DIR("A")="Do you want to REMOVE this link"
66 S DIR("?",1)="Enter YES to remove this appointment from the 2507."
67 S DIR("?",2)="Enter NO leave this appointment associated with the 2507."
68 S DIR("?",3)="If you enter YES incorrectly, you will need to use this tool to relink the"
69 S DIR("?")=" appointment to the request."
70 D ^DIR
71 I +Y>0 S DVBADEL=""
72 K DIR,X,Y
73 Q
74 ;
75DODEL ;** Delete existing link
76 S DA="" S DA=$O(^DVB(396.95,"AB",DVBADA,$P(DVBAAPT,U,4),DA))
77 S DIK="^DVB(396.95," D ^DIK K DIK,DA
78 Q
79 ;
80NOLNK ;** Error that no links exist
81 S DIR("A",1)=" "
82 S DIR("A",2)="No appointments are currently linked to this 2507 request."
83 S DIR("A",3)="You will need to create a link to the cancelled appointment"
84 S DIR("A",4)=" before proceding with the link to this appointment."
85 S DIR("A",5)=" "
86 S DIR(0)="FAO^1:1",DIR("A")="Hit Return to continue." D ^DIR K DIR,X,Y
87 Q
Note: See TracBrowser for help on using the repository browser.