Changeset 1703 for cprs/branches/HealthSevak-CPRS/CPRS-Chart/fNotes.pas
- Timestamp:
- May 9, 2015, 7:38:52 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/HealthSevak-CPRS/CPRS-Chart/fNotes.pas
r830 r1703 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 … … 153 153 imgLblNotes: TVA508ImageListLabeler; 154 154 imgLblImages: TVA508ImageListLabeler; 155 popNoteMemoSpellOpenSource: TMenuItem; //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine 155 156 procedure mnuChartTabClick(Sender: TObject); 156 157 procedure lstNotesClick(Sender: TObject); … … 416 417 uChanging: Boolean; 417 418 uIDNotesActive: Boolean; 419 NoteTotal: string; 418 420 419 421 … … 453 455 frmRemDlg.btnCancelClick(Self); 454 456 end; 457 //agp fix for a problem with reminders not clearing out when switching patients 458 if WhyNot = '' then 459 begin 460 frmRemDlg.btnCancelClick(Self); 461 if assigned(frmRemDlg) then 462 begin 463 result := false; 464 exit; 465 end; 466 end; 455 467 end; 456 468 end; … … 466 478 '0': begin 467 479 if WhyNot = 'COMMIT' then FSilent := True; 468 SaveCurrentNote(Result) 480 SaveCurrentNote(Result); 469 481 end; 470 482 end; … … 529 541 uPCEEdit.Clear; 530 542 frmDrawers.ResetTemplates; 543 NoteTotal := sCallV('ORCNOTE GET TOTAL', [Patient.DFN]); 531 544 end; 532 545 … … 546 559 FCurrentContext := FDefaultContext; 547 560 popNoteMemoSpell.Visible := SpellCheckAvailable; 561 popNoteMemoSpellOpenSource.Visible := SpellCheckAvailable; //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine 548 562 popNoteMemoGrammar.Visible := popNoteMemoSpell.Visible; 549 563 Z11.Visible := popNoteMemoSpell.Visible; … … 592 606 begin 593 607 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; 608 begin 609 for i := 0 to Items.Count - 1 do 610 begin 611 if Selected[i] then 612 begin 613 AForm.lbIDParents.ItemIndex := i; 614 NoteIEN := ItemIEN; //StrToInt64def(Piece(TStringList(Items.Objects[i])[0],U,1),0); 615 if NoteIEN > 0 then PrintNote(NoteIEN, DisplayText[i], TRUE) else 616 begin 617 if NoteIEN = 0 then InfoBox(TX_NONOTE, TX_NONOTE_CAP, MB_OK); 618 if NoteIEN < 0 then InfoBox(TX_NOPRT_NEW, TX_NOPRT_NEW_CAP, MB_OK); 619 end; 620 end; {if selected} 621 end; {for} 622 end; {with} 602 623 end; 603 624 … … 649 670 // clear the editing controls (also clear the new labels?) 650 671 txtSubject.Text := ''; 651 //lblNotes.Caption := '';672 lblNotes.Caption := ''; 652 673 SearchTextStopFlag := false; 653 674 if memNewNote <> nil then memNewNote.Clear; //CQ7012 Added test for nil … … 703 724 EnableList := [odTemplates] 704 725 else 705 EnableList := [odTemplates, odReminders]; 706 ShowList := [odTemplates, odReminders]; 726 if FutureEncounter(uPCEEdit) then 727 begin 728 EnableList := [odTemplates]; 729 ShowList := [odTemplates]; 730 end 731 else 732 begin 733 EnableList := [odTemplates, odReminders]; 734 ShowList := [odTemplates, odReminders]; 735 end; 707 736 end 708 737 else … … 1359 1388 if(assigned(frmReminderTree)) then 1360 1389 frmReminderTree.EnableActions; 1361 DisplayPCE; 1390 DisplayPCE; 1362 1391 pnlRight.Refresh; 1363 1392 memNewNote.Repaint; … … 1373 1402 inherited; 1374 1403 mnuActNewClick(Self); 1375 1404 end; 1376 1405 1377 1406 procedure TfrmNotes.cmdPCEClick(Sender: TObject); … … 1484 1513 if not NoteEmpty then 1485 1514 // 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) 1515 if (InfoBox(TX_BLR_CLEAR, TC_BLR_CLEAR, 1516 MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON2) = ID_YES) 1487 1517 then memNewNote.Lines.Clear; 1488 1518 end; … … 1659 1689 NC_SEARCHTEXT: begin; 1660 1690 SearchTextStopFlag := False; 1661 SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt );1691 SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt, StringReplace(TMenuItem(Sender).Caption, '&', '', [rfReplaceAll]) ); 1662 1692 with SearchCtxt do if Changed then 1663 1693 begin … … 1743 1773 lblNotes.Caption := 'Search for "'+FCurrentContext.SearchString+'" was stopped!'; 1744 1774 end; 1775 //Clear the search text. We are done searching 1776 FCurrentContext.SearchString := ''; 1745 1777 frmSearchStop.Hide; 1746 1778 // Text Search CQ: HDS00002856 -------------------- 1779 lblNotes.Caption := lblNotes.Caption + ' (Total: ' + NoteTotal + ')'; 1747 1780 lblNotes.hint := lblNotes.Caption; 1748 1781 tvNotes.Caption := lblNotes.Caption; … … 1984 2017 inherited; 1985 2018 if lstNotes.ItemIEN = 0 then Exit; 2019 if assigned(frmRemDlg) then 2020 begin 2021 frmRemDlg.btnCancelClick(Self); 2022 if assigned(frmRemDlg) then exit; 2023 end; 1986 2024 ActOnDocument(ActionSts, lstNotes.ItemIEN, 'DELETE RECORD'); 1987 2025 if ShowMsgOn(not ActionSts.Success, ActionSts.Reason, TX_IN_AUTH) then Exit; … … 2322 2360 begin 2323 2361 popNoteMemoSpell.Enabled := True; 2362 popNoteMemoSpellOpenSource.Enabled := True; //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine 2324 2363 popNoteMemoGrammar.Enabled := True; 2325 2364 popNoteMemoReformat.Enabled := True; … … 2331 2370 begin 2332 2371 popNoteMemoSpell.Enabled := False; 2372 popNoteMemoSpellOpenSource.Enabled := False; //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine 2333 2373 popNoteMemoGrammar.Enabled := False; 2334 2374 popNoteMemoReformat.Enabled := False; … … 2355 2395 begin 2356 2396 inherited; 2357 FEditCtrl.SelText := Clipboard.AsText; {*KCM*}2397 Sendmessage(FEditCtrl.Handle,EM_PASTESPECIAL,CF_TEXT,0); 2358 2398 frmNotes.pnlWriteResize(Self); 2359 2399 //FEditCtrl.PasteFromClipboard; // use AsText to prevent formatting … … 2437 2477 timAutoSave.Enabled := False; 2438 2478 try 2439 SpellCheckForControl(memNewNote );2479 SpellCheckForControl(memNewNote, Sender = popNoteMemoSpellOpenSource); //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine 2440 2480 finally 2441 2481 FChanged := True; … … 2945 2985 end; 2946 2986 Dest.Free; 2947 end; 2987 end else 2988 //Reset the caption 2989 lblNotes.Caption := SetNoteTreeLabel(FCurrentContext); 2990 2948 2991 // Text Search CQ: HDS00002856 --------------------------------------- 2949 2992
Note:
See TracChangeset
for help on using the changeset viewer.