source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVBRNOT2.m@ 1042

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

initial load of WorldVistAEHR

File size: 4.9 KB
Line 
1WVBRNOT2 ;HCIOFO/FT,JR IHS/ANMC/MWR - BROWSE NOTIFICATIONS;
2 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
3 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
4 ;; PROMPTS FOR SELECTION CRITERIA WHEN BROWSING NOTIFICATIONS.
5 ;; CALLED BY WVBRNOT.
6 ;
7 D SETVARS^WVUTL5
8 D TITLE^WVUTL5("BROWSE NOTIFICATIONS")
9 D ONEALL Q:WVPOP
10 D DATES Q:WVPOP
11 D STATUS Q:WVPOP
12 D CMGR Q:WVPOP
13 D ORDER Q:WVPOP
14 D DEVICE Q:WVPOP
15 Q
16 ;
17ONEALL ;EP
18 ;---> SELECT ONE PATIENT OR ALL PATIENTS.
19 K DIR
20 W !!?3,"Browse Notifications for ONE individual patient,"
21 W !?3,"or browse Notifications for ALL patients?"
22 S DIR("A")=" Select ONE or ALL: ",DIR("B")="ALL"
23 S DIR(0)="SAM^o:ONE;a:ALL" D HELP2
24 D ^DIR K DIR
25 I Y=-1!($D(DIRUT)) S WVPOP=1 Q
26 ;---> IF ALL PATIENTS, S WVA=1 AND QUIT.
27 I Y="a" S WVA=1 Q
28 ;
29 W !!," Select the patient whose Notifications you wish to browse."
30 D PATLKUP^WVUTL8(.Y)
31 I Y<0 S WVPOP=1 Q
32 ;---> FOR ONE PATIENT, SET WVA=0 AND WVDFN=PATIENT DFN, QUIT.
33 S WVDFN=+Y,WVA=0,WVCMGR=$P(^WV(790,WVDFN,0),U,10)
34 Q
35 ;
36DATES ;EP
37 ;---> ASK DATE RANGE. RETURN DATES IN WVBEGDT AND WVENDDT.
38 ;---> IF LOOKING AT ONLY ONE PATIENT, SET DEFAULT BEGIN DATE=T-365.
39 S WVBEGDF=$S(WVA:"T-30",1:"T-365")
40 D ASKDATES^WVUTL3(.WVBEGDT,.WVENDDT,.WVPOP,WVBEGDF,"T")
41 Q
42 ;
43STATUS ;EP
44 ;---> GET XREF: OPEN OR ALL
45 W !!?3,"Do you wish to browse DELINQUENT, OPEN, QUEUED, "
46 W "or ALL Notifications?"
47 S DIR("A")=" Select DELINQUENT, OPEN, QUEUED or ALL: "
48 S DIR("B")="OPEN"
49 S DIR(0)="SAM^d:DELINQUENT;o:OPEN;q:QUEUED;a:ALL" D HELP4
50 D ^DIR K DIR
51 I Y=-1!($D(DIRUT)) S WVPOP=1 Q
52 S WVB=Y
53 Q
54 ;
55CMGR ;EP
56 ;---> SELECT CASES FOR ONE CASE MANAGER OR ALL.
57 ;---> DO NOT PROMPT FOR CASE MANAGER IF SITE PARAMETERS SAY NOT TO,
58 ;---> OR IF LOOKING AT PROCEDURES FOR ONLY ONE PATIENT.
59 I '$D(^WV(790.02,DUZ(2),0)) S WVE=1 Q
60 I '$P(^WV(790.02,DUZ(2),0),U,5)!('WVA) S WVE=1 Q
61 W !!?3,"Browse Notifications for ONE particular Case Manager,"
62 W !?3,"or browse Notifications for ALL Case Managers?"
63 S DIR("A")=" Select ONE or ALL: ",DIR("B")="ALL"
64 S DIR(0)="SAM^o:ONE;a:ALL" D HELP5
65 D ^DIR K DIR
66 I Y=-1!($D(DIRUT)) S WVPOP=1 Q
67 ;---> IF ALL CASE MANAGERS, S WVE=1 AND QUIT.
68 I Y="a" S WVE=1 Q
69 ;
70 W !!," Select the Case Manager whose patients you wish to browse."
71 ;
72 D DIC^WVFMAN(790.01,"QEMA",.Y," Select CASE MANAGER: ")
73 I Y<0 S WVPOP=1 Q
74 ;---> FOR ONE CASE MANAGER, SET WVE=0 AND WVCMGR=^VA(200 DFN, QUIT.
75 S WVCMGR=+Y,WVE=0
76 Q
77 ;
78 ;
79ORDER ;EP
80 ;---> ASK ORDER BY DATE OR BY PATIENT OR BY PRIORITY.
81 ;---> IF LOOKING AT ONLY ONE PATIENT, ORDER BY DATE AND QUIT.
82 I 'WVA S WVC=1 Q
83 ;
84 ;---> SORT SEQUENCE IN WVC: 1=DATE, PATIENT, PRIORITY
85 ;---> 2=PATIENT, DATE, PRIORITY
86 ;---> 3=PRIORITY, DATE, PATIENT
87 ;
88 W !!?3,"Display Notifications in order of:"
89 W ?39,"1) DATE OF NOTIFICATION (earliest first)"
90 W !?39,"2) NAME OF PATIENT (alphabetically)"
91 W !?39,"3) PRIORITY (beginning with URGENT)"
92 S DIR("A")=" Select 1, 2, or 3: ",DIR("B")=1
93 S DIR(0)="SAM^1:DATE;2:NAME;3:PRIORITY" D HELP3
94 D ^DIR K DIR
95 I Y=-1!($D(DIRUT)) S WVPOP=1 Q
96 S WVC=Y
97 Q
98 ;
99DEVICE ;EP
100 ;---> GET DEVICE AND POSSIBLY QUEUE TO TASKMAN.
101 S ZTRTN="DEQUEUE^WVBRNOT"
102 F WVSV="A","B","C","D","E","CMGR","DFN","BEGDT","ENDDT" D
103 .I $D(@("WV"_WVSV)) S ZTSAVE("WV"_WVSV)=""
104 D ZIS^WVUTL2(.WVPOP,1,"HOME")
105 Q
106 ;
107HELP2 ;EP
108 ;;Answer "ONE" to browse Notifications for ONE particular patient.
109 ;;Answer "ALL" to browse Notifications for ALL patients.
110 S WVTAB=5,WVLINL="HELP2" D HELPTX
111 Q
112 ;
113HELP3 ;EP
114 ;;Enter "DATE" to list Notifications in chronological order beginning
115 ;; with the oldest first.
116 ;;Enter "NAME" to list Notifications by Patient Name in alphabetical
117 ;; order.
118 ;;Enter "PRIORITY" to list Notifications by degree of urgency,
119 ;; beginning with the most urgent first.
120 S WVTAB=5,WVLINL="HELP3" D HELPTX
121 Q
122 ;
123HELP4 ;EP
124 ;;"OPEN Notifications" are ones that have not yet been closed,
125 ;; in other words, the patient has not yet been reached or has not
126 ;; yet responded.
127 ;;
128 ;;"DELINQUENT Notifications" are OPEN Notifications that have remained
129 ;; open past the date they were due to be closed (as determined by
130 ;; the "DATE DELINQUENT BY" field in the Edit Notification screen).
131 ;;
132 ;;"QUEUED Notifications" are only LETTERS waiting to be printed.
133 ;; They do not include letters that have already been printed.
134 ;;
135 ;;"ALL Notifications" includes DELINQUENT, OPEN and CLOSED.
136 ;; CLOSED notifications are ones that have been brought to closure,
137 ;; in other words, either the patient has been contacted or the
138 ;; case is no longer active.
139 S WVTAB=5,WVLINL="HELP4" D HELPTX
140 Q
141 ;
142HELP5 ;EP
143 ;;Answer "ONE" to browse Notifications for ONE particular Case Manager.
144 ;;Answer "ALL" to browse Notifications for ALL Case Managers.
145 S WVTAB=5,WVLINL="HELP5" D HELPTX
146 Q
147 ;
148HELPTX ;EP
149 ;---> CREATES DIR ARRAY FOR DIR. REQUIRED VARIABLES: WVTAB,WVLINL.
150 N I,T,X S T=$$REPEAT^XLFSTR(" ",WVTAB)
151 F I=1:1 S X=$T(@WVLINL+I) Q:X'[";;" S DIR("?",I)=T_$P(X,";;",2)
152 S DIR("?")=DIR("?",I-1) K DIR("?",I-1)
153 Q
Note: See TracBrowser for help on using the repository browser.