Procedure

TfrmEncounterFrame.SendData

Module

fEncounterFrame

Last Modified

7/15/2014 3:26:36 PM

Comments

//Name: procedure TfrmEncounterFrame.SendData;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Send Data back to the M side sor storing.
///////////////////////////////////////////////////////////////////////////////

send PCE data to the RPC

Visibility

Private

Owner

TfrmEncounterFrame

Declaration

procedure SendData;

Calls Hierarchy


TfrmEncounterFrame.SendData
 ├TfrmEncounterFrame.FormListContains
 ├TfrmEncVitals.HasData
 ├TfrmEncVitals.AssignVitals
 │ ├ValidVitalsDate
 │ │ ├FMNow
 │ │ └TfrmBase508Form.Create
 │ │   ├TfrmBase508Form.UpdateAccessibilityActions
 │ │   ├UnfocusableControlEnter
 │ │   └AdjustControls
 │ │     ├TfrmBase508Form.ModifyUnfocusableControl
 │ │     └..(rec)..
 │ ├AssignVitals2List
 │ │ ├GetVitalUser
 │ │ └AddVital
 │ │   └GetVitalStr
 │ │     └ConvertVital
 │ ├PCERPCEncLocation
 │ └TfrmEncVitals.GetVitHTRate
 │   └ConvertHeight2Inches
 ├ValAndStoreVitals
 ├TfrmGAF.GetGAFScore
 │ ├TfrmGAF.BADData
 │ │ ├ValidateGAFDate
 │ │ │ ├TPatient.GetDateDied
 │ │ │ │ └DateOfDeath
 │ │ │ └FMToday
 │ │ │   └FMNow
 │ │ ├TPCEProviderList.PCEProvider
 │ │ │ ├Check
 │ │ │ │ └TPCEProviderList.IndexOfProvider
 │ │ │ └TPCEProviderList.PrimaryIEN
 │ │ │   └TPCEProviderList.GetPrimaryIdx
 │ │ └TPCEProviderList.PCEProviderName
 │ │   ├TPCEProviderList.PCEProvider...
 │ │   └ExternalName
 │ └ValidGAFData
 │   └TPatient.GetDateDied...
 ├SaveGAFScore
 │ └GAFOK
 ├TfrmEncounterFrame.UpdateEncounter
 │ ├TfrmEncounterFrame.FormListContains
 │ ├TPCEData.SetVisitType
 │ │ ├TPCEItem.Match
 │ │ └TPCEProc.Assign
 │ │   └TPCEItem.Assign
 │ │     └TPCEItem.SetComment
 │ ├TfraVisitRelated.GetRelated
 │ │ ├TPCEData.SetSCRelated
 │ │ ├TfraVisitRelated.GetCheckState
 │ │ ├TPCEData.SetAORelated
 │ │ ├TPCEData.SetIRRelated
 │ │ ├TPCEData.SetECRelated
 │ │ ├TPCEData.SetMSTRelated
 │ │ ├TPCEData.SetHNCRelated
 │ │ ├TPCEData.SetCVRelated
 │ │ └TPCEData.SetSHADRelated
 │ ├TPCEProviderList.Merge
 │ │ ├TPCEProviderList.IndexOfProvider
 │ │ └TPCEProviderList.Add
 │ │   ├TPCEProviderList.GetPrimaryIdx
 │ │   ├TPCEProviderList.IndexOfProvider
 │ │   └TPCEProviderList.SetPrimaryIdx
 │ │     ├TPCEProviderList.GetPrimaryIdx
 │ │     └TPCEProviderList.SetPrimary
 │ ├TPCEData.SetDiagnoses
 │ │ ├TPCEData.MarkDeletions
 │ │ │ ├TPCEItem.Match
 │ │ │ └TPCEItem.MatchProvider
 │ │ ├TPCEData.MatchItem
 │ │ │ ├TPCEItem.Match
 │ │ │ └TPCEItem.MatchProvider
 │ │ ├TPCEItem.SetComment
 │ │ └TPCEDiag.Assign
 │ │   └TPCEItem.Assign...
 │ ├TPCEData.SetProcedures
 │ │ ├TPCEData.MarkDeletions...
 │ │ ├TPCEData.MatchItem...
 │ │ ├TPCEProc.Assign...
 │ │ └TPCEItem.SetComment
 │ ├TPCEData.SetImmunizations
 │ │ ├TPCEData.MarkDeletions...
 │ │ ├TPCEData.MatchItem...
 │ │ ├TPCEItem.SetComment
 │ │ └TPCEImm.Assign
 │ │   └TPCEItem.Assign...
 │ ├TPCEData.SetSkinTests
 │ │ ├TPCEData.MarkDeletions...
 │ │ ├TPCEData.MatchItem...
 │ │ ├TPCEItem.SetComment
 │ │ └TPCESkin.Assign
 │ │   └TPCEItem.Assign...
 │ ├TPCEData.SetPatientEds
 │ │ ├TPCEData.MarkDeletions...
 │ │ ├TPCEData.MatchItem...
 │ │ ├TPCEItem.SetComment
 │ │ └TPCEPat.Assign
 │ │   └TPCEItem.Assign...
 │ ├TPCEData.SetHealthFactors
 │ │ ├TPCEData.MarkDeletions...
 │ │ ├TPCEData.MatchItem...
 │ │ ├TPCEItem.SetComment
 │ │ └TPCEHealth.Assign
 │ │   └TPCEItem.Assign...
 │ └TPCEData.SetExams
 │   ├TPCEData.MarkDeletions...
 │   ├TPCEData.MatchItem...
 │   ├TPCEItem.SetComment
 │   └TPCEExams.Assign
 │     └TPCEItem.Assign...
 └TPCEData.Save
   ├TPCEData.IsSecondaryVisit
   ├GetLocSecondaryVisitCode
   ├GetVisitIEN
   ├TPCEDiag.DelimitedStr2
   ├TPCEProviderList.PCEProvider...
   ├TPCEDiag.DelimitedStr
   ├TPCEProc.DelimitedStr
   │ └ModifierCode
   │   └ModifierIdx
   │     ├TPCEData.VisitDateTime
   │     │ └TPCEData.IsSecondaryVisit
   │     ├FMToday...
   │     └MixedCaseModifier
   ├TPCEItem.DelimitedStr2
   ├TPCEImm.DelimitedStr
   ├TPCESkin.DelimitedStr
   ├TPCEPat.DelimitedStr
   ├TPCEHealth.DelimitedStr
   ├TPCEExams.DelimitedStr
   ├SavePCEData
   ├TPCEProviderList.GetProviderData
   ├TPCEProviderList.Delete
   ├TPCEProc.Clear
   │ └TPCEItem.Clear
   │   └TPCEItem.SetComment
   ├TPCEData.StrVisitType
   │ ├GetPCEDataText
   │ │ └GetDiagnosisText
   │ ├TPCEProc.ModText
   │ │ └ModifierName
   │ │   └ModifierIdx...
   │ └TPCEData.StrVisitType
   │   └AddTxt
   ├TChanges.Add
   │ └TChangeItem.Create
   ├TPCEData.StrProcedures
   │ ├GetPCEDataText...
   │ └TPCEProc.ModText...
   ├TPCEData.StrDiagnoses
   │ └GetPCEDataText...
   ├TPCEData.StrImmunizations
   │ └GetPCEDataText...
   ├TPCEData.StrSkinTests
   │ └GetPCEDataText...
   ├TPCEData.StrPatientEds
   │ └GetPCEDataText...
   ├TPCEData.StrHealthFactors
   │ └GetPCEDataText...
   └TPCEData.StrExams
     └GetPCEDataText...

Called-By Hierarchy


        TfrmEncounterFrame.SendData
TfrmEncounterFrame.FormCloseQuery┘ 

Calls

Name Declaration Comments
TfrmEncVitals.AssignVitals function AssignVitals: boolean; -
TfrmEncounterFrame.FormListContains function FormListContains(item: string): Boolean; -
TfrmGAF.GetGAFScore procedure GetGAFScore(var Score: integer; var Date: TFMDateTime; var Staff: Int64); -
TfrmEncVitals.HasData function HasData: Boolean; -
TPCEData.Save procedure Save; -
SaveGAFScore function SaveGAFScore(const Score: integer; GAFDate: TFMDateTime; Staff: Int64): boolean; -
TfrmEncounterFrame.UpdateEncounter procedure UpdateEncounter(PCE: TPCEData); -
ValAndStoreVitals function ValAndStoreVitals(VitalList: TStringList):string; -

Called-By

Name Declaration Comments
TfrmEncounterFrame.FormCloseQuery procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); -


Source

566   procedure TfrmEncounterFrame.SendData;
567   //send PCE data to the RPC
568   var
569     StoreMessage: string;
570     GAFScore: integer;
571     GAFDate: TFMDateTime;
572     GAFStaff: Int64;
573   
574   begin
575     inherited;
576     // do validation for vitals & anything else here
577   
578     //process vitals
579     if FormListContains(CT_VitNm) then
580     begin
581       with frmEncVitals do
582       if HasData then
583       begin
584         if AssignVitals then
585         begin
586           StoreMessage := ValAndStoreVitals(frmEncVitals.VitalNew);
587           if (Storemessage <> 'True') then
588           begin
589             ShowMsg(storemessage);
590   //        exit;
591           end;
592         end;
593       end;
594     end;
595   
596     if(FormListContains(CT_GAFNm)) then
597     begin
598       frmGAF.GetGAFScore(GAFScore, GAFDate, GAFStaff);
599       if(GAFScore > 0) then
600         SaveGAFScore(GAFScore, GAFDate, GAFStaff);
601     end;
602   
603     //PCE
604   
605     UpdateEncounter(uEncPCEData);
606     with uEncPCEData do
607     begin
608       if FAutoSave then
609         Save
610       else
611         FSaveNeeded := TRUE;
612     end;
613     Close;
614   end;