Procedure

TfrmBALocalDiagnoses.btnOtherClick

Module

fBALocalDiagnoses

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public/Published

Owner

TfrmBALocalDiagnoses

Declaration

procedure btnOtherClick(Sender: TObject);

Calls Hierarchy


TfrmBALocalDiagnoses.btnOtherClick
 ├LexiconLookup
 │ ├TfrmBase508Form.Create
 │ │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ │ ├UnfocusableControlEnter
 │ │ └AdjustControls
 │ │   ├TfrmBase508Form.ModifyUnfocusableControl
 │ │   └..(rec)..
 │ ├TEncounter.GetVisitCategory
 │ ├TfrmPCELex.ParseNarrCode
 │ ├TfrmPCELex.SetApp
 │ ├TfrmPCELex.SetDate
 │ └TfrmPCELex.SetICDVersion
 │   └TEncounter.GetICDVersion
 │     └FMNow
 ├TfrmBALocalDiagnoses.IsDxAlreadySelected
 ├IsICD9CodeActive
 ├TfrmBALocalDiagnoses.DiagnosisSelection
 │ └TfrmBALocalDiagnoses.DeselectGridItems
 └TfrmBALocalDiagnoses.SetAddToCheckBoxStatus
   ├TfrmBALocalDiagnoses.ClearAndDisableCBoxes
   ├TfrmBALocalDiagnoses.ProblemListDxFound
   └TfrmBALocalDiagnoses.PersonalListDxFound

Calls

Name Declaration Comments
TfrmBALocalDiagnoses.DiagnosisSelection procedure DiagnosisSelection(SelectedDx: String); -
TfrmBALocalDiagnoses.IsDxAlreadySelected function IsDxAlreadySelected(SelectedDx: string):boolean; -
IsICD9CodeActive function IsICD9CodeActive(ACode: string; LexApp: string; ADate:TFMDateTime = 0): boolean; -
LexiconLookup procedure LexiconLookup(var Code: string; ALexApp: Integer; ADate: TFMDateTime = 0; AExtend: Boolean = False; AInputString: String = ''; AMessage: String = ''; ADefaultToInput: Boolean = False); -
TfrmBALocalDiagnoses.SetAddToCheckBoxStatus procedure SetAddToCheckBoxStatus(ADiagnosis:string); -


Source

505   procedure TfrmBALocalDiagnoses.btnOtherClick(Sender: TObject);
506   var
507     Match: string;
508     selectedDx: string;
509     i: integer;
510     lexIEN: string;
511   begin
512     lvDxGrid.ClearSelection;
513     ProvDx.Code := ''; //** init
514     lexIEN := '';
515     BAPersonalDX := True; //** returns LexIEN in piece 3
516     //** Execute LEXICON
517     LexiconLookup(Match, LX_ICD);
518     if Match = '' then Exit;
519     fOrdersSign.ProvDx.Code := Piece(Match, U, 1);
520     fOrdersSign.ProvDx.Text := Piece(Match, U, 2);
521     lexIEN := Piece(Match, U, 3);
522     i := Pos(' (ICD', fOrdersSign.ProvDx.Text);
523     if i = 0 then i := Length(ProvDx.Text) + 1;
524     if fOrdersSign.ProvDx.Text[i-1] = '*' then i := i - 2;
525     fOrdersSign.ProvDx.Text := Copy(fOrdersSign.ProvDx.Text, 1, i - 1);
526     fOrdersSign.ProvDx.Text := StringReplace(fOrdersSign.ProvDx.Text,':',' ',[rfReplaceAll]);
527     fOrdersSign.ProvDx.Code := StringReplace(fOrdersSign.ProvDx.Code,':',' ',[rfReplaceAll]);
528   
529     selectedDx := (fOrdersSign.ProvDx.Text + ':' + fOrdersSign.ProvDx.Code);
530      if strLen(PChar(lexIEN) ) > 0 then
531         lexIENHoldList.Add(fOrdersSign.ProvDx.Code + U + lexIEN);
532   
533     //** Begin CQ4819
534     if not IsDxAlreadySelected(selectedDx) then
535     begin
536        if UBACore.IsICD9CodeActive(fOrdersSign.ProvDx.Code,'ICD',0) then
537           DiagnosisSelection(selectedDx)
538        else
539           InfoBox(BA_INACTIVE_ICD9_CODE_1 + fOrdersSign.ProvDx.Code + BA_INACTIVE_ICD9_CODE_2 , BA_INACTIVE_CODE, MB_ICONWARNING or MB_OK);
540     end;
541     //** End CQ4819
542     BAPersonalDX := False;
543     SetAddToCheckBoxStatus(selectedDX);
544   
545   end;