1 | unit fEncVitals;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
---|
7 | fPCEBase, ORDtTm, StdCtrls, ORCtrls, ExtCtrls, Buttons, fAutoSz, ORFn,
|
---|
8 | rvitals, ComCtrls;
|
---|
9 |
|
---|
10 | type
|
---|
11 | TfrmEncVitals = class(TfrmPCEBase)
|
---|
12 | pnlmain: TPanel;
|
---|
13 | lblDate: TStaticText;
|
---|
14 | lblDateBP: TStaticText;
|
---|
15 | lblDateTemp: TStaticText;
|
---|
16 | lblDateResp: TStaticText;
|
---|
17 | lblDatePulse: TStaticText;
|
---|
18 | lblDateHeight: TStaticText;
|
---|
19 | lblDateWeight: TStaticText;
|
---|
20 | lblLstMeas: TStaticText;
|
---|
21 | lbllastBP: TStaticText;
|
---|
22 | lblLastTemp: TStaticText;
|
---|
23 | lblLastResp: TStaticText;
|
---|
24 | lblLastPulse: TStaticText;
|
---|
25 | lblLastHeight: TStaticText;
|
---|
26 | lblLastWeight: TStaticText;
|
---|
27 | lblVitPointer: TOROffsetLabel;
|
---|
28 | lblVital: TStaticText;
|
---|
29 | lblVitBP: TStaticText;
|
---|
30 | lnlVitTemp: TStaticText;
|
---|
31 | lblVitResp: TStaticText;
|
---|
32 | lblVitPulse: TStaticText;
|
---|
33 | lblVitHeight: TStaticText;
|
---|
34 | lblVitWeight: TStaticText;
|
---|
35 | txtMeasBP: TCaptionEdit;
|
---|
36 | cboTemp: TCaptionComboBox;
|
---|
37 | txtMeasTemp: TCaptionEdit;
|
---|
38 | txtMeasResp: TCaptionEdit;
|
---|
39 | cboHeight: TCaptionComboBox;
|
---|
40 | txtMeasWt: TCaptionEdit;
|
---|
41 | cboWeight: TCaptionComboBox;
|
---|
42 | txtMeasDate: TORDateBox;
|
---|
43 | lblVitPain: TStaticText;
|
---|
44 | lblLastPain: TStaticText;
|
---|
45 | lblDatePain: TStaticText;
|
---|
46 | cboPain: TORComboBox;
|
---|
47 | txtMeasPulse: TCaptionEdit;
|
---|
48 | txtMeasHt: TCaptionEdit;
|
---|
49 | procedure SetVitPointer(Sender: TObject);
|
---|
50 | procedure txtMeasBPExit(Sender: TObject);
|
---|
51 | procedure cboTempChange(Sender: TObject);
|
---|
52 | procedure cboTempExit(Sender: TObject);
|
---|
53 | procedure txtMeasRespExit(Sender: TObject);
|
---|
54 | procedure txtMeasPulseExit(Sender: TObject);
|
---|
55 | procedure cboHeightChange(Sender: TObject);
|
---|
56 | procedure cboHeightExit(Sender: TObject);
|
---|
57 | procedure cboWeightChange(Sender: TObject);
|
---|
58 | procedure cboWeightExit(Sender: TObject);
|
---|
59 | procedure FormCreate(Sender: TObject);
|
---|
60 | procedure FormDestroy(Sender: TObject);
|
---|
61 | procedure lbllastClick(Sender: TObject);
|
---|
62 | procedure FormShow(Sender: TObject);
|
---|
63 | procedure FormActivate(Sender: TObject);
|
---|
64 | function HasData: Boolean;
|
---|
65 | function AssignVitals: boolean;
|
---|
66 | procedure cboPainChange(Sender: TObject);
|
---|
67 | procedure FormResize(Sender: TObject);
|
---|
68 | procedure txtMeasTempExit(Sender: TObject);
|
---|
69 | procedure txtMeasHtExit(Sender: TObject);
|
---|
70 | procedure txtMeasWtExit(Sender: TObject);
|
---|
71 | procedure FormKeyDown(Sender: TObject; var Key: Word;
|
---|
72 | Shift: TShiftState);
|
---|
73 | private
|
---|
74 | FDataLoaded: boolean;
|
---|
75 | FChangingFocus: boolean;
|
---|
76 | UvitalNew: TStringList;
|
---|
77 | uVitalOld: TSTringList;
|
---|
78 | procedure InitVitalPanel;
|
---|
79 | procedure PopulateLastVital;
|
---|
80 | function GetVitHTRate: String;
|
---|
81 | procedure CheckVitalUnit;
|
---|
82 | procedure ChangeFocus(Control: TWinControl);
|
---|
83 | procedure ClearData;
|
---|
84 | public
|
---|
85 | function OK2SaveVitals: boolean;
|
---|
86 | property VitalNew: TStringList read uVitalNew;
|
---|
87 | property VitalOld: TStringList read uVitalOld;
|
---|
88 | end;
|
---|
89 |
|
---|
90 | var
|
---|
91 | frmEncVitals: TfrmEncVitals;
|
---|
92 | // uVitalLocation: Real;
|
---|
93 |
|
---|
94 | implementation
|
---|
95 |
|
---|
96 | {$R *.DFM}
|
---|
97 |
|
---|
98 | uses UCore, rCore, rPCE, fPCELex, fPCEOther, fVitals,fVisit, fFrame, fEncnt,
|
---|
99 | uVitals, fEncounterFrame;
|
---|
100 |
|
---|
101 | const
|
---|
102 | TX_VDATE_REQ1 = 'Entered vitals information can not be saved without a Date.' + CRLF +
|
---|
103 | 'Do you wish to use the encounter date of ';
|
---|
104 | TX_VDATE_REQ2 = '?';
|
---|
105 | TC_VDATE_REQ = 'Missing Vitals Entry Date';
|
---|
106 |
|
---|
107 | TX_KILLDATA = 'Discard entered vitals information?';
|
---|
108 |
|
---|
109 | var
|
---|
110 | UcboVitChanging: Boolean = False;
|
---|
111 |
|
---|
112 | function TfrmEncVitals.HasData: Boolean;
|
---|
113 | begin
|
---|
114 | result := False;
|
---|
115 | if ((txtMeasBP.text <> '') or (txtMeasTemp.text <> '') or (txtMeasResp.text <> '') or
|
---|
116 | (txtMeasPulse.text <> '') or (txtMeasHt.text <> '') or (txtMeasWt.text <> '')) or
|
---|
117 | (cboPain.text <>'') then
|
---|
118 | result := True;
|
---|
119 | end;
|
---|
120 |
|
---|
121 | procedure TfrmEncVitals.InitVitalPanel;
|
---|
122 | begin
|
---|
123 | lblDate.font.Style := [fsBold];
|
---|
124 | lblDateBP.font.Style := [fsBold];
|
---|
125 | lblDateTemp.font.Style := [fsBold];
|
---|
126 | lblDateResp.font.Style := [fsBold];
|
---|
127 | lblDatePulse.font.Style := [fsBold];
|
---|
128 | lblDateHeight.font.Style := [fsBold];
|
---|
129 | lblDateWeight.font.Style := [fsBold];
|
---|
130 | lblDatePain.font.style := [fsBold];
|
---|
131 | lblLstMeas.font.Style := [fsBold];
|
---|
132 | lblLastBP.font.Style := [fsBold];
|
---|
133 | lblLastTemp.font.Style := [fsBold];
|
---|
134 | lblLastResp.font.Style := [fsBold];
|
---|
135 | lblLastPulse.font.Style := [fsBold];
|
---|
136 | lblLastHeight.font.Style := [fsBold];
|
---|
137 | lblLastWeight.font.Style := [fsBold];
|
---|
138 | lblLastPain.font.style := [fsBold];
|
---|
139 | lblVital.font.Style := [fsbold];
|
---|
140 |
|
---|
141 | {Use this area to read parameter for units and set apropriately
|
---|
142 | after parameter is defined. in next version
|
---|
143 | }
|
---|
144 | UcboVitchanging := true; //prevents entering code in CheckVitalUnit
|
---|
145 |
|
---|
146 | try
|
---|
147 | InitPainCombo(cboPain);
|
---|
148 | cboTemp.Text := cboTemp.Items[0];
|
---|
149 | cboHeight.Text := cboHeight.Items[0];
|
---|
150 | cboWeight.Text := cboWeight.Items[0];
|
---|
151 | finally
|
---|
152 | UcboVitchanging := False; //prevents entering code in CheckVitalUnit
|
---|
153 | end;
|
---|
154 |
|
---|
155 | if txtMeasDate.Text = '' then
|
---|
156 | txtMeasDate.Text := FormatFMDateTime('mmm dd,yy@hh:nn', uEncPCEData.VisitDateTime);
|
---|
157 | if (UvitalOld.text = '') then
|
---|
158 | PopulateLastVital;
|
---|
159 | end;
|
---|
160 |
|
---|
161 |
|
---|
162 | procedure TfrmEncVitals.PopulateLastVital;
|
---|
163 | var
|
---|
164 | i: integer;
|
---|
165 | begin
|
---|
166 | GetLastVital(uVitalOld,Patient.DFN);
|
---|
167 | //populate labels from UVitalOld;
|
---|
168 | with UVitalOld do
|
---|
169 | for i := 0 to count-1 do
|
---|
170 | begin
|
---|
171 | if piece(strings[i],U,2) = 'T' then
|
---|
172 | begin
|
---|
173 | lblLastTemp.Caption := ConvertVitalData(piece(strings[i],U,3), vtTemp);
|
---|
174 | lblDateTemp.Caption := FormatFMDateTime('mmm dd,yy',
|
---|
175 | StrToFloat(piece(strings[i],U,4)));
|
---|
176 | end;
|
---|
177 | if piece(strings[i],U,2) = 'P' then
|
---|
178 | begin
|
---|
179 | lblLastPulse.Caption := piece(strings[i],U,3);
|
---|
180 | lblDatePulse.Caption := FormatFMDateTime('mmm dd,yy',
|
---|
181 | StrToFloat(piece(strings[i],U,4)));
|
---|
182 | end;
|
---|
183 | if piece(strings[i],U,2) = 'R' then
|
---|
184 | begin
|
---|
185 | lblLastResp.Caption := piece(strings[i],U,3);
|
---|
186 | lblDateResp.Caption := FormatFMDateTime('mmm dd,yy',
|
---|
187 | StrToFloat(piece(strings[i],U,4)));
|
---|
188 | end;
|
---|
189 | if piece(strings[i],U,2) = 'BP' then
|
---|
190 | begin
|
---|
191 | lblLastBP.Caption := piece(strings[i],U,3);
|
---|
192 | lblDateBP.Caption := FormatFMDateTime('mmm dd,yy',
|
---|
193 | StrToFloat(piece(strings[i],U,4)));
|
---|
194 | end;
|
---|
195 | if piece(strings[i],U,2) = 'HT' then
|
---|
196 | begin
|
---|
197 | lblLastHeight.Caption := ConvertVitalData(piece(strings[i],U,3), vtHeight);
|
---|
198 | lblDateHeight.Caption := FormatFMDateTime('mmm dd,yy',
|
---|
199 | StrToFloat(piece(strings[i],U,4)));
|
---|
200 | end;
|
---|
201 | if piece(strings[i],U,2) = 'WT' then
|
---|
202 | begin
|
---|
203 | lblLastWeight.Caption := ConvertVitalData(piece(strings[i],U,3), vtWeight);
|
---|
204 | lblDateWeight.Caption := FormatFMDateTime('mmm dd,yy',
|
---|
205 | StrToFloat(piece(strings[i],U,4)));
|
---|
206 |
|
---|
207 | end;
|
---|
208 | if piece(strings[i],U,2) = 'PN' then
|
---|
209 | begin
|
---|
210 | lblLastPain.Caption := piece(strings[i],U,3);
|
---|
211 | lblDatePain.Caption := FormatFMDateTime('mmm dd,yy',
|
---|
212 | StrToFloat(piece(strings[i],U,4)));
|
---|
213 | end;
|
---|
214 | end;
|
---|
215 | end;
|
---|
216 |
|
---|
217 |
|
---|
218 | procedure TfrmEncVitals.SetVitPointer(Sender: TObject);
|
---|
219 | begin
|
---|
220 | if ActiveCtrl.tag in VitalTagSet then
|
---|
221 | begin
|
---|
222 | // move pointer to some height and five pixels to right of edit box.
|
---|
223 | lblVitPointer.Top := ActiveCtrl.Top+((ActiveCtrl.height ) div
|
---|
224 | (lblVitPointer.height ));
|
---|
225 |
|
---|
226 | if ActiveCtrl = txtMeasTemp then
|
---|
227 | lblVitPointer.left := (cboTemp.left + cboTemp.Width)
|
---|
228 | else if ActiveCtrl = txtMeasHT then
|
---|
229 | lblVitPointer.left := (cboHeight.left + cboHeight.Width)
|
---|
230 | else if ActiveCtrl = txtMeasWT then
|
---|
231 | lblVitPointer.left := (cboWeight.left + cboWeight.Width)
|
---|
232 | else
|
---|
233 | lblVitPointer.left := (ActiveCtrl.left + ActiveCtrl.Width);
|
---|
234 |
|
---|
235 | end;
|
---|
236 | end;
|
---|
237 |
|
---|
238 |
|
---|
239 | function TfrmEncVitals.GetVitHTRate: String;
|
---|
240 | begin
|
---|
241 | Result := ConvertHeight2Inches(txtMeasHT.Text);
|
---|
242 | txtMeasHT.text := result;
|
---|
243 | end;
|
---|
244 |
|
---|
245 | function TfrmEncVitals.AssignVitals: boolean;
|
---|
246 | var
|
---|
247 | TmpDate: TFMDateTime;
|
---|
248 |
|
---|
249 | begin
|
---|
250 | TmpDate := txtMeasDate.FMDateTime;
|
---|
251 | Result := ValidVitalsDate(TmpDate);
|
---|
252 | if Result then
|
---|
253 | AssignVitals2List(uVitalNew, TmpDate, FloatToStr(PCERPCEncLocation),
|
---|
254 | txtMeasBP.text, txtMeasTemp.text, cboTemp.text,
|
---|
255 | txtMeasResp.text, txtMeasPulse.text, GetVitHTRate, cboHeight.text,
|
---|
256 | txtMeasWT.text, cboWeight.text, cboPain.ItemID);
|
---|
257 | end;
|
---|
258 |
|
---|
259 | procedure TfrmEncVitals.cboTempChange(Sender: TObject);
|
---|
260 | begin
|
---|
261 | inherited;
|
---|
262 | if not (cbotemp.droppeddown) then
|
---|
263 | CheckVitalUnit;
|
---|
264 | end;
|
---|
265 |
|
---|
266 |
|
---|
267 | procedure TfrmEncVitals.CheckVitalUnit;
|
---|
268 | var
|
---|
269 | len,i: integer;
|
---|
270 | found: boolean;
|
---|
271 | comp: string; //substring for comparing
|
---|
272 | temp: string;
|
---|
273 | begin
|
---|
274 | if (UcboVitchanging = true) then exit;
|
---|
275 |
|
---|
276 | UcboVitChanging := true;
|
---|
277 | try
|
---|
278 | with ActiveCtrl as TComboBox do
|
---|
279 | begin
|
---|
280 | found := False;
|
---|
281 | temp := text;
|
---|
282 | while (found = false) and (Length(temp) > 0) do
|
---|
283 | begin
|
---|
284 | i := 0;
|
---|
285 | while (found = false) and (length(items[i]) > 0) do
|
---|
286 | begin
|
---|
287 | len := length(temp);
|
---|
288 | //match text to string
|
---|
289 | comp := copy(items[i],0,len);
|
---|
290 | if (CompareText(comp,temp) = 0) then
|
---|
291 | begin
|
---|
292 | found := true;
|
---|
293 | Text := '';
|
---|
294 | text := items[i];
|
---|
295 |
|
---|
296 | end;
|
---|
297 | inc(i);
|
---|
298 | end;
|
---|
299 | if (found = false) then Delete(temp,1,1);
|
---|
300 | end;
|
---|
301 | if (found = False) then
|
---|
302 | begin
|
---|
303 | Text := '';
|
---|
304 | end;
|
---|
305 | end;
|
---|
306 | finally
|
---|
307 | UcboVitChanging := false;
|
---|
308 | end;
|
---|
309 | end;
|
---|
310 |
|
---|
311 |
|
---|
312 | procedure TfrmEncVitals.cboHeightChange(Sender: TObject);
|
---|
313 | begin
|
---|
314 | inherited;
|
---|
315 | CheckVitalUnit;
|
---|
316 | end;
|
---|
317 |
|
---|
318 | procedure TfrmEncVitals.cboWeightChange(Sender: TObject);
|
---|
319 | begin
|
---|
320 | inherited;
|
---|
321 | CheckVitalUnit;
|
---|
322 | end;
|
---|
323 |
|
---|
324 | procedure TfrmEncVitals.txtMeasBPExit(Sender: TObject);
|
---|
325 | begin
|
---|
326 | inherited;
|
---|
327 | if VitalInvalid(txtMeasBP) then
|
---|
328 | ChangeFocus(txtMeasBP);
|
---|
329 | end;
|
---|
330 |
|
---|
331 | procedure TfrmEncVitals.cboTempExit(Sender: TObject);
|
---|
332 | begin
|
---|
333 | inherited;
|
---|
334 | if(ActiveCtrl <> txtMeasTemp) then
|
---|
335 | begin
|
---|
336 | if VitalInvalid(txtMeasTemp, cboTemp) then
|
---|
337 | ChangeFocus(txtMeasTemp);
|
---|
338 | end;
|
---|
339 | end;
|
---|
340 |
|
---|
341 | procedure TfrmEncVitals.txtMeasRespExit(Sender: TObject);
|
---|
342 | begin
|
---|
343 | inherited;
|
---|
344 | if VitalInvalid(txtMeasResp) then
|
---|
345 | ChangeFocus(txtMeasResp);
|
---|
346 | end;
|
---|
347 |
|
---|
348 | procedure TfrmEncVitals.txtMeasPulseExit(Sender: TObject);
|
---|
349 | begin
|
---|
350 | inherited;
|
---|
351 | if VitalInvalid(txtMeasPulse) then
|
---|
352 | ChangeFocus(txtMeasPulse);
|
---|
353 | end;
|
---|
354 |
|
---|
355 | procedure TfrmEncVitals.cboHeightExit(Sender: TObject);
|
---|
356 | begin
|
---|
357 | inherited;
|
---|
358 | if(ActiveCtrl <> txtMeasHt) then
|
---|
359 | begin
|
---|
360 | if VitalInvalid(txtMeasHt, cboHeight, GetVitHTRate) then
|
---|
361 | ChangeFocus(txtMeasHt);
|
---|
362 | end;
|
---|
363 | end;
|
---|
364 |
|
---|
365 | procedure TfrmEncVitals.cboWeightExit(Sender: TObject);
|
---|
366 | begin
|
---|
367 | inherited;
|
---|
368 | if(ActiveCtrl <> txtMeasWt) then
|
---|
369 | begin
|
---|
370 | if VitalInvalid(txtMeasWt, cboWeight) then
|
---|
371 | ChangeFocus(txtMeasWt);
|
---|
372 | end;
|
---|
373 | end;
|
---|
374 |
|
---|
375 | procedure TfrmEncVitals.FormCreate(Sender: TObject);
|
---|
376 |
|
---|
377 | begin
|
---|
378 | inherited;
|
---|
379 | FTabName := CT_VitNm;
|
---|
380 | //uVisitType := TPCEProc.create;
|
---|
381 | uVitalOld := TStringList.create;
|
---|
382 | uVitalNew := TStringList.create;
|
---|
383 |
|
---|
384 | end;
|
---|
385 |
|
---|
386 |
|
---|
387 |
|
---|
388 | procedure TfrmEncVitals.FormDestroy(Sender: TObject);
|
---|
389 |
|
---|
390 | begin
|
---|
391 | inherited;
|
---|
392 | //uVisitType.Free;
|
---|
393 | uVitalOld.Free;
|
---|
394 | uVitalNew.free;
|
---|
395 | end;
|
---|
396 |
|
---|
397 |
|
---|
398 |
|
---|
399 |
|
---|
400 | procedure TfrmEncVitals.lbllastClick(Sender: TObject);
|
---|
401 | begin
|
---|
402 | inherited;
|
---|
403 | //
|
---|
404 | try
|
---|
405 | frmEncVitals.Show;
|
---|
406 | except
|
---|
407 | with sender as TStaticText do
|
---|
408 | SelectVital(self.Font.Size, tag);
|
---|
409 | end; //end of try
|
---|
410 | end;
|
---|
411 |
|
---|
412 |
|
---|
413 | procedure TfrmEncVitals.FormShow(Sender: TObject);
|
---|
414 | begin
|
---|
415 | inherited;
|
---|
416 | // frmEncVitals.caption := 'Vital entry for - '+ patient.name; {RAB 6/15/98}
|
---|
417 | FormActivate(Sender);
|
---|
418 | end;
|
---|
419 |
|
---|
420 | procedure TfrmEncVitals.FormActivate(Sender: TObject);
|
---|
421 | begin
|
---|
422 | inherited;
|
---|
423 | if(not FChangingFocus) and (not FDataLoaded) then
|
---|
424 | begin
|
---|
425 | FDataLoaded := TRUE;
|
---|
426 | InitVitalPanel;
|
---|
427 | // txtMeasTemp.setfocus; //added 3/30/99 after changing tab order.
|
---|
428 | //The date is now first in tab order, but it shouldn't default there.
|
---|
429 | end;
|
---|
430 | end;
|
---|
431 |
|
---|
432 |
|
---|
433 |
|
---|
434 | procedure TfrmEncVitals.cboPainChange(Sender: TObject);
|
---|
435 | begin
|
---|
436 | inherited;
|
---|
437 | CheckVitalUnit;
|
---|
438 | end;
|
---|
439 |
|
---|
440 | procedure TfrmEncVitals.FormResize(Sender: TObject);
|
---|
441 | begin
|
---|
442 | inherited;
|
---|
443 | //added to make things austo size that do not heave the property.
|
---|
444 | cboTemp.height := txtmeastemp.height;
|
---|
445 | cboPain.height := txtmeastemp.height;
|
---|
446 | cboheight.height := txtmeastemp.height;
|
---|
447 | cboweight.height := txtmeastemp.height;
|
---|
448 | end;
|
---|
449 |
|
---|
450 | procedure TfrmEncVitals.txtMeasTempExit(Sender: TObject);
|
---|
451 | begin
|
---|
452 | inherited;
|
---|
453 | if(ActiveCtrl <> cboTemp) then
|
---|
454 | begin
|
---|
455 | if VitalInvalid(txtMeasTemp, cboTemp) then
|
---|
456 | ChangeFocus(txtMeasTemp);
|
---|
457 | end;
|
---|
458 | end;
|
---|
459 |
|
---|
460 | procedure TfrmEncVitals.txtMeasHtExit(Sender: TObject);
|
---|
461 | begin
|
---|
462 | inherited;
|
---|
463 | if(ActiveCtrl <> cboHeight) then
|
---|
464 | begin
|
---|
465 | if VitalInvalid(txtMeasHt, cboHeight, GetVitHTRate) then
|
---|
466 | ChangeFocus(txtMeasHt);
|
---|
467 | end;
|
---|
468 | end;
|
---|
469 |
|
---|
470 | procedure TfrmEncVitals.txtMeasWtExit(Sender: TObject);
|
---|
471 | begin
|
---|
472 | inherited;
|
---|
473 | if(ActiveCtrl <> cboWeight) then
|
---|
474 | begin
|
---|
475 | if VitalInvalid(txtMeasWt, cboWeight) then
|
---|
476 | ChangeFocus(txtMeasWt);
|
---|
477 | end;
|
---|
478 | end;
|
---|
479 |
|
---|
480 | procedure TfrmEncVitals.ChangeFocus(Control: TWinControl);
|
---|
481 | begin
|
---|
482 | FChangingFocus := TRUE;
|
---|
483 | try
|
---|
484 | Control.SetFocus;
|
---|
485 | finally
|
---|
486 | FChangingFocus := FALSE;
|
---|
487 | end;
|
---|
488 | end;
|
---|
489 |
|
---|
490 | function TfrmEncVitals.OK2SaveVitals: boolean;
|
---|
491 | begin
|
---|
492 | Result := TRUE;
|
---|
493 | if(HasData and (abs(txtMeasDate.FMDateTime) <= 0.0000000000001)) then
|
---|
494 | begin
|
---|
495 | Result := (InfoBox(TX_VDATE_REQ1 + FormatFMDateTime('mmm dd,yy@hh:nn', uEncPCEData.DateTime) +
|
---|
496 | TX_VDATE_REQ2, TC_VDATE_REQ, MB_YESNO or MB_ICONWARNING) = IDYES);
|
---|
497 | if Result then
|
---|
498 | txtMeasDate.FMDateTime := uEncPCEData.DateTime
|
---|
499 | else
|
---|
500 | begin
|
---|
501 | Result := (InfoBox(TX_KILLDATA, TC_VDATE_REQ, MB_YESNO or MB_ICONWARNING) = IDYES);
|
---|
502 | if(Result) then
|
---|
503 | ClearData;
|
---|
504 | end;
|
---|
505 | end;
|
---|
506 | end;
|
---|
507 |
|
---|
508 | procedure TfrmEncVitals.ClearData;
|
---|
509 | begin
|
---|
510 | txtMeasBP.text := '';
|
---|
511 | txtMeasTemp.text := '';
|
---|
512 | txtMeasResp.text := '';
|
---|
513 | txtMeasPulse.text := '';
|
---|
514 | txtMeasHt.text := '';
|
---|
515 | txtMeasWt.text := '';
|
---|
516 | cboPain.text := '';
|
---|
517 | end;
|
---|
518 |
|
---|
519 | procedure TfrmEncVitals.FormKeyDown(Sender: TObject; var Key: Word;
|
---|
520 | Shift: TShiftState);
|
---|
521 | begin
|
---|
522 | {capture return key press if on the vital screen}
|
---|
523 | begin
|
---|
524 | inherited;
|
---|
525 | if (ActiveCtrl.tag in VitalDateTagSet)then
|
---|
526 | begin
|
---|
527 | if Key = VK_RETURN then
|
---|
528 | begin
|
---|
529 | Key := 0;
|
---|
530 | if (ActiveCtrl.Tag = TAG_VITPAIN) then
|
---|
531 | ChangeFocus(btnOK)
|
---|
532 | else
|
---|
533 | begin
|
---|
534 | GetParentForm(Self).Perform(WM_NEXTDLGCTL,0,0);
|
---|
535 | SetVitPointer(Sender);
|
---|
536 | end;
|
---|
537 | end;
|
---|
538 | end;
|
---|
539 | end;
|
---|
540 | end;
|
---|
541 |
|
---|
542 | end.
|
---|