Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.pas
r459 r460 60 60 btnSevHelp: TORAlignButton; 61 61 procedure btnAgentClick(Sender: TObject); 62 procedure FormCreate(Sender: TObject); 62 procedure FormCreate(Sender: TObject); 63 63 procedure cboOriginatorNeedData(Sender: TObject; const StartFrom: String; 64 64 Direction, InsertAt: Integer); … … 160 160 'HISTORICAL: reported by the patient as occurring in the past;' + CRLF + 161 161 'no longer requires intervention' ; 162 162 163 NEW_ALLERGY = True; 163 164 ENTERED_IN_ERROR = True; … … 190 191 Result := False; 191 192 frmARTAllergy := TfrmARTAllergy.Create(Application); 193 if frmARTAllergy.AbortAction then exit; 192 194 with frmARTAllergy do 193 195 try … … 286 288 ExtractItems(cboSymptoms.Items, Defaults, 'Top Ten'); 287 289 cboSymptoms.InsertSeparator; 290 cboSymptoms.InitLongList(''); 288 291 cboOriginator.InitLongList(User.Name) ; 289 292 cboOriginator.SelectByIEN(User.DUZ); … … 301 304 var 302 305 Allergy: string; 303 begin 304 inherited; 306 //ErrMsg: string; 307 begin 308 inherited; 309 // since this only allows entry of new allergies, key check is irrelevant, eff. v26.12 310 (* if not IsARTClinicalUser(ErrMsg) then 311 begin 312 InfoBox(ErrMsg, 'No Authorization', MB_ICONWARNING or MB_OK); 313 AbortAction := True; 314 Close; 315 Exit; 316 end;*) 305 317 Changing := True; 306 318 FOldHintPause := Application.HintHidePause; … … 441 453 begin 442 454 if (lstSelectedSymptoms.Items.Count = 0) then SetError(TX_NO_SYMPTOMS); 443 if (grpObsHist.Enabled) and RequireOriginatorComments and ( memComments.Text = '') then455 if (grpObsHist.Enabled) and RequireOriginatorComments and (not ContainsVisibleChar(memComments.Text)) then 444 456 SetError(TX_ORIG_CMTS_REQD); 445 457 if (grpObsHist.Enabled) and (calObservedDate.Text = '') then … … 627 639 if tmpDate > 0 then ReactionDate := tmpDate;*) 628 640 with cboSeverity do 629 if ItemID <> '' then 630 Severity := ItemID; 641 if (ItemID <> '') and (Text <> '') then 642 Severity := ItemID 643 else 644 Severity := ''; 631 645 with memComments do 632 646 if GetTextLen > 0 then … … 886 900 887 901 procedure TfrmARTAllergy.cboSymptomsMouseClick(Sender: TObject); 902 const 903 TC_SS_MAX = 'Too many signs/symptoms'; 904 TX_SS_MAX = 'A maximum of 38 signs/symptoms may be selected.'; 888 905 var 889 906 x: string; 890 907 begin 891 908 inherited; 892 if (cboSymptoms.ItemIndex < 0) and (cboSymptoms.Text = '') then exit; 893 Changing := True; 909 with cboSymptoms do if (ItemIndex < 0) or (Text = '') or (ItemID = '') then exit; 894 910 if (lstSelectedSymptoms.SelectByID(cboSymptoms.ItemID) > -1) or 895 911 (lstSelectedSymptoms.Items.IndexOf(cboSymptoms.Text) > -1) then exit; 912 if (lstSelectedSymptoms.Count + 1) > 38 then 913 begin 914 InfoBox(TX_SS_MAX, TC_SS_MAX, MB_ICONERROR or MB_OK); 915 exit; 916 end; 917 Changing := True; 896 918 if cboSymptoms.ItemIndex > -1 then 897 919 begin … … 906 928 SelectByID(cboSymptoms.ItemID); 907 929 end; 908 end 909 else 930 end ; 931 (* else Free-text entries no longer allowed. 910 932 with lstSelectedSymptoms do 911 933 begin 912 934 Items.Add('FT' + U + cboSymptoms.Text); 913 935 ItemIndex := Items.Count - 1; 914 end; 936 end;*) 915 937 Changing := False; 916 938 ControlChange(Self)
Note:
See TracChangeset
for help on using the changeset viewer.