Module

fProbFreetext

Path

C:\CPRS\CPRS30\fProbFreetext.pas

Last Modified

7/15/2014 3:26:38 PM

Units Used in Interface

Name Comments
fBase508Form -
uProbs -

Classes

Name Comments
TfrmProbFreetext -

Procedures

Name Owner Declaration Scope Comments
bbYesClick TfrmProbFreetext procedure bbYesClick(Sender: TObject); Public/Published -
ckbNTRTClick TfrmProbFreetext procedure ckbNTRTClick(Sender: TObject); Public/Published -
edtCommentChange TfrmProbFreetext procedure edtCommentChange(Sender: TObject); Public/Published -
FormCreate TfrmProbFreetext procedure FormCreate(Sender: TObject); Public/Published -

Functions

Name Owner Declaration Scope Comments
CreateFreetextMessage - function CreateFreetextMessage(term: String; ICDVersion: String): TForm; Interfaced -

Global Variables

Name Type Declaration Comments
frmProbFreetext TfrmProbFreetext frmProbFreetext: TfrmProbFreetext; -

Constants

Name Declaration Scope Comments
TXR69 'A suitable term was not found based on user input and current defaults.' + CRLF + 'If you proceed with this nonspecific term, an ICD code of "R69 - ILLNESS, UNSPECIFIED" will be filed.' Global -


Module Source

1     unit fProbFreetext;
2     
3     interface
4     
5     uses
6       Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, uProbs,
7       Dialogs, fBase508Form, VA508AccessibilityManager, ExtCtrls, StdCtrls, Buttons;
8     
9     type
10      TfrmProbFreetext = class(TfrmBase508Form)
11        pnlButton: TPanel;
12        pnlLeft: TPanel;
13        pnlDialog: TPanel;
14        bbYes: TBitBtn;
15        bbNo: TBitBtn;
16        edtComment: TLabeledEdit;
17        ckbNTRT: TCheckBox;
18        imgIcon: TImage;
19        pnlNTRT: TPanel;
20        pnlMessage: TPanel;
21        memMessage: TMemo;
22        lblUse: TStaticText;
23        procedure FormCreate(Sender: TObject);
24        procedure ckbNTRTClick(Sender: TObject);
25        procedure bbYesClick(Sender: TObject);
26        procedure edtCommentChange(Sender: TObject);
27      private
28        { Private declarations }
29      public
30        { Public declarations }
31      end;
32    
33    function CreateFreetextMessage(term: String; ICDVersion: String): TForm;
34    
35    var
36      frmProbFreetext: TfrmProbFreetext;
37    
38    implementation
39    
40    {$R *.dfm}
41    
42    uses
43      VAUtils, ORFn;
44    
45    const
46      TXR69 = 'A suitable term was not found based on user input and current defaults.' + CRLF + 'If you proceed with this nonspecific term, an ICD code of "R69 - ILLNESS, UNSPECIFIED" will be filed.';
47    
48    procedure TfrmProbFreetext.bbYesClick(Sender: TObject);
49    begin
50      inherited;
51      RequestNTRT := ckbNTRT.Checked;
52      NTRTComment := edtComment.Text;
53    end;
54    
55    procedure TfrmProbFreetext.ckbNTRTClick(Sender: TObject);
56    begin
57      inherited;
58      edtComment.Visible := ckbNTRT.Checked;
59      if edtComment.Visible then
60        edtComment.SetFocus
61      else
62        edtComment.Clear;
63    end;
64    
65    procedure TfrmProbFreetext.edtCommentChange(Sender: TObject);
66    begin
67      inherited;
68      bbNo.Default := False;
69      bbYes.Default := True;
70    end;
71    
72    procedure TfrmProbFreetext.FormCreate(Sender: TObject);
73    begin
74      inherited;
75      with imgIcon do
76      begin
77        Picture.Icon.Handle := LoadIcon(0, IDI_QUESTION);
78      end;
79    
80      memMessage.TabStop := ScreenReaderActive;
81      lblUse.TabStop := ScreenReaderActive;
82    end;
83    
84    function CreateFreetextMessage(term: String; ICDVersion: String): TForm;
85    begin
86      Result := TfrmProbFreetext.Create(Application);
87      with Result as TfrmProbFreetext do
88      begin
89        if Piece(ICDVersion, '^', 1) = '10D' then
90        begin
91          memMessage.Lines.Clear;
92          memMessage.Lines[0] := TXR69;
93        end;
94        lblUse.Caption := lblUse.caption + ' ' + term + '?';
95        bbNo.Default := True;
96        ActiveControl := bbNo;
97        with ckbNTRT do
98        begin
99          Hint := 'Check this box if you would like ' + UpperCase(term) +
100                 ' to be considered for inclusion'#13#10'in future revisions of SNOMED CT.';
101         ShowHint := True;
102       end;
103       Invalidate;
104     end;
105   end;
106   end.

Module Calls (2 levels)


fProbFreetext
 ├uProbs
 │ ├uConst
 │ ├rCore
 │ └uCore
 └fBase508Form
   ├uConst
   └uHelpManager

Module Called-By (2 levels)


fProbFreetext
  CPRSChart┤ 
   fProbLex┘ 
   fProbs┤   
 fProbEdt┘