Procedure

TfrmODProc.SetProvDiagPromptingMode

Module

fODProc

Last Modified

7/15/2014 3:26:34 PM

Visibility

Private

Owner

TfrmODProc

Declaration

procedure SetProvDiagPromptingMode;

Calls Hierarchy


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

Called-By Hierarchy


TfrmODProc.SetProvDiagPromptingMode
            TfrmODProc.InitDialog┤ 
          TfrmODProc.FormCreate┤ │ 
       TfrmODProc.cboProcSelect┘ │ 
           TfrmODProc.SetupDialog┤ 
         TfrmODProc.cboProcSelect┤ 
   TfrmODProc.ReadServerVariables┘ 
          TfrmODProc.FormCreate┤   
         TfrmODProc.SetupDialog┘   

Calls

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

Called-By

Name Declaration Comments
TfrmODProc.cboProcSelect procedure cboProcSelect(Sender: TObject); -
TfrmODProc.InitDialog procedure InitDialog; override; -
TfrmODProc.ReadServerVariables procedure ReadServerVariables; -
TfrmODProc.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -


Source

584   procedure TfrmODProc.SetProvDiagPromptingMode;
585   const
586     TX_USE_LEXICON = 'You must use the "Lexicon" button to select a provisional diagnosis for this service.';
587     TX_PROVDX_OPT  = 'Provisional Diagnosis';
588     TX_PROVDX_REQD = 'Provisional Dx (REQUIRED)';
589   begin
590     cmdLexSearch.Enabled   := False;
591     txtProvDiag.Enabled    := False;
592     txtProvDiag.ReadOnly   := True;
593     txtProvDiag.Color      := clBtnFace;
594     txtProvDiag.Font.Color := clBtnText;
595     lblProvDiag.Enabled    := False;
596     txtProvDiag.Hint       := '';
597     if cboProc.ItemIEN = 0 then Exit;
598     ProvDx.PreviousPromptMode := ProvDx.PromptMode;
599     //GetProvDxMode(ProvDx, cboService.ItemID);
600     GetProvDxMode(ProvDx, Piece(cboProc.Items[cboProc.ItemIndex], U, 4));
601     //  Returns:  string  A^B
602     //     A = O (optional), R (required) or S (suppress)
603     //     B = F (free-text) or L (lexicon)
604     if (ProvDx.PreviousPromptMode <> '') and (ProvDx.PromptMode <> ProvDx.PreviousPromptMode) then
605      begin
606        ProvDx.Code := '';
607        ControlChange(Self);
608      end;
609     with ProvDx do if (Reqd = '') or (PromptMode = '') then Exit;
610     if ProvDx.Reqd = 'R' then
611       lblProvDiag.Caption := TX_PROVDX_REQD
612     else
613       lblProvDiag.Caption := TX_PROVDX_OPT;
614     if ProvDx.Reqd = 'S' then
615       begin
616         cmdLexSearch.Enabled   := False;
617         txtProvDiag.Enabled    := False;
618         txtProvDiag.ReadOnly   := True;
619         txtProvDiag.Color      := clBtnFace;
620         txtProvDiag.Font.Color := clBtnText;
621         lblProvDiag.Enabled    := False;
622       end
623     else
624       case ProvDx.PromptMode[1] of
625         'F':  begin
626                 cmdLexSearch.Enabled   := False;
627                 txtProvDiag.Enabled    := True;
628                 txtProvDiag.ReadOnly   := False;
629                 txtProvDiag.Color      := clWindow;
630                 txtProvDiag.Font.Color := clWindowText;
631                 lblProvDiag.Enabled    := True;
632               end;
633         'L':  begin
634                 cmdLexSearch.Enabled   := True;
635                 txtProvDiag.Enabled    := True;
636                 txtProvDiag.ReadOnly   := True;
637                 txtProvDiag.Color      := clInfoBk;
638                 txtProvDiag.Font.Color := clInfoText;
639                 lblProvDiag.Enabled    := True;
640                 txtProvDiag.Hint       := TX_USE_LEXICON;
641               end;
642       end;
643   end;