Procedure

TfrmEditProc.SetProvDiagPromptingMode

Module

fEditProc

Last Modified

7/15/2014 3:26:34 PM

Visibility

Private

Owner

TfrmEditProc

Declaration

procedure SetProvDiagPromptingMode;

Calls Hierarchy


TfrmEditProc.SetProvDiagPromptingMode
 └GetProvDxMode

Called-By Hierarchy


     TfrmEditProc.SetProvDiagPromptingMode
                 TfrmEditProc.InitDialog┘ 
                 EditResubmitProcedure┤   
TfrmConsults.mnuActEditResubmitClick┘ │   
 TfrmConsults.cmdEditResubmitClick┘   │   
            TfrmEditProc.cboProcSelect┘   
          TfrmEditProc.InitDialog...┘     

Calls

Name Declaration Comments
GetProvDxMode procedure GetProvDxMode(var ProvDx: TProvisionalDiagnosis; SvcIEN: string); -

Called-By

Name Declaration Comments
TfrmEditProc.InitDialog procedure InitDialog; -


Source

602   procedure TfrmEditProc.SetProvDiagPromptingMode;
603   const
604     TX_USE_LEXICON = 'You must use the "Lexicon" button to select a provisional diagnosis for this service.';
605     TX_PROVDX_OPT  = 'Provisional Diagnosis';
606     TX_PROVDX_REQD = 'Provisional Dx (REQUIRED)';
607   begin
608     cmdLexSearch.Enabled   := False;
609     txtProvDiag.Enabled    := False;
610     txtProvDiag.ReadOnly   := True;
611     txtProvDiag.Color      := clBtnFace;
612     txtProvDiag.Font.Color := clBtnText;
613     lblProvDiag.Enabled    := False;
614     txtProvDiag.Hint       := '';
615     if cboProc.ItemIEN = 0 then Exit;
616     //GetProvDxMode(ProvDx, cboService.ItemID);
617     GetProvDxMode(ProvDx, Piece(cboProc.Items[cboProc.ItemIndex], U, 4));
618     //  Returns:  string  A^B
619     //     A = O (optional), R (required) or S (suppress)
620     //     B = F (free-text) or L (lexicon)
621     with ProvDx do if (Reqd = '') or (PromptMode = '') then Exit;
622     if ProvDx.Reqd = 'R' then
623       lblProvDiag.Caption := TX_PROVDX_REQD
624     else
625       lblProvDiag.Caption := TX_PROVDX_OPT;
626     if ProvDx.Reqd = 'S' then
627       begin
628         cmdLexSearch.Enabled   := False;
629         txtProvDiag.Enabled    := False;
630         txtProvDiag.ReadOnly   := True;
631         txtProvDiag.Color      := clBtnFace;
632         txtProvDiag.Font.Color := clBtnText;
633         lblProvDiag.Enabled    := False;
634       end
635     else
636       case ProvDx.PromptMode[1] of
637         'F':  begin
638                 cmdLexSearch.Enabled   := False;
639                 txtProvDiag.Enabled    := True;
640                 txtProvDiag.ReadOnly   := False;
641                 txtProvDiag.Color      := clWindow;
642                 txtProvDiag.Font.Color := clWindowText;
643                 lblProvDiag.Enabled    := True;
644               end;
645         'L':  begin
646                 cmdLexSearch.Enabled   := True;
647                 txtProvDiag.Enabled    := True;
648                 txtProvDiag.ReadOnly   := True;
649                 txtProvDiag.Color      := clInfoBk;
650                 txtProvDiag.Font.Color := clInfoText;
651                 lblProvDiag.Enabled    := True;
652                 txtProvDiag.Hint       := TX_USE_LEXICON;
653               end;
654       end;
655   end;