- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncVitals.pas
r459 r460 6 6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 7 7 fPCEBase, ORDtTm, StdCtrls, ORCtrls, ExtCtrls, Buttons, fAutoSz, ORFn, 8 rvitals, ComCtrls; 8 rvitals, ComCtrls, ORNet, uVitals 9 , TRPCB // Vitals Lite 2004-05-21 =========================================== 10 ; 11 {== Vitals Lite 2004-05-21 ===================================================} 12 type 13 TGMV_GetInputPanel = function( 14 var anApp: TApplication; 15 aB: TRPCBroker; 16 aP, // Patient DFN 17 aL, // Hospitals IEN 18 aSig, // Application signature 19 aTemplate // Vitals Input template 20 : String; 21 aNow // Input Date/Time 22 :TDateTime):TCustomForm; 23 {== Vitals Lite 2004-05-21 ===================================================} 9 24 10 25 type … … 47 62 txtMeasPulse: TCaptionEdit; 48 63 txtMeasHt: TCaptionEdit; 64 pnlBottom: TPanel; 65 btnEnterVitals: TButton; 66 lvVitals: TCaptionListView; 49 67 procedure SetVitPointer(Sender: TObject); 50 68 procedure txtMeasBPExit(Sender: TObject); … … 71 89 procedure FormKeyDown(Sender: TObject; var Key: Word; 72 90 Shift: TShiftState); 91 procedure btnEnterVitalsClick(Sender: TObject); //vitals lite 73 92 private 74 93 FDataLoaded: boolean; … … 82 101 procedure ChangeFocus(Control: TWinControl); 83 102 procedure ClearData; 103 procedure LoadVitalView(VitalsList : TStringList); //Vitals Lite 104 procedure LoadVitalsList; 84 105 public 85 106 function OK2SaveVitals: boolean; … … 97 118 98 119 uses UCore, rCore, rPCE, fPCELex, fPCEOther, fVitals,fVisit, fFrame, fEncnt, 99 uVitals, fEncounterFrame; 120 fEncounterFrame, uInit 121 // , fGMV_InputTemp // Vitals Lite 2004-05-21 122 ; 100 123 101 124 const … … 373 396 end; 374 397 398 375 399 procedure TfrmEncVitals.FormCreate(Sender: TObject); 376 377 begin 400 begin 401 378 402 inherited; 379 403 FTabName := CT_VitNm; … … 389 413 390 414 begin 391 inherited;392 415 //uVisitType.Free; 393 416 uVitalOld.Free; 394 417 uVitalNew.free; 418 419 {== Vitals Lite 2004-05-21 ===================================================} 420 FreeLibrary(VitalsDLLHandle); 421 {== Vitals Lite 2004-05-21 ===================================================} 422 inherited; 395 423 end; 396 424 … … 412 440 413 441 procedure TfrmEncVitals.FormShow(Sender: TObject); 414 begin 415 inherited; 442 var 443 GMV_LibName: String; 444 begin 445 inherited; 446 //Begin Vitals Lite 447 {Visit is Assumed to Be selected when Opening Encounter Dialog} 448 GMV_LibName :='GMV_VitalsViewEnter.dll'; 449 GMV_LibName := GetProgramFilesPath + SHARE_DIR + GMV_LibName; 450 VitalsDLLHandle := LoadLibrary(PChar(GMV_LibName)); 451 if VitalsDLLHandle = 0 then // No Handle found 452 MessageDLG('Can''t find library "'+GMV_LibName+'".',mtError,[mbok],0) 453 else 454 LoadVitalsList; 455 //End Vitals Lite 416 456 // frmEncVitals.caption := 'Vital entry for - '+ patient.name; {RAB 6/15/98} 417 457 FormActivate(Sender); … … 540 580 end; 541 581 582 //Begin Vitals Lite 583 procedure TfrmEncVitals.LoadVitalView(VitalsList: TStringList); 584 var 585 i : integer; 586 curCol : TListColumn; 587 curItem : TListItem; 588 HeadingList,tmpList : TStringList; 589 begin 590 HeadingList := TStringList.Create; 591 tmpList := TStringList.Create; 592 lvVitals.ShowColumnHeaders := false; //CQ: 10069 - the column display becomes squished. 593 lvVitals.Items.Clear; 594 lvVitals.Columns.Clear; 595 PiecesToList(VitalsList[0],U,HeadingList); 596 for i := 0 to HeadingList.Count-1 do 597 begin 598 curCol := lvVitals.Columns.Add; 599 curCol.Caption := HeadingList[i]; 600 curCol.AutoSize := true; 601 end; 602 for i := 1 to VitalsList.Count-1 do 603 begin 604 curItem := lvVitals.Items.Add; 605 PiecesToList(VitalsList[i],U,tmpList); 606 curItem.Caption := tmpList[0]; 607 tmpList.Delete(0); 608 curItem.SubItems.Assign(tmpList); 609 end; 610 lvVitals.ShowColumnHeaders := true; //CQ: 10069 - the column display becomes squished. 611 HeadingList.Free; 612 tmpList.Free; 613 end; 614 615 procedure TfrmEncVitals.btnEnterVitalsClick(Sender: TObject); 616 var 617 VLPtVitals : TGMV_VitalsEnterDLG; 618 GMV_FName : String; 619 begin 620 inherited; 621 if VitalsDLLHandle = 0 then Exit;//The DLL was initialized on Create, but just in case.... 622 GMV_FName := 'GMV_VitalsEnterDLG'; 623 @VLPtVitals := GetProcAddress(VitalsDLLHandle,PChar(GMV_FName)); 624 if assigned(VLPtVitals) then 625 begin 626 VLPtVitals( 627 RPCBrokerV, 628 Patient.DFN, 629 FloatToStr(uEncPCEData.Location), 630 GMV_DEFAULT_TEMPLATE, 631 GMV_APP_SIGNATURE, 632 FMDateTimeToDateTime(uEncPCEData.DateTime), 633 Patient.Name, 634 frmFrame.lblPtSSN.Caption + ' ' + frmFrame.lblPtAge.Caption 635 ); 636 end 637 else 638 MessageDLG('Can not find function "'+GMV_FName+'".',mtError,[mbok],0); 639 @VLPtVitals := nil; 640 LoadVitalsList; 641 end; 642 643 procedure TfrmEncVitals.LoadVitalsList; 644 var 645 VitalsList : TStringList; 646 VLPtVitals : TGMV_LatestVitalsList; 647 GMV_FName : String; 648 begin 649 if VitalsDLLHandle = 0 then Exit;//The DLL was initialized on Create, but just in case.... 650 GMV_FName := 'GMV_LatestVitalsList'; 651 @VLPtVitals := GetProcAddress(VitalsDLLHandle,PChar(GMV_FName)); 652 if assigned(VLPtVitals) then 653 begin 654 frmFrame.VitalsDLLActive := True; // need this flag for CCOW (RV) 655 VitalsList := VLPtVitals(RPCBrokerV,Patient.DFN,U,false); 656 if assigned(VitalsList) then 657 LoadVitalView(VitalsList); 658 end 659 else 660 MessageDLG('Can''t find function "'+GMV_FName+'".',mtError,[mbok],0); 661 @VLPtVitals := nil; 662 frmFrame.VitalsDLLActive := False; // need this flag for CCOW (RV) 663 end; 664 //End Vitals Lite 665 542 666 end.
Note:
See TracChangeset
for help on using the changeset viewer.