1 | using System;
|
---|
2 | using System.Drawing;
|
---|
3 | using System.Collections;
|
---|
4 | using System.ComponentModel;
|
---|
5 | using System.Windows.Forms;
|
---|
6 | using System.Data;
|
---|
7 | //using System.Data.OleDb;
|
---|
8 | using IndianHealthService.BMXNet;
|
---|
9 | using System.Diagnostics;
|
---|
10 |
|
---|
11 | namespace IndianHealthService.ClinicalScheduling
|
---|
12 | {
|
---|
13 | /// <summary>
|
---|
14 | /// Summary description for DResource.
|
---|
15 | /// </summary>
|
---|
16 | public class DResource : System.Windows.Forms.Form
|
---|
17 | {
|
---|
18 | private System.Windows.Forms.Button cmdCancel;
|
---|
19 | private System.Windows.Forms.Button cmdOK;
|
---|
20 | private System.Windows.Forms.Panel pnlDescription;
|
---|
21 | private System.Windows.Forms.GroupBox grpDescription;
|
---|
22 | private System.Windows.Forms.Label lblDescription;
|
---|
23 | private System.Windows.Forms.CheckBox chkInactivate;
|
---|
24 | private System.Windows.Forms.GroupBox grpRPMSClinicLink;
|
---|
25 | private System.Windows.Forms.Label lblReactivateDate;
|
---|
26 | private System.Windows.Forms.Label label10;
|
---|
27 | private System.Windows.Forms.Label lblInactivateDate;
|
---|
28 | private System.Windows.Forms.Label label8;
|
---|
29 | private System.Windows.Forms.Label lblClinicCode;
|
---|
30 | private System.Windows.Forms.Label label6;
|
---|
31 | private System.Windows.Forms.Label lblProvider;
|
---|
32 | private System.Windows.Forms.Label label7;
|
---|
33 | private System.Windows.Forms.Label lblVisitServiceCategory;
|
---|
34 | private System.Windows.Forms.Label label3;
|
---|
35 | private System.Windows.Forms.Label lblCreateVisit;
|
---|
36 | private System.Windows.Forms.Label label2;
|
---|
37 | private System.Windows.Forms.Label label4;
|
---|
38 | private System.Windows.Forms.ComboBox cboRPMSClinic;
|
---|
39 | private System.Windows.Forms.Label label1;
|
---|
40 | private System.Windows.Forms.TextBox txtResourceName;
|
---|
41 | private System.Windows.Forms.TabControl tabResources;
|
---|
42 | private System.Windows.Forms.TabPage tpRPMSLink;
|
---|
43 | private System.Windows.Forms.ComboBox cboTimeInterval;
|
---|
44 | private System.Windows.Forms.Label label5;
|
---|
45 | private System.Windows.Forms.TabPage tpLetter;
|
---|
46 | private System.Windows.Forms.TextBox txtLetter;
|
---|
47 | private System.Windows.Forms.Label label9;
|
---|
48 | private System.Windows.Forms.Label label11;
|
---|
49 | private System.Windows.Forms.Panel pnlOkCancel;
|
---|
50 | private System.Windows.Forms.TabPage tpRebookLetter;
|
---|
51 | private System.Windows.Forms.TabPage tpCancellationLetter;
|
---|
52 | private System.Windows.Forms.Label label12;
|
---|
53 | private System.Windows.Forms.Label label13;
|
---|
54 | private System.Windows.Forms.TextBox txtRebookLetter;
|
---|
55 | private System.Windows.Forms.TextBox txtCancellationLetter;
|
---|
56 | /// <summary>
|
---|
57 | /// Required designer variable.
|
---|
58 | /// </summary>
|
---|
59 | private System.ComponentModel.Container components = null;
|
---|
60 |
|
---|
61 | public DResource()
|
---|
62 | {
|
---|
63 | InitializeComponent();
|
---|
64 | }
|
---|
65 |
|
---|
66 | #region Windows Form Designer generated code
|
---|
67 | /// <summary>
|
---|
68 | /// Required method for Designer support - do not modify
|
---|
69 | /// the contents of this method with the code editor.
|
---|
70 | /// </summary>
|
---|
71 | private void InitializeComponent()
|
---|
72 | {
|
---|
73 | this.pnlOkCancel = new System.Windows.Forms.Panel();
|
---|
74 | this.cmdCancel = new System.Windows.Forms.Button();
|
---|
75 | this.cmdOK = new System.Windows.Forms.Button();
|
---|
76 | this.pnlDescription = new System.Windows.Forms.Panel();
|
---|
77 | this.grpDescription = new System.Windows.Forms.GroupBox();
|
---|
78 | this.lblDescription = new System.Windows.Forms.Label();
|
---|
79 | this.tabResources = new System.Windows.Forms.TabControl();
|
---|
80 | this.tpRPMSLink = new System.Windows.Forms.TabPage();
|
---|
81 | this.label11 = new System.Windows.Forms.Label();
|
---|
82 | this.label5 = new System.Windows.Forms.Label();
|
---|
83 | this.cboTimeInterval = new System.Windows.Forms.ComboBox();
|
---|
84 | this.chkInactivate = new System.Windows.Forms.CheckBox();
|
---|
85 | this.grpRPMSClinicLink = new System.Windows.Forms.GroupBox();
|
---|
86 | this.lblReactivateDate = new System.Windows.Forms.Label();
|
---|
87 | this.label10 = new System.Windows.Forms.Label();
|
---|
88 | this.lblInactivateDate = new System.Windows.Forms.Label();
|
---|
89 | this.label8 = new System.Windows.Forms.Label();
|
---|
90 | this.lblClinicCode = new System.Windows.Forms.Label();
|
---|
91 | this.label6 = new System.Windows.Forms.Label();
|
---|
92 | this.lblProvider = new System.Windows.Forms.Label();
|
---|
93 | this.label7 = new System.Windows.Forms.Label();
|
---|
94 | this.lblVisitServiceCategory = new System.Windows.Forms.Label();
|
---|
95 | this.label3 = new System.Windows.Forms.Label();
|
---|
96 | this.lblCreateVisit = new System.Windows.Forms.Label();
|
---|
97 | this.label2 = new System.Windows.Forms.Label();
|
---|
98 | this.label4 = new System.Windows.Forms.Label();
|
---|
99 | this.cboRPMSClinic = new System.Windows.Forms.ComboBox();
|
---|
100 | this.label1 = new System.Windows.Forms.Label();
|
---|
101 | this.txtResourceName = new System.Windows.Forms.TextBox();
|
---|
102 | this.tpLetter = new System.Windows.Forms.TabPage();
|
---|
103 | this.label9 = new System.Windows.Forms.Label();
|
---|
104 | this.txtLetter = new System.Windows.Forms.TextBox();
|
---|
105 | this.tpRebookLetter = new System.Windows.Forms.TabPage();
|
---|
106 | this.label12 = new System.Windows.Forms.Label();
|
---|
107 | this.txtRebookLetter = new System.Windows.Forms.TextBox();
|
---|
108 | this.tpCancellationLetter = new System.Windows.Forms.TabPage();
|
---|
109 | this.label13 = new System.Windows.Forms.Label();
|
---|
110 | this.txtCancellationLetter = new System.Windows.Forms.TextBox();
|
---|
111 | this.pnlOkCancel.SuspendLayout();
|
---|
112 | this.pnlDescription.SuspendLayout();
|
---|
113 | this.grpDescription.SuspendLayout();
|
---|
114 | this.tabResources.SuspendLayout();
|
---|
115 | this.tpRPMSLink.SuspendLayout();
|
---|
116 | this.grpRPMSClinicLink.SuspendLayout();
|
---|
117 | this.tpLetter.SuspendLayout();
|
---|
118 | this.tpRebookLetter.SuspendLayout();
|
---|
119 | this.tpCancellationLetter.SuspendLayout();
|
---|
120 | this.SuspendLayout();
|
---|
121 | //
|
---|
122 | // pnlOkCancel
|
---|
123 | //
|
---|
124 | this.pnlOkCancel.Controls.Add(this.cmdCancel);
|
---|
125 | this.pnlOkCancel.Controls.Add(this.cmdOK);
|
---|
126 | this.pnlOkCancel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
---|
127 | this.pnlOkCancel.Location = new System.Drawing.Point(0, 424);
|
---|
128 | this.pnlOkCancel.Name = "pnlOkCancel";
|
---|
129 | this.pnlOkCancel.Size = new System.Drawing.Size(498, 40);
|
---|
130 | this.pnlOkCancel.TabIndex = 3;
|
---|
131 | //
|
---|
132 | // cmdCancel
|
---|
133 | //
|
---|
134 | this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
---|
135 | this.cmdCancel.Location = new System.Drawing.Point(416, 8);
|
---|
136 | this.cmdCancel.Name = "cmdCancel";
|
---|
137 | this.cmdCancel.Size = new System.Drawing.Size(64, 24);
|
---|
138 | this.cmdCancel.TabIndex = 25;
|
---|
139 | this.cmdCancel.Text = "Cancel";
|
---|
140 | //
|
---|
141 | // cmdOK
|
---|
142 | //
|
---|
143 | this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
---|
144 | this.cmdOK.Location = new System.Drawing.Point(336, 8);
|
---|
145 | this.cmdOK.Name = "cmdOK";
|
---|
146 | this.cmdOK.Size = new System.Drawing.Size(64, 24);
|
---|
147 | this.cmdOK.TabIndex = 20;
|
---|
148 | this.cmdOK.Text = "OK";
|
---|
149 | this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
|
---|
150 | //
|
---|
151 | // pnlDescription
|
---|
152 | //
|
---|
153 | this.pnlDescription.Controls.Add(this.grpDescription);
|
---|
154 | this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
|
---|
155 | this.pnlDescription.Location = new System.Drawing.Point(0, 344);
|
---|
156 | this.pnlDescription.Name = "pnlDescription";
|
---|
157 | this.pnlDescription.Size = new System.Drawing.Size(498, 80);
|
---|
158 | this.pnlDescription.TabIndex = 46;
|
---|
159 | //
|
---|
160 | // grpDescription
|
---|
161 | //
|
---|
162 | this.grpDescription.Controls.Add(this.lblDescription);
|
---|
163 | this.grpDescription.Dock = System.Windows.Forms.DockStyle.Fill;
|
---|
164 | this.grpDescription.Location = new System.Drawing.Point(0, 0);
|
---|
165 | this.grpDescription.Name = "grpDescription";
|
---|
166 | this.grpDescription.Size = new System.Drawing.Size(498, 80);
|
---|
167 | this.grpDescription.TabIndex = 0;
|
---|
168 | this.grpDescription.TabStop = false;
|
---|
169 | this.grpDescription.Text = "Description";
|
---|
170 | //
|
---|
171 | // lblDescription
|
---|
172 | //
|
---|
173 | this.lblDescription.Dock = System.Windows.Forms.DockStyle.Fill;
|
---|
174 | this.lblDescription.Location = new System.Drawing.Point(3, 16);
|
---|
175 | this.lblDescription.Name = "lblDescription";
|
---|
176 | this.lblDescription.Size = new System.Drawing.Size(492, 61);
|
---|
177 | this.lblDescription.TabIndex = 1;
|
---|
178 | this.lblDescription.Text = @"Resources may optionally be linked to a VistA Clinic. To define the parameters for an VistA clinic, you must log into VistA and use the VistA Scheduling Supervisor's menus. The Time Interval field controls the increment of time used on the Calendar display. The Letter Text tab contains the body text of reminder letters for this clinic.";
|
---|
179 | //
|
---|
180 | // tabResources
|
---|
181 | //
|
---|
182 | this.tabResources.Controls.Add(this.tpRPMSLink);
|
---|
183 | this.tabResources.Controls.Add(this.tpLetter);
|
---|
184 | this.tabResources.Controls.Add(this.tpRebookLetter);
|
---|
185 | this.tabResources.Controls.Add(this.tpCancellationLetter);
|
---|
186 | this.tabResources.Dock = System.Windows.Forms.DockStyle.Fill;
|
---|
187 | this.tabResources.Location = new System.Drawing.Point(0, 0);
|
---|
188 | this.tabResources.Name = "tabResources";
|
---|
189 | this.tabResources.SelectedIndex = 0;
|
---|
190 | this.tabResources.Size = new System.Drawing.Size(498, 344);
|
---|
191 | this.tabResources.TabIndex = 10;
|
---|
192 | this.tabResources.SelectedIndexChanged += new System.EventHandler(this.tabResources_SelectedIndexChanged);
|
---|
193 | //
|
---|
194 | // tpRPMSLink
|
---|
195 | //
|
---|
196 | this.tpRPMSLink.Controls.Add(this.label11);
|
---|
197 | this.tpRPMSLink.Controls.Add(this.label5);
|
---|
198 | this.tpRPMSLink.Controls.Add(this.cboTimeInterval);
|
---|
199 | this.tpRPMSLink.Controls.Add(this.chkInactivate);
|
---|
200 | this.tpRPMSLink.Controls.Add(this.grpRPMSClinicLink);
|
---|
201 | this.tpRPMSLink.Controls.Add(this.label1);
|
---|
202 | this.tpRPMSLink.Controls.Add(this.txtResourceName);
|
---|
203 | this.tpRPMSLink.Location = new System.Drawing.Point(4, 22);
|
---|
204 | this.tpRPMSLink.Name = "tpRPMSLink";
|
---|
205 | this.tpRPMSLink.Size = new System.Drawing.Size(490, 318);
|
---|
206 | this.tpRPMSLink.TabIndex = 0;
|
---|
207 | this.tpRPMSLink.Text = "Resource Link";
|
---|
208 | //
|
---|
209 | // label11
|
---|
210 | //
|
---|
211 | this.label11.Location = new System.Drawing.Point(328, 40);
|
---|
212 | this.label11.Name = "label11";
|
---|
213 | this.label11.Size = new System.Drawing.Size(80, 16);
|
---|
214 | this.label11.TabIndex = 52;
|
---|
215 | this.label11.Text = "minutes.";
|
---|
216 | //
|
---|
217 | // label5
|
---|
218 | //
|
---|
219 | this.label5.Location = new System.Drawing.Point(192, 40);
|
---|
220 | this.label5.Name = "label5";
|
---|
221 | this.label5.Size = new System.Drawing.Size(64, 16);
|
---|
222 | this.label5.TabIndex = 51;
|
---|
223 | this.label5.Text = "Time Scale:";
|
---|
224 | //
|
---|
225 | // cboTimeInterval
|
---|
226 | //
|
---|
227 | this.cboTimeInterval.Items.AddRange(new object[] {
|
---|
228 | "5",
|
---|
229 | "10",
|
---|
230 | "15",
|
---|
231 | "20",
|
---|
232 | "30",
|
---|
233 | "60"});
|
---|
234 | this.cboTimeInterval.Location = new System.Drawing.Point(256, 38);
|
---|
235 | this.cboTimeInterval.MaxDropDownItems = 6;
|
---|
236 | this.cboTimeInterval.Name = "cboTimeInterval";
|
---|
237 | this.cboTimeInterval.Size = new System.Drawing.Size(64, 21);
|
---|
238 | this.cboTimeInterval.TabIndex = 10;
|
---|
239 | //
|
---|
240 | // chkInactivate
|
---|
241 | //
|
---|
242 | this.chkInactivate.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
243 | this.chkInactivate.Location = new System.Drawing.Point(80, 40);
|
---|
244 | this.chkInactivate.Name = "chkInactivate";
|
---|
245 | this.chkInactivate.Size = new System.Drawing.Size(72, 16);
|
---|
246 | this.chkInactivate.TabIndex = 5;
|
---|
247 | this.chkInactivate.Text = "Inactive:";
|
---|
248 | //
|
---|
249 | // grpRPMSClinicLink
|
---|
250 | //
|
---|
251 | this.grpRPMSClinicLink.Controls.Add(this.lblReactivateDate);
|
---|
252 | this.grpRPMSClinicLink.Controls.Add(this.label10);
|
---|
253 | this.grpRPMSClinicLink.Controls.Add(this.lblInactivateDate);
|
---|
254 | this.grpRPMSClinicLink.Controls.Add(this.label8);
|
---|
255 | this.grpRPMSClinicLink.Controls.Add(this.lblClinicCode);
|
---|
256 | this.grpRPMSClinicLink.Controls.Add(this.label6);
|
---|
257 | this.grpRPMSClinicLink.Controls.Add(this.lblProvider);
|
---|
258 | this.grpRPMSClinicLink.Controls.Add(this.label7);
|
---|
259 | this.grpRPMSClinicLink.Controls.Add(this.lblVisitServiceCategory);
|
---|
260 | this.grpRPMSClinicLink.Controls.Add(this.label3);
|
---|
261 | this.grpRPMSClinicLink.Controls.Add(this.lblCreateVisit);
|
---|
262 | this.grpRPMSClinicLink.Controls.Add(this.label2);
|
---|
263 | this.grpRPMSClinicLink.Controls.Add(this.label4);
|
---|
264 | this.grpRPMSClinicLink.Controls.Add(this.cboRPMSClinic);
|
---|
265 | this.grpRPMSClinicLink.Location = new System.Drawing.Point(32, 88);
|
---|
266 | this.grpRPMSClinicLink.Name = "grpRPMSClinicLink";
|
---|
267 | this.grpRPMSClinicLink.Size = new System.Drawing.Size(384, 208);
|
---|
268 | this.grpRPMSClinicLink.TabIndex = 48;
|
---|
269 | this.grpRPMSClinicLink.TabStop = false;
|
---|
270 | this.grpRPMSClinicLink.Text = "VistA Clinic Link";
|
---|
271 | //
|
---|
272 | // lblReactivateDate
|
---|
273 | //
|
---|
274 | this.lblReactivateDate.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
275 | this.lblReactivateDate.Location = new System.Drawing.Point(176, 168);
|
---|
276 | this.lblReactivateDate.Name = "lblReactivateDate";
|
---|
277 | this.lblReactivateDate.Size = new System.Drawing.Size(176, 16);
|
---|
278 | this.lblReactivateDate.TabIndex = 57;
|
---|
279 | //
|
---|
280 | // label10
|
---|
281 | //
|
---|
282 | this.label10.Location = new System.Drawing.Point(56, 168);
|
---|
283 | this.label10.Name = "label10";
|
---|
284 | this.label10.Size = new System.Drawing.Size(112, 16);
|
---|
285 | this.label10.TabIndex = 56;
|
---|
286 | this.label10.Text = "Reactivate Date:";
|
---|
287 | this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
288 | //
|
---|
289 | // lblInactivateDate
|
---|
290 | //
|
---|
291 | this.lblInactivateDate.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
292 | this.lblInactivateDate.Location = new System.Drawing.Point(176, 144);
|
---|
293 | this.lblInactivateDate.Name = "lblInactivateDate";
|
---|
294 | this.lblInactivateDate.Size = new System.Drawing.Size(176, 16);
|
---|
295 | this.lblInactivateDate.TabIndex = 55;
|
---|
296 | //
|
---|
297 | // label8
|
---|
298 | //
|
---|
299 | this.label8.Location = new System.Drawing.Point(48, 144);
|
---|
300 | this.label8.Name = "label8";
|
---|
301 | this.label8.Size = new System.Drawing.Size(120, 16);
|
---|
302 | this.label8.TabIndex = 54;
|
---|
303 | this.label8.Text = "Inactivate Date:";
|
---|
304 | this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
305 | //
|
---|
306 | // lblClinicCode
|
---|
307 | //
|
---|
308 | this.lblClinicCode.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
309 | this.lblClinicCode.Location = new System.Drawing.Point(176, 120);
|
---|
310 | this.lblClinicCode.Name = "lblClinicCode";
|
---|
311 | this.lblClinicCode.Size = new System.Drawing.Size(176, 16);
|
---|
312 | this.lblClinicCode.TabIndex = 53;
|
---|
313 | //
|
---|
314 | // label6
|
---|
315 | //
|
---|
316 | this.label6.Location = new System.Drawing.Point(96, 120);
|
---|
317 | this.label6.Name = "label6";
|
---|
318 | this.label6.Size = new System.Drawing.Size(72, 16);
|
---|
319 | this.label6.TabIndex = 52;
|
---|
320 | this.label6.Text = "Clinic Code:";
|
---|
321 | this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
322 | //
|
---|
323 | // lblProvider
|
---|
324 | //
|
---|
325 | this.lblProvider.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
326 | this.lblProvider.Location = new System.Drawing.Point(176, 96);
|
---|
327 | this.lblProvider.Name = "lblProvider";
|
---|
328 | this.lblProvider.Size = new System.Drawing.Size(176, 16);
|
---|
329 | this.lblProvider.TabIndex = 51;
|
---|
330 | //
|
---|
331 | // label7
|
---|
332 | //
|
---|
333 | this.label7.Location = new System.Drawing.Point(104, 96);
|
---|
334 | this.label7.Name = "label7";
|
---|
335 | this.label7.Size = new System.Drawing.Size(64, 16);
|
---|
336 | this.label7.TabIndex = 50;
|
---|
337 | this.label7.Text = "Provider:";
|
---|
338 | this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
339 | //
|
---|
340 | // lblVisitServiceCategory
|
---|
341 | //
|
---|
342 | this.lblVisitServiceCategory.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
343 | this.lblVisitServiceCategory.Location = new System.Drawing.Point(176, 72);
|
---|
344 | this.lblVisitServiceCategory.Name = "lblVisitServiceCategory";
|
---|
345 | this.lblVisitServiceCategory.Size = new System.Drawing.Size(176, 16);
|
---|
346 | this.lblVisitServiceCategory.TabIndex = 49;
|
---|
347 | //
|
---|
348 | // label3
|
---|
349 | //
|
---|
350 | this.label3.Location = new System.Drawing.Point(48, 72);
|
---|
351 | this.label3.Name = "label3";
|
---|
352 | this.label3.Size = new System.Drawing.Size(120, 16);
|
---|
353 | this.label3.TabIndex = 48;
|
---|
354 | this.label3.Text = "Visit Sevice Category:";
|
---|
355 | this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
356 | //
|
---|
357 | // lblCreateVisit
|
---|
358 | //
|
---|
359 | this.lblCreateVisit.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
360 | this.lblCreateVisit.Location = new System.Drawing.Point(176, 48);
|
---|
361 | this.lblCreateVisit.Name = "lblCreateVisit";
|
---|
362 | this.lblCreateVisit.Size = new System.Drawing.Size(40, 16);
|
---|
363 | this.lblCreateVisit.TabIndex = 47;
|
---|
364 | //
|
---|
365 | // label2
|
---|
366 | //
|
---|
367 | this.label2.Location = new System.Drawing.Point(32, 48);
|
---|
368 | this.label2.Name = "label2";
|
---|
369 | this.label2.Size = new System.Drawing.Size(136, 16);
|
---|
370 | this.label2.TabIndex = 46;
|
---|
371 | this.label2.Text = "Create Visit at Check-In?";
|
---|
372 | this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
373 | //
|
---|
374 | // label4
|
---|
375 | //
|
---|
376 | this.label4.Location = new System.Drawing.Point(32, 18);
|
---|
377 | this.label4.Name = "label4";
|
---|
378 | this.label4.Size = new System.Drawing.Size(72, 16);
|
---|
379 | this.label4.TabIndex = 45;
|
---|
380 | this.label4.Text = "VistA Clinic:";
|
---|
381 | this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
382 | //
|
---|
383 | // cboRPMSClinic
|
---|
384 | //
|
---|
385 | this.cboRPMSClinic.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
---|
386 | this.cboRPMSClinic.Location = new System.Drawing.Point(112, 16);
|
---|
387 | this.cboRPMSClinic.Name = "cboRPMSClinic";
|
---|
388 | this.cboRPMSClinic.Size = new System.Drawing.Size(256, 21);
|
---|
389 | this.cboRPMSClinic.TabIndex = 15;
|
---|
390 | //
|
---|
391 | // label1
|
---|
392 | //
|
---|
393 | this.label1.Location = new System.Drawing.Point(36, 11);
|
---|
394 | this.label1.Name = "label1";
|
---|
395 | this.label1.Size = new System.Drawing.Size(96, 16);
|
---|
396 | this.label1.TabIndex = 47;
|
---|
397 | this.label1.Text = "Resource Name:";
|
---|
398 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
399 | //
|
---|
400 | // txtResourceName
|
---|
401 | //
|
---|
402 | this.txtResourceName.Location = new System.Drawing.Point(140, 11);
|
---|
403 | this.txtResourceName.MaxLength = 30;
|
---|
404 | this.txtResourceName.Name = "txtResourceName";
|
---|
405 | this.txtResourceName.Size = new System.Drawing.Size(256, 20);
|
---|
406 | this.txtResourceName.TabIndex = 0;
|
---|
407 | this.txtResourceName.Text = "";
|
---|
408 | //
|
---|
409 | // tpLetter
|
---|
410 | //
|
---|
411 | this.tpLetter.Controls.Add(this.label9);
|
---|
412 | this.tpLetter.Controls.Add(this.txtLetter);
|
---|
413 | this.tpLetter.Location = new System.Drawing.Point(4, 22);
|
---|
414 | this.tpLetter.Name = "tpLetter";
|
---|
415 | this.tpLetter.Size = new System.Drawing.Size(490, 318);
|
---|
416 | this.tpLetter.TabIndex = 1;
|
---|
417 | this.tpLetter.Text = "Reminder Letter";
|
---|
418 | //
|
---|
419 | // label9
|
---|
420 | //
|
---|
421 | this.label9.Location = new System.Drawing.Point(32, 24);
|
---|
422 | this.label9.Name = "label9";
|
---|
423 | this.label9.Size = new System.Drawing.Size(416, 32);
|
---|
424 | this.label9.TabIndex = 1;
|
---|
425 | this.label9.Text = "Enter the text which will appear on reminder letters sent to patients with appoin" +
|
---|
426 | "tments in this clinic. Use CTRL+Enter to start a new line.";
|
---|
427 | //
|
---|
428 | // txtLetter
|
---|
429 | //
|
---|
430 | this.txtLetter.Location = new System.Drawing.Point(32, 72);
|
---|
431 | this.txtLetter.Multiline = true;
|
---|
432 | this.txtLetter.Name = "txtLetter";
|
---|
433 | this.txtLetter.Size = new System.Drawing.Size(416, 216);
|
---|
434 | this.txtLetter.TabIndex = 20;
|
---|
435 | this.txtLetter.Text = "Dear Patient,\r\n\r\nThis letter is to remind you that you have the appointments list" +
|
---|
436 | "ed below.\r\n\r\nPlease contact us at 555-1234 if you are unable to keep this appoin" +
|
---|
437 | "tment.\r\n\r\nThank you,\r\n\r\nThe Clinic";
|
---|
438 | //
|
---|
439 | // tpRebookLetter
|
---|
440 | //
|
---|
441 | this.tpRebookLetter.Controls.Add(this.label12);
|
---|
442 | this.tpRebookLetter.Controls.Add(this.txtRebookLetter);
|
---|
443 | this.tpRebookLetter.Location = new System.Drawing.Point(4, 22);
|
---|
444 | this.tpRebookLetter.Name = "tpRebookLetter";
|
---|
445 | this.tpRebookLetter.Size = new System.Drawing.Size(490, 318);
|
---|
446 | this.tpRebookLetter.TabIndex = 2;
|
---|
447 | this.tpRebookLetter.Text = "Rebook Letter";
|
---|
448 | //
|
---|
449 | // label12
|
---|
450 | //
|
---|
451 | this.label12.Location = new System.Drawing.Point(37, 27);
|
---|
452 | this.label12.Name = "label12";
|
---|
453 | this.label12.Size = new System.Drawing.Size(416, 32);
|
---|
454 | this.label12.TabIndex = 21;
|
---|
455 | this.label12.Text = "Enter the text which will appear on rebook letters sent to patients with appointm" +
|
---|
456 | "ents in this clinic. Use CTRL+Enter to start a new line.";
|
---|
457 | //
|
---|
458 | // txtRebookLetter
|
---|
459 | //
|
---|
460 | this.txtRebookLetter.Location = new System.Drawing.Point(37, 75);
|
---|
461 | this.txtRebookLetter.Multiline = true;
|
---|
462 | this.txtRebookLetter.Name = "txtRebookLetter";
|
---|
463 | this.txtRebookLetter.Size = new System.Drawing.Size(416, 216);
|
---|
464 | this.txtRebookLetter.TabIndex = 22;
|
---|
465 | this.txtRebookLetter.Text = "Dear Patient,\r\n\r\nThis letter is to inform you that we have changed the appointmen" +
|
---|
466 | "ts listed below.\r\n\r\nPlease contact us at 555-1234 if you are unable to keep your" +
|
---|
467 | " appointment.\r\n\r\nThank you,\r\n\r\nThe Clinic";
|
---|
468 | //
|
---|
469 | // tpCancellationLetter
|
---|
470 | //
|
---|
471 | this.tpCancellationLetter.Controls.Add(this.label13);
|
---|
472 | this.tpCancellationLetter.Controls.Add(this.txtCancellationLetter);
|
---|
473 | this.tpCancellationLetter.Location = new System.Drawing.Point(4, 22);
|
---|
474 | this.tpCancellationLetter.Name = "tpCancellationLetter";
|
---|
475 | this.tpCancellationLetter.Size = new System.Drawing.Size(490, 318);
|
---|
476 | this.tpCancellationLetter.TabIndex = 3;
|
---|
477 | this.tpCancellationLetter.Text = "Cancellation Letter";
|
---|
478 | //
|
---|
479 | // label13
|
---|
480 | //
|
---|
481 | this.label13.Location = new System.Drawing.Point(37, 27);
|
---|
482 | this.label13.Name = "label13";
|
---|
483 | this.label13.Size = new System.Drawing.Size(416, 32);
|
---|
484 | this.label13.TabIndex = 21;
|
---|
485 | this.label13.Text = "Enter the text which will appear on cancellation letters sent to patients with ap" +
|
---|
486 | "pointments in this clinic. Use CTRL+Enter to start a new line.";
|
---|
487 | //
|
---|
488 | // txtCancellationLetter
|
---|
489 | //
|
---|
490 | this.txtCancellationLetter.Location = new System.Drawing.Point(37, 75);
|
---|
491 | this.txtCancellationLetter.Multiline = true;
|
---|
492 | this.txtCancellationLetter.Name = "txtCancellationLetter";
|
---|
493 | this.txtCancellationLetter.Size = new System.Drawing.Size(416, 216);
|
---|
494 | this.txtCancellationLetter.TabIndex = 22;
|
---|
495 | this.txtCancellationLetter.Text = "Dear Patient,\r\n\r\nThis letter is to inform you that the appointments listed below " +
|
---|
496 | "have been cancelled.\r\n\r\nPlease contact us at 555-1234 if you have questions abou" +
|
---|
497 | "t your appointments.\r\n\r\nThank you,\r\n\r\nThe Clinic";
|
---|
498 | //
|
---|
499 | // DResource
|
---|
500 | //
|
---|
501 | this.AcceptButton = this.cmdOK;
|
---|
502 | this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
---|
503 | this.CancelButton = this.cmdCancel;
|
---|
504 | this.ClientSize = new System.Drawing.Size(498, 464);
|
---|
505 | this.Controls.Add(this.tabResources);
|
---|
506 | this.Controls.Add(this.pnlDescription);
|
---|
507 | this.Controls.Add(this.pnlOkCancel);
|
---|
508 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
---|
509 | this.Name = "DResource";
|
---|
510 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
---|
511 | this.Text = "Manage Resource";
|
---|
512 | this.Activated += new System.EventHandler(this.DResource_Activated);
|
---|
513 | this.pnlOkCancel.ResumeLayout(false);
|
---|
514 | this.pnlDescription.ResumeLayout(false);
|
---|
515 | this.grpDescription.ResumeLayout(false);
|
---|
516 | this.tabResources.ResumeLayout(false);
|
---|
517 | this.tpRPMSLink.ResumeLayout(false);
|
---|
518 | this.grpRPMSClinicLink.ResumeLayout(false);
|
---|
519 | this.tpLetter.ResumeLayout(false);
|
---|
520 | this.tpRebookLetter.ResumeLayout(false);
|
---|
521 | this.tpCancellationLetter.ResumeLayout(false);
|
---|
522 | this.ResumeLayout(false);
|
---|
523 |
|
---|
524 | }
|
---|
525 | #endregion
|
---|
526 |
|
---|
527 | #region Fields
|
---|
528 |
|
---|
529 | private DataTable m_dtResources;
|
---|
530 | private CGResource m_pResource;
|
---|
531 | private DataView m_dvHospLoc;
|
---|
532 | private DataView m_dvClinicParams;
|
---|
533 |
|
---|
534 | #endregion Fields
|
---|
535 |
|
---|
536 | #region Methods
|
---|
537 |
|
---|
538 | public void InitializePage(int nSelectedResourceID, DataSet dsGlobal)
|
---|
539 | {
|
---|
540 | m_dtResources = dsGlobal.Tables["Resources"];
|
---|
541 |
|
---|
542 | //Datasource the HOSPITAL LOCATION combo box
|
---|
543 | DataTable dtHospLoc = dsGlobal.Tables["HospitalLocation"];
|
---|
544 | m_dvHospLoc = new DataView(dtHospLoc);
|
---|
545 | m_dvHospLoc.Sort = "HOSPITAL_LOCATION_ID ASC";
|
---|
546 | int nFind = m_dvHospLoc.Find((int) 0);
|
---|
547 | if (nFind < 0)
|
---|
548 | {
|
---|
549 | DataRowView drv = m_dvHospLoc.AddNew();
|
---|
550 | drv.BeginEdit();
|
---|
551 | drv["HOSPITAL_LOCATION"]="<None>";
|
---|
552 | drv["HOSPITAL_LOCATION_ID"]=0;
|
---|
553 | drv.EndEdit();
|
---|
554 | }
|
---|
555 |
|
---|
556 | // DataTable dtClinicParams = dsGlobal.Tables["ClinicSetupParameters"];
|
---|
557 | // m_dvClinicParams = new DataView(dtClinicParams);
|
---|
558 | // m_dvClinicParams.Sort = "HOSPITAL_LOCATION_ID ASC";
|
---|
559 | // m_dvClinicParams.Sort = "HOSPITAL_LOCATION ASC";
|
---|
560 | // string sFind = "<None>";
|
---|
561 | // nFind = m_dvClinicParams.Find((int) 0);
|
---|
562 | /* nFind = m_dvClinicParams.Find((string) sFind);
|
---|
563 |
|
---|
564 | if (nFind < 0)
|
---|
565 | {
|
---|
566 | DataRowView drv = m_dvClinicParams.AddNew();
|
---|
567 | drv.BeginEdit();
|
---|
568 | drv["HOSPITAL_LOCATION"]="<None>";
|
---|
569 | drv["HOSPITAL_LOCATION_ID"]="0";
|
---|
570 | drv["CREATE_VISIT"]="";
|
---|
571 | drv["VISIT_SERVICE_CATEGORY"]="";
|
---|
572 | drv.EndEdit();
|
---|
573 | }
|
---|
574 | */
|
---|
575 | //smh cboRPMSClinic.DataSource = m_dvClinicParams;
|
---|
576 | cboRPMSClinic.DataSource = m_dvHospLoc;
|
---|
577 | cboRPMSClinic.DisplayMember = "HOSPITAL_LOCATION";
|
---|
578 | cboRPMSClinic.ValueMember = "HOSPITAL_LOCATION_ID";
|
---|
579 | // cboRPMSClinic.SelectedItem = nFind;
|
---|
580 | cboRPMSClinic.SelectedIndex = nFind;
|
---|
581 |
|
---|
582 | //Set databindings of the label boxes
|
---|
583 |
|
---|
584 | //smh lblCreateVisit.DataBindings.Add("Text", m_dvClinicParams, "CREATE_VISIT");
|
---|
585 | //smh lblClinicCode.DataBindings.Add("Text", m_dvClinicParams, "CLINIC_STOP");
|
---|
586 | lblClinicCode.DataBindings.Add("Text", m_dvHospLoc, "STOP_CODE_NUMBER"); //smh
|
---|
587 | //smh lblProvider.DataBindings.Add("Text", m_dvClinicParams, "PROVIDER");
|
---|
588 | lblProvider.DataBindings.Add("Text", m_dvHospLoc, "DEFAULT_PROVIDER"); //smh
|
---|
589 | //smh lblInactivateDate.DataBindings.Add("Text", m_dvClinicParams, "INACTIVATE_DATE");
|
---|
590 | lblInactivateDate.DataBindings.Add("Text", m_dvHospLoc, "INACTIVATE_DATE"); //smh
|
---|
591 | //smh lblReactivateDate.DataBindings.Add("Text", m_dvClinicParams, "REACTIVATE_DATE");
|
---|
592 | lblReactivateDate.DataBindings.Add("Text", m_dvHospLoc, "REACTIVATE_DATE"); //smh
|
---|
593 | //create new instance of Resource class
|
---|
594 | m_pResource = new CGResource();
|
---|
595 |
|
---|
596 | if (nSelectedResourceID < 0) //then we're in ADD mode
|
---|
597 | {
|
---|
598 | this.Text = "Add New Scheduling Resource";
|
---|
599 | m_pResource.ResourceID = 0;
|
---|
600 | m_pResource.ResourceName = "";
|
---|
601 | m_pResource.Inactive = false;
|
---|
602 | m_pResource.HospitalLocationID = 0;
|
---|
603 | m_pResource.HospitalLocation = "";
|
---|
604 | m_pResource.TimeScale = 15;
|
---|
605 | }
|
---|
606 | else //we're in EDIT mode
|
---|
607 | {
|
---|
608 | this.Text = "Edit Scheduling Resource";
|
---|
609 | // DataRow dr = m_dtResources.Rows[nSelectedResourceID];
|
---|
610 |
|
---|
611 | DataRow dr = m_dtResources.Rows.Find(nSelectedResourceID);
|
---|
612 | //TODO: test dr for validity
|
---|
613 |
|
---|
614 | string sID = dr["RESOURCEID"].ToString();
|
---|
615 | sID = (sID == "")?"0":sID;
|
---|
616 | m_pResource.ResourceID = Convert.ToInt16(sID);
|
---|
617 | m_pResource.ResourceName = dr["RESOURCE_NAME"].ToString();
|
---|
618 |
|
---|
619 | string sInactive = dr["INACTIVE"].ToString();
|
---|
620 | m_pResource.Inactive = (sInactive == "1")?true:false;
|
---|
621 |
|
---|
622 | sID = dr["HOSPITAL_LOCATION_ID"].ToString();
|
---|
623 | sID = (sID == "")?"0":sID;
|
---|
624 | m_pResource.HospitalLocationID = Convert.ToInt16(sID);
|
---|
625 |
|
---|
626 | if (dr["TIMESCALE"].ToString() != "")
|
---|
627 | {
|
---|
628 | m_pResource.TimeScale = (int) dr["TIMESCALE"];
|
---|
629 | }
|
---|
630 | m_pResource.LetterText = dr["LETTER_TEXT"].ToString();
|
---|
631 | m_pResource.NoShowLetterText = dr["NO_SHOW_LETTER"].ToString();
|
---|
632 | m_pResource.CancellationLetterText = dr["CLINIC_CANCELLATION_LETTER"].ToString();
|
---|
633 |
|
---|
634 | dr = dsGlobal.Tables["HospitalLocation"].Rows.Find(m_pResource.HospitalLocationID);
|
---|
635 | //TODO: test dr validity
|
---|
636 | m_pResource.HospitalLocation = dr["HOSPITAL_LOCATION"].ToString();
|
---|
637 |
|
---|
638 |
|
---|
639 | }
|
---|
640 | UpdateDialogData(true);
|
---|
641 | }
|
---|
642 |
|
---|
643 | /// <summary>
|
---|
644 | /// If b is true, moves member vars into control data
|
---|
645 | /// otherwise, moves control data into member vars
|
---|
646 | /// </summary>
|
---|
647 | /// <param name="b"></param>
|
---|
648 | private void UpdateDialogData(bool b)
|
---|
649 | {
|
---|
650 | if (b == true)
|
---|
651 | {
|
---|
652 | txtResourceName.Text = m_pResource.ResourceName;
|
---|
653 | chkInactivate.Checked = m_pResource.Inactive;
|
---|
654 | cboRPMSClinic.SelectedValue = m_pResource.HospitalLocationID;
|
---|
655 | txtLetter.Text = m_pResource.LetterText;
|
---|
656 | txtRebookLetter.Text = m_pResource.NoShowLetterText;
|
---|
657 | txtCancellationLetter.Text = m_pResource.CancellationLetterText;
|
---|
658 | cboTimeInterval.Text = m_pResource.TimeScale.ToString();
|
---|
659 |
|
---|
660 | }
|
---|
661 | else
|
---|
662 | {
|
---|
663 | m_pResource.ResourceName = this.txtResourceName.Text;
|
---|
664 | m_pResource.Inactive = this.chkInactivate.Checked;
|
---|
665 | m_pResource.HospitalLocationID = Convert.ToInt16(this.cboRPMSClinic.SelectedValue);
|
---|
666 | m_pResource.LetterText = txtLetter.Text;
|
---|
667 | m_pResource.CancellationLetterText = txtCancellationLetter.Text;
|
---|
668 | m_pResource.NoShowLetterText = txtRebookLetter.Text;
|
---|
669 | if (cboTimeInterval.Text != "")
|
---|
670 | m_pResource.TimeScale = Convert.ToInt16(cboTimeInterval.Text);
|
---|
671 |
|
---|
672 | }
|
---|
673 | }
|
---|
674 |
|
---|
675 | /// <summary>
|
---|
676 | /// Clean up any resources being used.
|
---|
677 | /// </summary>
|
---|
678 | protected override void Dispose( bool disposing )
|
---|
679 | {
|
---|
680 | if( disposing )
|
---|
681 | {
|
---|
682 | if(components != null)
|
---|
683 | {
|
---|
684 | components.Dispose();
|
---|
685 | }
|
---|
686 | }
|
---|
687 | base.Dispose( disposing );
|
---|
688 | }
|
---|
689 |
|
---|
690 | private void cmdOK_Click(object sender, System.EventArgs e)
|
---|
691 | {
|
---|
692 | this.UpdateDialogData(false);
|
---|
693 | }
|
---|
694 |
|
---|
695 | private void tabResources_SelectedIndexChanged(object sender, System.EventArgs e)
|
---|
696 | {
|
---|
697 | if (tabResources.SelectedIndex == 0)
|
---|
698 | {
|
---|
699 | txtResourceName.Focus();
|
---|
700 | }
|
---|
701 | else
|
---|
702 | {
|
---|
703 | txtLetter.Focus();
|
---|
704 | }
|
---|
705 | }
|
---|
706 |
|
---|
707 | private void DResource_Activated(object sender, System.EventArgs e)
|
---|
708 | {
|
---|
709 | txtResourceName.Focus();
|
---|
710 | }
|
---|
711 |
|
---|
712 | #endregion Methods
|
---|
713 |
|
---|
714 | #region Properties
|
---|
715 | public bool Inactive
|
---|
716 | {
|
---|
717 | get
|
---|
718 | {
|
---|
719 | return m_pResource.Inactive;
|
---|
720 | }
|
---|
721 | set
|
---|
722 | {
|
---|
723 | m_pResource.Inactive = value;
|
---|
724 | }
|
---|
725 | }
|
---|
726 |
|
---|
727 | public int HospitalLocationID
|
---|
728 | {
|
---|
729 | get
|
---|
730 | {
|
---|
731 | return m_pResource.HospitalLocationID;
|
---|
732 | }
|
---|
733 | set
|
---|
734 | {
|
---|
735 | m_pResource.HospitalLocationID = value;
|
---|
736 | }
|
---|
737 | }
|
---|
738 |
|
---|
739 | public string ResourceName
|
---|
740 | {
|
---|
741 | get
|
---|
742 | {
|
---|
743 | return m_pResource.ResourceName;
|
---|
744 | }
|
---|
745 | set
|
---|
746 | {
|
---|
747 | m_pResource.ResourceName = value;
|
---|
748 | }
|
---|
749 | }
|
---|
750 |
|
---|
751 | public string LetterText
|
---|
752 | {
|
---|
753 | get
|
---|
754 | {
|
---|
755 | return m_pResource.LetterText;
|
---|
756 | }
|
---|
757 | set
|
---|
758 | {
|
---|
759 | m_pResource.LetterText = value;
|
---|
760 | }
|
---|
761 | }
|
---|
762 |
|
---|
763 | public string NoShowLetterText
|
---|
764 | {
|
---|
765 | get
|
---|
766 | {
|
---|
767 | return m_pResource.NoShowLetterText;
|
---|
768 | }
|
---|
769 | set
|
---|
770 | {
|
---|
771 | m_pResource.NoShowLetterText = value;
|
---|
772 | }
|
---|
773 | }
|
---|
774 |
|
---|
775 | public string CancellationLetterText
|
---|
776 | {
|
---|
777 | get
|
---|
778 | {
|
---|
779 | return m_pResource.CancellationLetterText;
|
---|
780 | }
|
---|
781 | set
|
---|
782 | {
|
---|
783 | m_pResource.CancellationLetterText = value;
|
---|
784 | }
|
---|
785 | }
|
---|
786 |
|
---|
787 | public int ResourceID
|
---|
788 | {
|
---|
789 | get
|
---|
790 | {
|
---|
791 | return m_pResource.ResourceID;
|
---|
792 | }
|
---|
793 | set
|
---|
794 | {
|
---|
795 | m_pResource.ResourceID = value;
|
---|
796 | }
|
---|
797 | }
|
---|
798 |
|
---|
799 | public int TimeScale
|
---|
800 | {
|
---|
801 | get
|
---|
802 | {
|
---|
803 | return m_pResource.TimeScale;
|
---|
804 | }
|
---|
805 | set
|
---|
806 | {
|
---|
807 | m_pResource.TimeScale = value;
|
---|
808 | }
|
---|
809 | }
|
---|
810 |
|
---|
811 | #endregion Properties
|
---|
812 |
|
---|
813 |
|
---|
814 | }
|
---|
815 | }
|
---|