Module

fEncVitals

Path

C:\CPRS\CPRS30\Encounter\fEncVitals.pas

Last Modified

7/15/2014 3:26:36 PM

Initialization Code

initialization
  SpecifyFormIsNotADialog(TfrmEncVitals);

end.

Units Used in Interface

Name Comments
fAutoSz -
fPCEBase -
rVitals -
uVitals -

Units Used in Implementation

Name Comments
fEncnt -
fEncounterFrame -
fFrame -
fPCELex -
fPCEOther -
fVisit -
fVitals -
rCore -
rPCE -
uCore -
uInit -

Classes

Name Comments
TfrmEncVitals -

Procedures

Name Owner Declaration Scope Comments
btnEnterVitalsClick TfrmEncVitals procedure btnEnterVitalsClick(Sender: TObject); Public/Published Vitals lite
cboHeightChange TfrmEncVitals procedure cboHeightChange(Sender: TObject); Public/Published -
cboHeightExit TfrmEncVitals procedure cboHeightExit(Sender: TObject); Public/Published -
cboPainChange TfrmEncVitals procedure cboPainChange(Sender: TObject); Public/Published -
cboTempChange TfrmEncVitals procedure cboTempChange(Sender: TObject); Public/Published -
cboTempExit TfrmEncVitals procedure cboTempExit(Sender: TObject); Public/Published -
cboWeightChange TfrmEncVitals procedure cboWeightChange(Sender: TObject); Public/Published -
cboWeightExit TfrmEncVitals procedure cboWeightExit(Sender: TObject); Public/Published -
ChangeFocus TfrmEncVitals procedure ChangeFocus(Control: TWinControl); Private -
CheckVitalUnit TfrmEncVitals procedure CheckVitalUnit; Private -
ClearData TfrmEncVitals procedure ClearData; Private -
FormActivate TfrmEncVitals procedure FormActivate(Sender: TObject); Public/Published -
FormCreate TfrmEncVitals procedure FormCreate(Sender: TObject); Public/Published -
FormDestroy TfrmEncVitals procedure FormDestroy(Sender: TObject); Public/Published -
FormResize TfrmEncVitals procedure FormResize(Sender: TObject); Public/Published -
FormShow TfrmEncVitals procedure FormShow(Sender: TObject); Public/Published -
InitVitalPanel TfrmEncVitals procedure InitVitalPanel; Private -
lbllastClick TfrmEncVitals procedure lbllastClick(Sender: TObject); Public/Published -
LoadVitalsList TfrmEncVitals procedure LoadVitalsList; Private -
LoadVitalView TfrmEncVitals procedure LoadVitalView(VitalsList : TStringList); Private
Vitals Lite
Begin Vitals Lite
PopulateLastVital TfrmEncVitals procedure PopulateLastVital; Private -
SetVitPointer TfrmEncVitals procedure SetVitPointer(Sender: TObject); Public/Published -
txtMeasBPExit TfrmEncVitals procedure txtMeasBPExit(Sender: TObject); Public/Published -
txtMeasHtExit TfrmEncVitals procedure txtMeasHtExit(Sender: TObject); Public/Published -
txtMeasPulseExit TfrmEncVitals procedure txtMeasPulseExit(Sender: TObject); Public/Published -
txtMeasRespExit TfrmEncVitals procedure txtMeasRespExit(Sender: TObject); Public/Published -
txtMeasTempExit TfrmEncVitals procedure txtMeasTempExit(Sender: TObject); Public/Published -
txtMeasWtExit TfrmEncVitals procedure txtMeasWtExit(Sender: TObject); Public/Published -

Functions

Name Owner Declaration Scope Comments
AssignVitals TfrmEncVitals function AssignVitals: boolean; Public/Published -
GetVitHTRate TfrmEncVitals function GetVitHTRate: String; Private -
HasData TfrmEncVitals function HasData: Boolean; Public/Published -
OK2SaveVitals TfrmEncVitals function OK2SaveVitals: boolean; Public -

Global Variables

Name Type Declaration Comments
frmEncVitals TfrmEncVitals frmEncVitals: TfrmEncVitals; -
UcboVitChanging Boolean UcboVitChanging: Boolean = False; -

Constants

Name Declaration Scope Comments
TC_VDATE_REQ 'Missing Vitals Entry Date' Global -
TX_KILLDATA 'Discard entered vitals information?' Global -
TX_VDATE_REQ1 'Entered vitals information can not be saved without a Date.' + CRLF + Global -
TX_VDATE_REQ2 '?' Global -


Module Source

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, ORNet, uVitals, VAUtils, TRPCB, VA508AccessibilityManager;
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        pnlBottom: TPanel;
50        lvVitals: TCaptionListView;
51        btnEnterVitals: TButton;
52        btnOKkludge: TButton;
53        btnCancelkludge: TButton;
54        procedure SetVitPointer(Sender: TObject);
55        procedure txtMeasBPExit(Sender: TObject);
56        procedure cboTempChange(Sender: TObject);
57        procedure cboTempExit(Sender: TObject);
58        procedure txtMeasRespExit(Sender: TObject);
59        procedure txtMeasPulseExit(Sender: TObject);
60        procedure cboHeightChange(Sender: TObject);
61        procedure cboHeightExit(Sender: TObject);
62        procedure cboWeightChange(Sender: TObject);
63        procedure cboWeightExit(Sender: TObject);
64        procedure FormCreate(Sender: TObject);
65        procedure FormDestroy(Sender: TObject);
66        procedure lbllastClick(Sender: TObject);
67        procedure FormShow(Sender: TObject);
68        procedure FormActivate(Sender: TObject);
69        function HasData: Boolean;
70        function AssignVitals: boolean;
71        procedure cboPainChange(Sender: TObject);
72        procedure FormResize(Sender: TObject);
73        procedure txtMeasTempExit(Sender: TObject);
74        procedure txtMeasHtExit(Sender: TObject);
75        procedure txtMeasWtExit(Sender: TObject);
76        procedure btnEnterVitalsClick(Sender: TObject); //vitals lite
77      private
78        FDataLoaded: boolean;
79        FChangingFocus: boolean;
80        UvitalNew: TStringList;
81        uVitalOld: TSTringList;
82        procedure InitVitalPanel;
83        procedure PopulateLastVital;
84        function GetVitHTRate: String;
85        procedure CheckVitalUnit;
86        procedure ChangeFocus(Control: TWinControl);
87        procedure ClearData;
88        procedure LoadVitalView(VitalsList : TStringList); //Vitals Lite
89        procedure LoadVitalsList;
90      public
91        function OK2SaveVitals: boolean;
92        property VitalNew: TStringList read uVitalNew;
93        property VitalOld: TStringList read uVitalOld;
94      end;
95    
96    var
97      frmEncVitals: TfrmEncVitals;
98    //  uVitalLocation: Real;
99    
100   implementation
101   
102   {$R *.DFM}
103   
104   uses uCore, rCore, rPCE, fPCELex, fPCEOther, fVitals,fVisit, fFrame, fEncnt,
105        fEncounterFrame, uInit
106     //   , fGMV_InputTemp // Vitals Lite 2004-05-21
107        , VA508AccessibilityRouter;
108   
109   const
110     TX_VDATE_REQ1 = 'Entered vitals information can not be saved without a Date.' + CRLF +
111                     'Do you wish to use the encounter date of ';
112     TX_VDATE_REQ2 = '?';
113     TC_VDATE_REQ = 'Missing Vitals Entry Date';
114   
115     TX_KILLDATA = 'Discard entered vitals information?';
116   
117   var
118     UcboVitChanging:      Boolean = False;
119   
120   function TfrmEncVitals.HasData: Boolean;
121   begin
122     result := False;
123     if ((txtMeasBP.text <> '') or (txtMeasTemp.text <> '') or (txtMeasResp.text <> '') or
124       (txtMeasPulse.text <> '') or (txtMeasHt.text <> '') or (txtMeasWt.text <> '')) or
125       (cboPain.text <>'') then
126       result := True;
127   end;
128   
129   procedure TfrmEncVitals.InitVitalPanel;
130   begin
131     lblDate.font.Style := [fsBold];
132     lblDateBP.font.Style := [fsBold];
133     lblDateTemp.font.Style := [fsBold];
134     lblDateResp.font.Style := [fsBold];
135     lblDatePulse.font.Style := [fsBold];
136     lblDateHeight.font.Style := [fsBold];
137     lblDateWeight.font.Style := [fsBold];
138     lblDatePain.font.style := [fsBold];
139     lblLstMeas.font.Style := [fsBold];
140     lblLastBP.font.Style := [fsBold];
141     lblLastTemp.font.Style := [fsBold];
142     lblLastResp.font.Style := [fsBold];
143     lblLastPulse.font.Style := [fsBold];
144     lblLastHeight.font.Style := [fsBold];
145     lblLastWeight.font.Style := [fsBold];
146     lblLastPain.font.style := [fsBold];
147     lblVital.font.Style := [fsbold];
148   
149     {Use this area to read parameter for units and set apropriately
150      after parameter is defined. in next version
151     }
152     UcboVitchanging := true; //prevents entering code in CheckVitalUnit
153   
154     try
155       InitPainCombo(cboPain);
156       cboTemp.Text := cboTemp.Items[0];
157       cboHeight.Text := cboHeight.Items[0];
158       cboWeight.Text := cboWeight.Items[0];
159     finally
160       UcboVitchanging := False; //prevents entering code in CheckVitalUnit
161     end;
162   
163     if txtMeasDate.Text = '' then
164       txtMeasDate.Text := FormatFMDateTime('mmm dd,yy@hh:nn', uEncPCEData.VisitDateTime);
165     if (UvitalOld.text = '') then
166       PopulateLastVital;
167   end;
168   
169   
170   procedure TfrmEncVitals.PopulateLastVital;
171   var
172    i: integer;
173   begin
174     GetLastVital(uVitalOld,Patient.DFN);
175     //populate labels from UVitalOld;
176     with UVitalOld do
177     for i := 0 to count-1 do
178     begin
179       if piece(strings[i],U,2) = 'T' then
180       begin
181         lblLastTemp.Caption := ConvertVitalData(piece(strings[i],U,3), vtTemp);
182         lblDateTemp.Caption := FormatFMDateTime('mmm dd,yy',
183           StrToFloat(piece(strings[i],U,4)));
184       end;
185       if piece(strings[i],U,2) = 'P' then
186       begin
187         lblLastPulse.Caption := piece(strings[i],U,3);
188         lblDatePulse.Caption := FormatFMDateTime('mmm dd,yy',
189           StrToFloat(piece(strings[i],U,4)));
190       end;
191       if piece(strings[i],U,2) = 'R' then
192       begin
193         lblLastResp.Caption := piece(strings[i],U,3);
194         lblDateResp.Caption := FormatFMDateTime('mmm dd,yy',
195           StrToFloat(piece(strings[i],U,4)));
196       end;
197       if piece(strings[i],U,2) = 'BP' then
198       begin
199         lblLastBP.Caption := piece(strings[i],U,3);
200         lblDateBP.Caption := FormatFMDateTime('mmm dd,yy',
201           StrToFloat(piece(strings[i],U,4)));
202       end;
203       if piece(strings[i],U,2) = 'HT' then
204       begin
205         lblLastHeight.Caption := ConvertVitalData(piece(strings[i],U,3), vtHeight);
206         lblDateHeight.Caption := FormatFMDateTime('mmm dd,yy',
207           StrToFloat(piece(strings[i],U,4)));
208       end;
209       if piece(strings[i],U,2) = 'WT' then
210       begin
211         lblLastWeight.Caption := ConvertVitalData(piece(strings[i],U,3), vtWeight);
212         lblDateWeight.Caption := FormatFMDateTime('mmm dd,yy',
213           StrToFloat(piece(strings[i],U,4)));
214   
215       end;
216      if piece(strings[i],U,2) = 'PN' then
217       begin
218         lblLastPain.Caption := piece(strings[i],U,3);
219         lblDatePain.Caption := FormatFMDateTime('mmm dd,yy',
220           StrToFloat(piece(strings[i],U,4)));
221       end;
222     end;
223   end;
224   
225   
226   procedure TfrmEncVitals.SetVitPointer(Sender: TObject);
227   begin
228     if ActiveCtrl.tag in VitalTagSet then
229     begin
230       // move pointer to some height and five pixels to right of edit box.
231       lblVitPointer.Top := ActiveCtrl.Top+((ActiveCtrl.height ) div
232       (lblVitPointer.height ));
233   
234       if ActiveCtrl = txtMeasTemp then
235         lblVitPointer.left := (cboTemp.left + cboTemp.Width)
236       else if ActiveCtrl = txtMeasHT then
237         lblVitPointer.left := (cboHeight.left + cboHeight.Width)
238       else if ActiveCtrl = txtMeasWT then
239         lblVitPointer.left := (cboWeight.left + cboWeight.Width)
240       else
241         lblVitPointer.left := (ActiveCtrl.left + ActiveCtrl.Width);
242   
243     end;
244   end;
245   
246   
247   function TfrmEncVitals.GetVitHTRate: String;
248   begin
249     Result := ConvertHeight2Inches(txtMeasHT.Text);
250     txtMeasHT.text := result;
251   end;
252   
253   function TfrmEncVitals.AssignVitals: boolean;
254   var
255     TmpDate: TFMDateTime;
256   
257   begin
258     TmpDate := txtMeasDate.FMDateTime;
259     Result := ValidVitalsDate(TmpDate);
260     if Result then
261       AssignVitals2List(uVitalNew, TmpDate, FloatToStr(PCERPCEncLocation),
262                          txtMeasBP.text, txtMeasTemp.text, cboTemp.text,
263                          txtMeasResp.text, txtMeasPulse.text, GetVitHTRate, cboHeight.text,
264                          txtMeasWT.text, cboWeight.text, cboPain.ItemID);
265   end;
266   
267   procedure TfrmEncVitals.cboTempChange(Sender: TObject);
268   begin
269     inherited;
270     if not (cbotemp.droppeddown) then
271       CheckVitalUnit;
272   end;
273   
274   
275   procedure TfrmEncVitals.CheckVitalUnit;
276   var
277     len,i: integer;
278     found: boolean;
279     comp: string; //substring for comparing
280     temp: string;
281   begin
282     if (UcboVitchanging = true) then exit;
283   
284     UcboVitChanging := true;
285     try
286       with ActiveCtrl as TComboBox do
287       begin
288          found := False;
289          temp := text;
290          while (found = false) and (Length(temp) > 0) do
291          begin
292             i := 0;
293             while (found = false) and (length(items[i]) > 0) do
294             begin
295             len := length(temp);
296             //match text to string
297             comp := copy(items[i],0,len);
298             if (CompareText(comp,temp) = 0) then
299             begin
300                found := true;
301                Text := '';
302                text := items[i];
303   
304             end;
305             inc(i);
306             end;
307             if (found = false) then Delete(temp,1,1);
308          end;
309          if (found = False) then
310          begin
311             Text := '';
312          end;
313       end;
314     finally
315       UcboVitChanging := false;
316     end;
317   end;
318   
319   
320   procedure TfrmEncVitals.cboHeightChange(Sender: TObject);
321   begin
322     inherited;
323     CheckVitalUnit;
324   end;
325   
326   procedure TfrmEncVitals.cboWeightChange(Sender: TObject);
327   begin
328     inherited;
329     CheckVitalUnit;
330   end;
331   
332   procedure TfrmEncVitals.txtMeasBPExit(Sender: TObject);
333   begin
334     inherited;
335     if VitalInvalid(txtMeasBP) then
336       ChangeFocus(txtMeasBP);
337   end;
338   
339   procedure TfrmEncVitals.cboTempExit(Sender: TObject);
340   begin
341     inherited;
342     if(ActiveCtrl <> txtMeasTemp) then
343     begin
344       if VitalInvalid(txtMeasTemp, cboTemp) then
345         ChangeFocus(txtMeasTemp);
346     end;
347   end;
348   
349   procedure TfrmEncVitals.txtMeasRespExit(Sender: TObject);
350   begin
351     inherited;
352     if VitalInvalid(txtMeasResp) then
353       ChangeFocus(txtMeasResp);
354   end;
355   
356   procedure TfrmEncVitals.txtMeasPulseExit(Sender: TObject);
357   begin
358     inherited;
359     if VitalInvalid(txtMeasPulse) then
360       ChangeFocus(txtMeasPulse);
361   end;
362   
363   procedure TfrmEncVitals.cboHeightExit(Sender: TObject);
364   begin
365     inherited;
366     if(ActiveCtrl <> txtMeasHt) then
367     begin
368       if VitalInvalid(txtMeasHt, cboHeight, GetVitHTRate) then
369         ChangeFocus(txtMeasHt);
370     end;
371   end;
372   
373   procedure TfrmEncVitals.cboWeightExit(Sender: TObject);
374   begin
375     inherited;
376     if(ActiveCtrl <> txtMeasWt) then
377     begin
378       if VitalInvalid(txtMeasWt, cboWeight) then
379         ChangeFocus(txtMeasWt);
380     end;
381   end;
382   
383   
384   procedure TfrmEncVitals.FormCreate(Sender: TObject);
385   begin
386   
387     inherited;
388     FTabName := CT_VitNm;
389     //uVisitType := TPCEProc.create;
390     uVitalOld  := TStringList.create;
391     uVitalNew  := TStringList.create;
392   
393   end;
394   
395   
396   
397   procedure TfrmEncVitals.FormDestroy(Sender: TObject);
398   
399   begin
400     //uVisitType.Free;
401     uVitalOld.Free;
402     uVitalNew.free;
403   
404   {== Vitals Lite 2004-05-21 ===================================================}
405     UnloadVitalsDLL;
406   {== Vitals Lite 2004-05-21 ===================================================}
407     inherited;
408   end;
409   
410   
411   
412   
413   procedure TfrmEncVitals.lbllastClick(Sender: TObject);
414   begin
415     inherited;
416     //
417     try
418       frmEncVitals.Show;
419     except
420       with sender as TStaticText do
421         SelectVital(self.Font.Size, tag);
422     end; //end of try
423   end;
424   
425   
426   procedure TfrmEncVitals.FormShow(Sender: TObject);
427   begin
428     inherited;
429     //Begin Vitals Lite
430     {Visit is Assumed to Be selected when Opening Encounter Dialog}
431     LoadVitalsDLL;
432     if VitalsDLLHandle = 0 then // No Handle found
433       MessageDLG('Can''t find library '+VitalsDLLName+'.',mtError,[mbok],0)
434     else
435       LoadVitalsList;
436     //End Vitals Lite
437   //  frmEncVitals.caption := 'Vital entry for - '+ patient.name; {RAB 6/15/98}
438     FormActivate(Sender);
439   end;
440   
441   procedure TfrmEncVitals.FormActivate(Sender: TObject);
442   begin
443     inherited;
444     if(not FChangingFocus) and (not FDataLoaded) then
445     begin
446       FDataLoaded := TRUE;
447       InitVitalPanel;
448   //    txtMeasTemp.setfocus;  //added 3/30/99 after changing tab order.
449                            //The date is now first in tab order, but it shouldn't default there.
450     end;
451   end;
452   
453   
454   
455   procedure TfrmEncVitals.cboPainChange(Sender: TObject);
456   begin
457     inherited;
458     CheckVitalUnit;
459   end;
460   
461   procedure TfrmEncVitals.FormResize(Sender: TObject);
462   begin
463     inherited;
464     //added to make things austo size that do not heave the property.
465     cboTemp.height := txtmeastemp.height;
466     cboPain.height := txtmeastemp.height;
467     cboheight.height := txtmeastemp.height;
468     cboweight.height := txtmeastemp.height;
469   end;
470   
471   procedure TfrmEncVitals.txtMeasTempExit(Sender: TObject);
472   begin
473     inherited;
474     if(ActiveCtrl <> cboTemp) then
475     begin
476       if VitalInvalid(txtMeasTemp, cboTemp) then
477         ChangeFocus(txtMeasTemp);
478     end;
479   end;
480   
481   procedure TfrmEncVitals.txtMeasHtExit(Sender: TObject);
482   begin
483     inherited;
484     if(ActiveCtrl <> cboHeight) then
485     begin
486       if VitalInvalid(txtMeasHt, cboHeight, GetVitHTRate) then
487         ChangeFocus(txtMeasHt);
488     end;
489   end;
490   
491   procedure TfrmEncVitals.txtMeasWtExit(Sender: TObject);
492   begin
493     inherited;
494     if(ActiveCtrl <> cboWeight) then
495     begin
496       if VitalInvalid(txtMeasWt, cboWeight) then
497         ChangeFocus(txtMeasWt);
498     end;
499   end;
500   
501   procedure TfrmEncVitals.ChangeFocus(Control: TWinControl);
502   begin
503     FChangingFocus := TRUE;
504     try
505       Control.SetFocus;
506     finally
507       FChangingFocus := FALSE;
508     end;
509   end;
510   
511   function TfrmEncVitals.OK2SaveVitals: boolean;
512   begin
513     Result := TRUE;
514     if(HasData and (abs(txtMeasDate.FMDateTime) <= 0.0000000000001)) then
515     begin
516       Result := (InfoBox(TX_VDATE_REQ1 + FormatFMDateTime('mmm dd,yy@hh:nn', uEncPCEData.DateTime) +
517                          TX_VDATE_REQ2, TC_VDATE_REQ, MB_YESNO or MB_ICONWARNING) = IDYES);
518       if Result then
519         txtMeasDate.FMDateTime := uEncPCEData.DateTime
520       else
521       begin
522         Result := (InfoBox(TX_KILLDATA, TC_VDATE_REQ, MB_YESNO or MB_ICONWARNING) = IDYES);
523         if(Result) then
524           ClearData;
525       end;
526     end;
527   end;
528   
529   procedure TfrmEncVitals.ClearData;
530   begin
531     txtMeasBP.text    := '';
532     txtMeasTemp.text  := '';
533     txtMeasResp.text  := '';
534     txtMeasPulse.text := '';
535     txtMeasHt.text    := '';
536     txtMeasWt.text    := '';
537     cboPain.text      := '';
538   end;
539   
540   //Begin Vitals Lite
541   procedure TfrmEncVitals.LoadVitalView(VitalsList: TStringList);
542   var
543     i : integer;
544     curCol : TListColumn;
545     curItem : TListItem;
546     HeadingList,tmpList : TStringList;
547   begin
548     HeadingList := TStringList.Create;
549     tmpList := TStringList.Create;
550     lvVitals.ShowColumnHeaders := false;                //CQ: 10069 - the column display becomes squished.
551     lvVitals.Items.Clear;
552     lvVitals.Columns.Clear;
553     PiecesToList(VitalsList[0],U,HeadingList);
554     for i := 0 to HeadingList.Count-1 do
555     begin
556       curCol := lvVitals.Columns.Add;
557       curCol.Caption := HeadingList[i];
558       curCol.AutoSize := true;
559     end;
560     for i := 1 to VitalsList.Count-1 do
561     begin
562       curItem := lvVitals.Items.Add;
563       PiecesToList(VitalsList[i],U,tmpList);
564       curItem.Caption := tmpList[0];
565       tmpList.Delete(0);
566       curItem.SubItems.Assign(tmpList);
567     end;
568     lvVitals.ShowColumnHeaders := true;                 //CQ: 10069 - the column display becomes squished.
569     HeadingList.Free;
570     tmpList.Free;
571   end;
572   
573   procedure TfrmEncVitals.btnEnterVitalsClick(Sender: TObject);
574   var
575     VLPtVitals : TGMV_VitalsEnterDLG;
576     GMV_FName : String;
577   begin
578     inherited;
579     if VitalsDLLHandle = 0 then Exit;//The DLL was initialized on Create, but just in case....
580     GMV_FName := 'GMV_VitalsEnterDLG';
581     @VLPtVitals := GetProcAddress(VitalsDLLHandle,PChar(GMV_FName));
582     if assigned(VLPtVitals) then
583     begin
584       VLPtVitals(
585         RPCBrokerV,
586         Patient.DFN,
587         FloatToStr(uEncPCEData.Location),
588         GMV_DEFAULT_TEMPLATE,
589         GMV_APP_SIGNATURE,
590         FMDateTimeToDateTime(uEncPCEData.DateTime),
591         Patient.Name,
592         frmFrame.lblPtSSN.Caption + '    ' + frmFrame.lblPtAge.Caption
593       );
594     end
595     else
596       MessageDLG('Unable to find function "'+GMV_FName+'".',mtError,[mbok],0);
597     @VLPtVitals := nil;
598     LoadVitalsList;
599   end;
600   
601   procedure TfrmEncVitals.LoadVitalsList;
602   var
603     VitalsList : TStringList;
604     VLPtVitals : TGMV_LatestVitalsList;
605     GMV_FName : String;
606   begin
607     if VitalsDLLHandle = 0 then Exit;//The DLL was initialized on Create, but just in case....
608     GMV_FName := 'GMV_LatestVitalsList';
609     @VLPtVitals := GetProcAddress(VitalsDLLHandle,PChar(GMV_FName));
610     if assigned(VLPtVitals) then
611     begin
612       VitalsList := VLPtVitals(RPCBrokerV,Patient.DFN,U,false);
613       if assigned(VitalsList) then
614         LoadVitalView(VitalsList);
615     end
616     else
617       MessageDLG('Can''t find function "'+GMV_FName+'".',mtError,[mbok],0);
618     @VLPtVitals := nil;
619   end;
620   //End Vitals Lite
621   
622   initialization
623     SpecifyFormIsNotADialog(TfrmEncVitals);
624   
625   end.

Module Calls (2 levels)


fEncVitals
 ├fPCEBase
 │ ├uConst
 │ ├fAutoSz
 │ ├fBase508Form
 │ └fEncounterFrame
 ├fAutoSz...
 ├rVitals
 ├uVitals
 │ ├uCore
 │ ├rCore
 │ ├rVitals
 │ └fVitalsDate
 ├uCore...
 ├rPCE
 │ ├uPCE
 │ ├UBACore
 │ ├rCore...
 │ ├uCore...
 │ ├uConst
 │ ├fEncounterFrame...
 │ ├UBAGlobals
 │ └UBAConst
 ├fVitals
 │ ├fBase508Form...
 │ ├uVitals...
 │ ├uCore...
 │ ├rCore...
 │ ├fvit
 │ ├fFrame
 │ ├fEncnt
 │ ├fRptBox
 │ └rReports
 ├fFrame...
 └fEncounterFrame...

Module Called-By (2 levels)


       fEncVitals
fEncounterFrame┘ 
         uPCE┤   
         rPCE┤   
     fPCEBase┤   
   fVisitType┤   
   fDiagnoses┤   
 fPCEBaseMain┤   
   fProcedure┤   
    fPCEOther┤   
fImmunization┤   
    fSkinTest┤   
   fPatientEd┤   
fHealthFactor┤   
        fExam┤   
fEncVitals...┤   
       fNotes┤   
    fConsults┤   
      fDCSumm┤   
     fSurgery┤   
         fGAF┤   
     fPCEEdit┤   
    fHFSearch┘