Changeset 829 for cprs/trunk/CPRS-Chart/Orders/fODRad.pas
- Timestamp:
- Jul 7, 2010, 4:31:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/Orders/fODRad.pas
r456 r829 6 6 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 7 7 Forms, Dialogs, StdCtrls, ORCtrls, fODBase, ORFn, ExtCtrls, 8 ComCtrls, uConst, ORDtTm ;8 ComCtrls, uConst, ORDtTm, VA508AccessibilityManager; 9 9 10 10 type … … 22 22 cboSubmit: TORComboBox; 23 23 lstLastExam: TORListBox; 24 lbl Reason: TLabel;25 mem Reason: TCaptionMemo;24 lblHistory: TLabel; 25 memHistory: TCaptionMemo; 26 26 lstSelectMod: TORListBox; 27 27 lblSelectMod: TLabel; … … 46 46 radPregnantNo: TRadioButton; 47 47 radPregnantUnknown: TRadioButton; 48 lblReason: TLabel; 49 txtReason: TCaptionEdit; 50 pnlRightBase: TORAutoPanel; 48 51 procedure cboProcedureNeedData(Sender: TObject; 49 52 const StartFrom: string; Direction, InsertAt: Integer); … … 56 59 procedure FormCreate(Sender: TObject); 57 60 procedure cboImTypeChange(Sender: TObject); 58 procedure mem ReasonExit(Sender: TObject);61 procedure memHistoryExit(Sender: TObject); 59 62 procedure FormResize(Sender: TObject); 60 63 procedure cboAvailModKeyDown(Sender: TObject; var Key: Word; … … 97 100 TX_NO_PROC = 'An Imaging Procedure must be specified.' ; 98 101 TX_NO_MODE = 'A mode of transport must be selected.'; 99 TX_NO_REASON = 'A History & Reason for Exam must be entered.' ; 100 TX_NO_DATE = 'Unable to evaluate request date.' ; 102 TX_NO_REASON = 'A Reason for Study must be entered.' ; 103 TX_BAD_HISTORY = 'An incomplete or invalid Clinical History has been entered.' + CRLF + 104 'Please correct or clear.'; 105 TX_NO_DATE = 'A "Date Desired" must be specified.' ; 106 TX_BAD_DATE = 'The "Date Desired" you have entered is invalid.'; 107 TX_PAST_DATE = '"Date Desired" must not be in the past.'; 101 108 TX_APPROVAL_REQUIRED= 'This procedure requires Radiologist approval.' ; 102 109 TX_NO_SOURCE = 'A source must be specified for Contract/Sharing/Research patients.'; … … 131 138 with cboImType do 132 139 begin 133 Items.Assign(SubsetOfImagingTypes);140 FastAssign(SubsetOfImagingTypes, cboImType.Items); 134 141 for i := 0 to Items.Count-1 do 135 142 if StrToIntDef(Piece(Items[i],U,4), 0) = DisplayGroup then ItemIndex := i; … … 151 158 SetControl(cboSubmit, 'IMLOC', 1); 152 159 SetControl(cboCategory, 'CLASS', 1); 153 SetControl(memReason, 'COMMENT', 1); 160 SetControl(txtReason, 'REASON', 1); 161 SetControl(memHistory, 'COMMENT', 1); 154 162 SetControl(chkIsolation, 'YN', 1); 155 163 SetControl(radPregnant, 'PREGNANT', 1); … … 214 222 tmplst: TStringList; 215 223 begin 216 if not FEditCopy then inherited; 224 if not FEditCopy then 225 begin 226 inherited; 227 if not ReasonForStudyCarryOn then txtReason.text := ''; 228 end; 217 229 218 230 FPreOpDate := ''; … … 236 248 if FRadCommonCombo.Items.Count>0 then cboProcedure.InsertSeparator; 237 249 238 calRequestDate.Text := 'TODAY';250 //calRequestDate.Text := 'TODAY'; default removed per E3R #19834 - v27.10 - RV 239 251 SetControl(cboAvailMod, 'Modifiers'); 240 252 SetControl(cboUrgency, 'Urgencies'); … … 262 274 tmplst := TStringList.Create; 263 275 try 264 tmplst.Assign(cboSubmit.Items);276 FastAssign(cboSubmit.Items, tmplst); 265 277 SortByPiece(tmplst, U, 2); 266 cboSubmit.Items.Assign(tmplst);278 FastAssign(tmplst, cboSubmit.Items); 267 279 finally 268 280 tmplst.Free; … … 299 311 cboProcedure.InitLongList('') ; 300 312 StatusText(''); 313 301 314 end; 302 315 … … 326 339 else Responses.Update('YN', 1, '0' , 'No'); 327 340 with calPreOp do if Length(Text) > 0 then Responses.Update('PREOP', 1, FPreOpDate, Text); 328 with memReason do if GetTextLen > 0 then Responses.Update('COMMENT', 1, TX_WPTYPE, Text); 341 with txtReason do if GetTextLen > 0 then Responses.Update('REASON', 1, Text, Text); 342 with memHistory do if GetTextLen > 0 then Responses.Update('COMMENT', 1, TX_WPTYPE, Text); 329 343 with lstSelectMod do for i := 0 to Items.Count - 1 do 330 344 Responses.Update('MODIFIER',i+1, Piece(Items[i],U,1), Piece(Items[i],U,2)); … … 380 394 end ; 381 395 end; 396 397 if Length(txtReason.Text) < 3 then 398 SetError(TX_NO_REASON) 399 else 400 begin 401 j := 0; 402 for i := 1 to Length(txtReason.Text) do 403 begin 404 if txtReason.Text[i] in ['A'..'Z','a'..'z','0'..'9'] then j := j + 1; 405 if not (txtReason.Text[i] in ['A'..'Z','a'..'z','0'..'9']) and (j > 0) then j := 0; 406 if j = 2 then break; 407 end; 408 if j < 2 then SetError(TX_NO_REASON); 409 end; 410 411 if Length(memHistory.Text) > 0 then 412 begin 413 j := 0; 414 for i := 1 to Length(memHistory.Text) do 415 begin 416 if memHistory.Text[i] in ['A'..'Z','a'..'z','0'..'9'] then j := j + 1; 417 if not (memHistory.Text[i] in ['A'..'Z','a'..'z','0'..'9']) and (j > 0) then j := 0; 418 if j = 2 then break; 419 end; 420 if j < 2 then SetError(TX_BAD_HISTORY); 421 end; 422 382 423 with cboCategory do 383 424 begin 384 AskLoc := True;425 AskLoc := (ALocation = 0); 385 426 if ((not Patient.Inpatient) and (Self.EvtType = 'A')) then 386 427 AskLoc := False; … … 401 442 if Length(cboTransport.Text) = 0 then SetError(TX_NO_MODE); 402 443 403 if Length(memReason.Text) < 2 then404 SetError(TX_NO_REASON)405 else406 begin407 j := 0;408 for i := 1 to Length(memReason.Text) do409 begin410 if memReason.Text[i] in ['A'..'Z','a'..'z','0'..'9'] then j := j + 1;411 if not (memReason.Text[i] in ['A'..'Z','a'..'z','0'..'9']) and (j > 0) then j := 0;412 if j = 2 then break;413 end;414 if j < 2 then SetError(TX_NO_REASON);415 end;416 417 444 with cboSubmit do 418 445 if Enabled and (ItemIEN = 0)then SetError(TX_NO_IMAGING_LOCATION); 419 446 420 447 with calRequestDate do 421 if FMDateTime = 0 then SetError(TX_NO_DATE); 448 begin 449 if FMDateTime = 0 then 450 SetError(TX_NO_DATE) 451 else if FMDateTime < 0 then 452 SetError(TX_BAD_DATE) 453 else if FMDateTime < FMToday then 454 SetError(TX_PAST_DATE); 455 end; 422 456 423 457 end; … … 492 526 ClearControl(lstSelectMod); 493 527 ClearControl(lstLastExam); 494 //ClearControl(mem Reason); {WPB-1298-30758}528 //ClearControl(memHistory); {WPB-1298-30758} 495 529 Changing := False; 496 530 if CharAt(ItemID, 1) = 'Q' then … … 513 547 SetControl(cboTransport, 'MODE', 1); 514 548 SetControl(cboCategory, 'CLASS', 1); 515 SetControl(memReason, 'COMMENT', 1); 549 SetControl(txtReason, 'REASON', 1); 550 SetControl(memHistory, 'COMMENT', 1); 516 551 SetControl(chkIsolation, 'YN', 1); 517 552 SetControl(radPregnant, 'PREGNANT', 1); … … 581 616 AutoSizeDisabled := True; 582 617 inherited; 583 mem Reason.Width := pnlHandR.ClientWidth;584 mem Reason.Height := pnlHandR.ClientHeight - memReason.Top;618 memHistory.Width := pnlHandR.ClientWidth; 619 memHistory.Height := pnlHandR.ClientHeight - memHistory.Top; 585 620 FillerID := 'RA'; // does 'on Display' order check **KCM** 586 621 StatusText('Loading Dialog Definition'); … … 590 625 Responses.Dialog := 'RA OERR EXAM'; // loads formatting info 591 626 StatusText('Loading Default Values'); 592 cboImType.Items.Assign(SubsetOfImagingTypes);627 FastAssign(SubsetOfImagingTypes, cboImType.Items); 593 628 if Self.EvtID>0 then 594 629 FEvtDelayDiv := GetEventDiv1(IntToStr(Self.EvtID)); … … 600 635 PreserveControl(cboCategory); 601 636 PreserveControl(calPreOp); 602 PreserveControl(memReason); {WPB-1298-30758} 637 PreserveControl(txtReason); 638 PreserveControl(memHistory); {WPB-1298-30758} 603 639 if (Patient.Sex <> 'F') then 604 640 begin … … 619 655 end; 620 656 621 procedure TfrmODRad.mem ReasonExit(Sender: TObject);657 procedure TfrmODRad.memHistoryExit(Sender: TObject); 622 658 var 623 659 AStringList: TStringList; … … 626 662 AStringList := TStringList.Create; 627 663 try 628 AStringList.Assign(memReason.Lines);664 FastAssign(memHistory.Lines, AStringList); 629 665 LimitStringLength(AStringList, 74); 630 memReason.Lines.Assign(AstringList);666 FastAssign(AstringList, memHistory.Lines); 631 667 ControlChange(Self); 632 668 finally … … 638 674 begin 639 675 inherited; 640 mem Reason.Width := pnlHandR.ClientWidth;641 mem Reason.Height := pnlHandR.ClientHeight - memReason.Top;676 memHistory.Width := pnlHandR.ClientWidth; 677 memHistory.Height := pnlHandR.ClientHeight - memHistory.Top; 642 678 end; 643 679
Note:
See TracChangeset
for help on using the changeset viewer.