Procedure

TfrmODCslt.SetProvDiagPromptingMode

Module

fODConsult

Last Modified

7/15/2014 3:26:34 PM

Visibility

Private

Owner

TfrmODCslt

Declaration

procedure SetProvDiagPromptingMode;

Calls Hierarchy


TfrmODCslt.SetProvDiagPromptingMode
 ├GetProvDxMode
 └TfrmODCslt.ControlChange
   ├TResponses.Update
   │ ├TResponses.FindResponseByName
   │ └TResponses.IENForPrompt
   └TResponses.GetOrderText
     ├TResponses.NextInstance
     ├TResponses.FindResponseByName
     ├TResponses.FormatResponse
     │ └TResponses.FindResponseByIEN
     └TResponses.AppendChildren
       ├TResponses.FindPromptByIEN
       ├TResponses.FindResponseByIEN
       └TResponses.FormatResponse...

Called-By Hierarchy


TfrmODCslt.SetProvDiagPromptingMode
            TfrmODCslt.InitDialog┤ 
          TfrmODCslt.FormCreate┘ │ 
           TfrmODCslt.SetupDialog┤ 
      TfrmODCslt.treServiceChange┤ 
   TfrmODCslt.treServiceKeyDown┘ │ 
      TfrmODCslt.cboServiceSelect┤ 
      TfrmODCslt.cboServiceExit┘ │ 
   TfrmODCslt.ReadServerVariables┘ 
         TfrmODCslt.SetupDialog┘   

Calls

Name Declaration Comments
TfrmODCslt.ControlChange procedure ControlChange(Sender: TObject); -
GetProvDxMode procedure GetProvDxMode(var ProvDx: TProvisionalDiagnosis; SvcIEN: string); -

Called-By

Name Declaration Comments
TfrmODCslt.cboServiceSelect procedure cboServiceSelect(Sender: TObject); -
TfrmODCslt.InitDialog procedure InitDialog; override; -
TfrmODCslt.ReadServerVariables procedure ReadServerVariables; -
TfrmODCslt.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -
TfrmODCslt.treServiceChange procedure treServiceChange(Sender: TObject; Node: TTreeNode); -


Source

1073  procedure TfrmODCslt.SetProvDiagPromptingMode;
1074  const
1075    TX_USE_LEXICON = 'You must use the "Lexicon" button to select a provisional diagnosis for this service.';
1076    TX_USE_DIAGNOSIS = 'You must use the "Diagnosis" button to select a diagnosis for this service.';
1077  
1078    TX_PROVDX_OPT  = 'Provisional Diagnosis';
1079    TX_PROVDX_REQD = 'Provisional Dx (REQUIRED)';
1080  begin
1081    if BILLING_AWARE then
1082       btnDiagnosis.Enabled    := False //1.4.18
1083    else
1084       cmdLexSearch.Enabled   := False;
1085    txtProvDiag.Enabled    := False;
1086    txtProvDiag.ReadOnly   := True;
1087    txtProvDiag.Color      := clBtnFace;
1088    txtProvDiag.Font.Color := clBtnText;
1089    txtProvDiag.Hint       := '';
1090    if cboService.ItemIEN = 0 then Exit;
1091    ProvDx.PreviousPromptMode := ProvDx.PromptMode;
1092    GetProvDxMode(ProvDx, cboService.ItemID + CSLT_PTR);
1093    //  Returns:  string  A^B
1094    //     A = O (optional), R (required) or S (suppress)
1095    //     B = F (free-text) or L (lexicon)
1096    if (ProvDx.PreviousPromptMode <> '') and (ProvDx.PromptMode <> ProvDx.PreviousPromptMode) then
1097    begin
1098      ProvDx.Code := '';
1099      ControlChange(Self);
1100    end;
1101    with ProvDx do if (Reqd = '') or (PromptMode = '') then Exit;
1102    if ProvDx.Reqd = 'R' then
1103    begin
1104      lblProvDiag.Caption := TX_PROVDX_REQD;
1105      if (BILLING_AWARE)  and (ProvDx.PromptMode[1] = '') then btnDiagnosis.Enabled := True;
1106    end
1107    else
1108      lblProvDiag.Caption := TX_PROVDX_OPT;
1109    if ProvDx.Reqd = 'S' then
1110      begin
1111        cmdLexSearch.Enabled   := False;
1112        txtProvDiag.Enabled    := False;
1113        txtProvDiag.ReadOnly   := True;
1114        txtProvDiag.Color      := clBtnFace;
1115        txtProvDiag.Font.Color := clBtnText;
1116      end
1117    else
1118      case ProvDx.PromptMode[1] of
1119        'F':  begin
1120                cmdLexSearch.Enabled   := False;
1121                txtProvDiag.Enabled    := True;
1122                txtProvDiag.ReadOnly   := False;
1123                txtProvDiag.Color      := clWindow;
1124                txtProvDiag.Font.Color := clWindowText;
1125              end;
1126        'L':  begin
1127                if BILLING_AWARE then
1128                begin
1129                   btnDiagnosis.Enabled   := True; //1.4.18
1130                   txtProvDiag.Hint       := TX_USE_DIAGNOSIS;
1131                end
1132                else
1133                begin
1134                   cmdLexSearch.Enabled   := True;
1135                   txtProvDiag.Hint       := TX_USE_LEXICON;
1136                end;
1137                txtProvDiag.Enabled    := True;
1138                txtProvDiag.ReadOnly   := True;
1139                txtProvDiag.Color      := clInfoBk;
1140                txtProvDiag.Font.Color := clInfoText;
1141             end;
1142      end;
1143  end;