Changeset 1679 for cprs/trunk/CPRS-Chart/fNotes.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fNotes.pas
r830 r1679 9 9 uPCE, ORClasses, fDrawers, ImgList, rTIU, uTIU, uDocTree, fRptBox, fPrintList, 10 10 fNoteST, ORNet, fNoteSTStop, fBase508Form, VA508AccessibilityManager, 11 VA508ImageListLabeler ;11 VA508ImageListLabeler, RichEdit; 12 12 13 13 type … … 416 416 uChanging: Boolean; 417 417 uIDNotesActive: Boolean; 418 NoteTotal: string; 418 419 419 420 … … 453 454 frmRemDlg.btnCancelClick(Self); 454 455 end; 456 //agp fix for a problem with reminders not clearing out when switching patients 457 if WhyNot = '' then 458 begin 459 frmRemDlg.btnCancelClick(Self); 460 if assigned(frmRemDlg) then 461 begin 462 result := false; 463 exit; 464 end; 465 end; 455 466 end; 456 467 end; … … 466 477 '0': begin 467 478 if WhyNot = 'COMMIT' then FSilent := True; 468 SaveCurrentNote(Result) 479 SaveCurrentNote(Result); 469 480 end; 470 481 end; … … 529 540 uPCEEdit.Clear; 530 541 frmDrawers.ResetTemplates; 542 NoteTotal := sCallV('ORCNOTE GET TOTAL', [Patient.DFN]); 531 543 end; 532 544 … … 592 604 begin 593 605 with AForm.lbIDParents do 594 for i := 0 to Items.Count - 1 do 595 if Selected[i] then 596 begin 597 NoteIEN := StrToInt64def(Piece(Items[i], U, 1), 0); 598 if NoteIEN > 0 then PrintNote(NoteIEN, DisplayText[i], TRUE) 599 else if NoteIEN = 0 then InfoBox(TX_NONOTE, TX_NONOTE_CAP, MB_OK) 600 else InfoBox(TX_NOPRT_NEW, TX_NOPRT_NEW_CAP, MB_OK); 601 end; 606 begin 607 for i := 0 to Items.Count - 1 do 608 begin 609 if Selected[i] then 610 begin 611 AForm.lbIDParents.ItemIndex := i; 612 NoteIEN := ItemIEN; //StrToInt64def(Piece(TStringList(Items.Objects[i])[0],U,1),0); 613 if NoteIEN > 0 then PrintNote(NoteIEN, DisplayText[i], TRUE) else 614 begin 615 if NoteIEN = 0 then InfoBox(TX_NONOTE, TX_NONOTE_CAP, MB_OK); 616 if NoteIEN < 0 then InfoBox(TX_NOPRT_NEW, TX_NOPRT_NEW_CAP, MB_OK); 617 end; 618 end; {if selected} 619 end; {for} 620 end; {with} 602 621 end; 603 622 … … 649 668 // clear the editing controls (also clear the new labels?) 650 669 txtSubject.Text := ''; 651 //lblNotes.Caption := '';670 lblNotes.Caption := ''; 652 671 SearchTextStopFlag := false; 653 672 if memNewNote <> nil then memNewNote.Clear; //CQ7012 Added test for nil … … 703 722 EnableList := [odTemplates] 704 723 else 705 EnableList := [odTemplates, odReminders]; 706 ShowList := [odTemplates, odReminders]; 724 if FutureEncounter(uPCEEdit) then 725 begin 726 EnableList := [odTemplates]; 727 ShowList := [odTemplates]; 728 end 729 else 730 begin 731 EnableList := [odTemplates, odReminders]; 732 ShowList := [odTemplates, odReminders]; 733 end; 707 734 end 708 735 else … … 1359 1386 if(assigned(frmReminderTree)) then 1360 1387 frmReminderTree.EnableActions; 1361 DisplayPCE; 1388 DisplayPCE; 1362 1389 pnlRight.Refresh; 1363 1390 memNewNote.Repaint; … … 1373 1400 inherited; 1374 1401 mnuActNewClick(Self); 1375 1402 end; 1376 1403 1377 1404 procedure TfrmNotes.cmdPCEClick(Sender: TObject); … … 1484 1511 if not NoteEmpty then 1485 1512 // if not FChanged and (InfoBox(TX_BLR_CLEAR, TC_BLR_CLEAR, MB_YESNO) = ID_YES) 1486 if (InfoBox(TX_BLR_CLEAR, TC_BLR_CLEAR, MB_YESNO) = ID_YES) 1513 if (InfoBox(TX_BLR_CLEAR, TC_BLR_CLEAR, 1514 MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON2) = ID_YES) 1487 1515 then memNewNote.Lines.Clear; 1488 1516 end; … … 1659 1687 NC_SEARCHTEXT: begin; 1660 1688 SearchTextStopFlag := False; 1661 SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt );1689 SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt, StringReplace(TMenuItem(Sender).Caption, '&', '', [rfReplaceAll]) ); 1662 1690 with SearchCtxt do if Changed then 1663 1691 begin … … 1743 1771 lblNotes.Caption := 'Search for "'+FCurrentContext.SearchString+'" was stopped!'; 1744 1772 end; 1773 //Clear the search text. We are done searching 1774 FCurrentContext.SearchString := ''; 1745 1775 frmSearchStop.Hide; 1746 1776 // Text Search CQ: HDS00002856 -------------------- 1777 lblNotes.Caption := lblNotes.Caption + ' (Total: ' + NoteTotal + ')'; 1747 1778 lblNotes.hint := lblNotes.Caption; 1748 1779 tvNotes.Caption := lblNotes.Caption; … … 1984 2015 inherited; 1985 2016 if lstNotes.ItemIEN = 0 then Exit; 2017 if assigned(frmRemDlg) then 2018 begin 2019 frmRemDlg.btnCancelClick(Self); 2020 if assigned(frmRemDlg) then exit; 2021 end; 1986 2022 ActOnDocument(ActionSts, lstNotes.ItemIEN, 'DELETE RECORD'); 1987 2023 if ShowMsgOn(not ActionSts.Success, ActionSts.Reason, TX_IN_AUTH) then Exit; … … 2355 2391 begin 2356 2392 inherited; 2357 FEditCtrl.SelText := Clipboard.AsText; {*KCM*}2393 Sendmessage(FEditCtrl.Handle,EM_PASTESPECIAL,CF_TEXT,0); 2358 2394 frmNotes.pnlWriteResize(Self); 2359 2395 //FEditCtrl.PasteFromClipboard; // use AsText to prevent formatting … … 2945 2981 end; 2946 2982 Dest.Free; 2947 end; 2983 end else 2984 //Reset the caption 2985 lblNotes.Caption := SetNoteTreeLabel(FCurrentContext); 2986 2948 2987 // Text Search CQ: HDS00002856 --------------------------------------- 2949 2988
Note:
See TracChangeset
for help on using the changeset viewer.