Function

TEncounter.GetICDVersion

Module

uCore

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public

Owner

TEncounter

Declaration

function GetICDVersion: String;

Calls Hierarchy


TEncounter.GetICDVersion
 └FMNow

Called-By Hierarchy


                  TEncounter.GetICDVersion
                TfrmPCELex.SetICDVersion┤ 
                         LexiconLookup┘ │ 
  TfrmBALocalDiagnoses.btnOtherClick┤   │ 
      TfrmEditCslt.cmdLexSearchClick┤   │ 
            TfrmEditCslt.ValidSave┘ │   │ 
          TfrmEditCslt.FormClose┤   │   │ 
     TfrmEditCslt.cmdAcceptClick┘   │   │ 
      TfrmEditProc.cmdLexSearchClick┤   │ 
            TfrmEditProc.ValidSave┘ │   │ 
          TfrmEditProc.FormClose┤   │   │ 
     TfrmEditProc.cmdAcceptClick┘   │   │ 
        TfrmODProc.cmdLexSearchClick┤   │ 
        TfrmODCslt.cmdLexSearchClick┤   │ 
TfrmBAOptionsDiagnoses.btnOtherClick┤   │ 
       TfrmPCEBaseMain.btnOtherClick┤   │ 
  TfrmDiagnoses.lbxSectionClickCheck┤   │ 
          TfrmDiagnoses.GetSCTforICD┘   │ 
  TfrmDiagnoses.ckbDiagProbClicked┘     │ 
              TfrmdlgProb.SetDefaultProb┤ 
                  TfrmdlgProb.FormShow┘ │ 
                 TfrmPLLex.SetICDVersion┘ 
                  TfrmPLLex.FormCreate┘   

Calls

Name Declaration Comments
FMNow function FMNow: TFMDateTime; -

Called-By

Name Declaration Comments
TfrmdlgProb.SetDefaultProb procedure SetDefaultProb(Alist:TstringList;prob:string); -
TfrmPCELex.SetICDVersion procedure SetICDVersion; -
TfrmPLLex.SetICDVersion procedure SetICDVersion(ADate: TFMDateTime = 0); -


Source

945   function TEncounter.GetICDVersion: String;
946   var
947     cd: TFMDateTime;  //compare date
948   begin
949     // if no Enc Dt or Historical, Hospitalization, or Daily Visit compare I-10 Impl dt with TODAY
950     if (FDateTime <= 0) or (FVisitCategory = 'E') or (FVisitCategory = 'H') then
951       cd := FMNow
952     else // otherwise compare I-10 Impl dt with Encounter date/time
953       cd := FDateTime;
954   
955     if (FICD10ImplDate > cd) then
956       Result := 'ICD^ICD-9-CM'
957     else
958       Result := '10D^ICD-10-CM';
959   end;