Changeset 1703 for cprs/branches


Ignore:
Timestamp:
May 9, 2015, 7:38:52 AM (9 years ago)
Author:
healthsevak
Message:

updated this file to version 28 and Implemented the OpenSource based spell check feature

Location:
cprs/branches/HealthSevak-CPRS/CPRS-Chart
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/HealthSevak-CPRS/CPRS-Chart/fNotes.dfm

    r830 r1703  
    44  HelpContext = 5000
    55  Caption = 'Progress Notes Page'
    6   ClientHeight = 394
     6  ClientHeight = 573
    77  ClientWidth = 679
    88  HelpFile = 'overvw'
     
    1212  OnShow = FormShow
    1313  ExplicitWidth = 687
    14   ExplicitHeight = 440
     14  ExplicitHeight = 627
    1515  PixelsPerInch = 96
    1616  TextHeight = 13
    1717  inherited shpPageBottom: TShape
    18     Top = 389
     18    Top = 568
    1919    Width = 679
    20     ExplicitTop = 358
     20    ExplicitTop = 408
    2121    ExplicitWidth = 679
    2222  end
    2323  inherited sptHorz: TSplitter
    2424    Left = 64
    25     Height = 389
     25    Height = 568
    2626    OnCanResize = sptHorzCanResize
    2727    ExplicitLeft = 64
    28     ExplicitHeight = 358
     28    ExplicitHeight = 408
    2929  end
    3030  inherited pnlLeft: TPanel
    3131    Width = 64
    32     Height = 389
     32    Height = 568
     33    Constraints.MinWidth = 37
    3334    ExplicitWidth = 64
    34     ExplicitHeight = 389
     35    ExplicitHeight = 548
    3536    object lblNotes: TOROffsetLabel
    3637      Left = 0
     
    4950    object lblSpace1: TLabel
    5051      Left = 0
    51       Top = 344
     52      Top = 523
    5253      Width = 64
    5354      Height = 3
     
    5556      AutoSize = False
    5657      Caption = ' '
    57       ExplicitTop = 313
     58      ExplicitTop = 363
    5859    end
    5960    object cmdNewNote: TORAlignButton
    6061      Left = 0
    61       Top = 347
     62      Top = 526
    6263      Width = 64
    6364      Height = 21
     
    6768      OnClick = cmdNewNoteClick
    6869      OnExit = cmdNewNoteExit
     70      ExplicitTop = 506
    6971    end
    7072    object cmdPCE: TORAlignButton
    7173      Left = 0
    72       Top = 368
     74      Top = 547
    7375      Width = 64
    7476      Height = 21
     
    7981      OnClick = cmdPCEClick
    8082      OnExit = cmdPCEExit
     83      ExplicitTop = 527
    8184    end
    8285    object pnlDrawers: TPanel
     
    8487      Top = 19
    8588      Width = 64
    86       Height = 325
     89      Height = 504
    8790      Align = alClient
    8891      BevelOuter = bvNone
    8992      TabOrder = 0
     93      ExplicitHeight = 484
    9094      object splDrawers: TSplitter
    9195        Left = 0
    92         Top = 322
     96        Top = 501
    9397        Width = 64
    9498        Height = 3
    9599        Cursor = crVSplit
    96100        Align = alBottom
    97         ExplicitTop = 291
     101        ExplicitTop = 342
    98102      end
    99103      object lstNotes: TORListBox
     
    121125        Top = 0
    122126        Width = 64
    123         Height = 322
     127        Height = 501
    124128        Align = alClient
    125129        Constraints.MinWidth = 30
     
    142146        NodePiece = 0
    143147        ShortNodeCaptions = True
     148        ExplicitHeight = 481
    144149      end
    145150    end
     
    148153    Left = 68
    149154    Width = 611
    150     Height = 389
     155    Height = 568
     156    Constraints.MinWidth = 30
    151157    ExplicitLeft = 68
    152158    ExplicitWidth = 611
    153     ExplicitHeight = 389
     159    ExplicitHeight = 548
    154160    object sptVert: TSplitter
    155161      Left = 0
    156       Top = 340
     162      Top = 519
    157163      Width = 611
    158164      Height = 4
    159165      Cursor = crVSplit
    160166      Align = alBottom
    161       ExplicitTop = 309
     167      ExplicitTop = 359
    162168    end
    163169    object memPCEShow: TRichEdit
    164170      Left = 0
    165       Top = 344
     171      Top = 523
    166172      Width = 611
    167173      Height = 45
     
    175181      TabOrder = 2
    176182      OnExit = memPCEShowExit
     183      ExplicitTop = 503
    177184    end
    178185    object pnlWrite: TPanel
     
    180187      Top = 0
    181188      Width = 611
    182       Height = 340
     189      Height = 519
    183190      Align = alClient
    184191      BevelOuter = bvNone
     
    186193      Visible = False
    187194      OnResize = pnlWriteResize
     195      ExplicitHeight = 499
    188196      object memNewNote: TRichEdit
    189197        Left = 0
    190198        Top = 67
    191199        Width = 611
    192         Height = 273
     200        Height = 452
    193201        Align = alClient
    194202        Font.Charset = DEFAULT_CHARSET
     
    197205        Font.Name = 'Courier New'
    198206        Font.Style = []
     207        MaxLength = 2147483645
    199208        ParentFont = False
    200209        PlainText = True
     
    207216        OnKeyPress = memNewNoteKeyPress
    208217        OnKeyUp = memNewNoteKeyUp
     218        ExplicitHeight = 432
    209219      end
    210220      object pnlFields: TPanel
     
    295305          Font.Charset = DEFAULT_CHARSET
    296306          Font.Color = clWindowText
    297           Font.Height = -11
     307          Font.Height = -12
    298308          Font.Name = 'MS Sans Serif'
    299309          Font.Style = []
     
    335345      Top = 0
    336346      Width = 611
    337       Height = 340
     347      Height = 519
    338348      Align = alClient
    339349      BevelOuter = bvNone
    340350      TabOrder = 0
    341351      OnExit = pnlReadExit
     352      ExplicitHeight = 499
    342353      object lblTitle: TOROffsetLabel
    343354        Left = 0
     
    354365      object sptList: TSplitter
    355366        Left = 0
    356         Top = 113
     367        Top = 19
    357368        Width = 611
    358369        Height = 3
    359370        Cursor = crVSplit
    360371        Align = alTop
     372        ExplicitTop = 113
    361373      end
    362374      object memNote: TRichEdit
     
    364376        Top = 116
    365377        Width = 611
    366         Height = 224
     378        Height = 403
    367379        Align = alClient
    368380        Color = clCream
     
    385397        TabOrder = 1
    386398        WordWrap = False
     399        ExplicitHeight = 383
    387400      end
    388401      object lvNotes: TCaptionListView
    389402        Left = 0
    390         Top = 19
     403        Top = 22
    391404        Width = 611
    392405        Height = 94
     
    860873      OnClick = popNoteMemoGrammarClick
    861874    end
     875    object popNoteMemoSpellOpenSource: TMenuItem
     876      Caption = 'Chec&k Spelling (OpenSource based)'
     877      ShortCut = 118
     878      OnClick = popNoteMemoSpellClick
     879    end
    862880    object popNoteMemoSpell: TMenuItem
    863       Caption = 'C&heck Spelling'
     881      Caption = 'C&heck Spelling (MS Office based)'
    864882      OnClick = popNoteMemoSpellClick
    865883    end
  • cprs/branches/HealthSevak-CPRS/CPRS-Chart/fNotes.pas

    r830 r1703  
    99  uPCE, ORClasses, fDrawers, ImgList, rTIU, uTIU, uDocTree, fRptBox, fPrintList,
    1010  fNoteST, ORNet, fNoteSTStop, fBase508Form, VA508AccessibilityManager,
    11   VA508ImageListLabeler;
     11  VA508ImageListLabeler, RichEdit;
    1212
    1313type
     
    153153    imgLblNotes: TVA508ImageListLabeler;
    154154    imgLblImages: TVA508ImageListLabeler;
     155    popNoteMemoSpellOpenSource: TMenuItem; //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine
    155156    procedure mnuChartTabClick(Sender: TObject);
    156157    procedure lstNotesClick(Sender: TObject);
     
    416417  uChanging: Boolean;
    417418  uIDNotesActive: Boolean;
     419  NoteTotal: string;
    418420
    419421
     
    453455                 frmRemDlg.btnCancelClick(Self);
    454456               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;
    455467           end;
    456468    end;
     
    466478      '0': begin
    467479             if WhyNot = 'COMMIT' then FSilent := True;
    468              SaveCurrentNote(Result)
     480             SaveCurrentNote(Result);
    469481           end;
    470482    end;
     
    529541  uPCEEdit.Clear;
    530542  frmDrawers.ResetTemplates;
     543  NoteTotal := sCallV('ORCNOTE GET TOTAL', [Patient.DFN]);
    531544end;
    532545
     
    546559    FCurrentContext := FDefaultContext;
    547560    popNoteMemoSpell.Visible   := SpellCheckAvailable;
     561    popNoteMemoSpellOpenSource.Visible   := SpellCheckAvailable;  //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine
    548562    popNoteMemoGrammar.Visible := popNoteMemoSpell.Visible;
    549563    Z11.Visible                := popNoteMemoSpell.Visible;
     
    592606begin
    593607  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}
    602623end;
    603624
     
    649670  // clear the editing controls (also clear the new labels?)
    650671  txtSubject.Text := '';
    651   //lblNotes.Caption := '';
     672  lblNotes.Caption := '';
    652673  SearchTextStopFlag := false;
    653674  if memNewNote <> nil then memNewNote.Clear; //CQ7012 Added test for nil
     
    703724          EnableList := [odTemplates]
    704725        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;
    707736      end
    708737      else
     
    13591388  if(assigned(frmReminderTree)) then
    13601389    frmReminderTree.EnableActions;
    1361   DisplayPCE; 
     1390  DisplayPCE;
    13621391  pnlRight.Refresh;
    13631392  memNewNote.Repaint;
     
    13731402  inherited;
    13741403  mnuActNewClick(Self);
    1375  end;
     1404end;
    13761405
    13771406procedure TfrmNotes.cmdPCEClick(Sender: TObject);
     
    14841513          if not NoteEmpty then
    14851514//            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)
    14871517              then memNewNote.Lines.Clear;
    14881518        end;
     
    16591689  NC_SEARCHTEXT: begin;
    16601690                   SearchTextStopFlag := False;
    1661                    SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt );
     1691                   SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt, StringReplace(TMenuItem(Sender).Caption, '&', '', [rfReplaceAll]) );
    16621692                   with SearchCtxt do if Changed then
    16631693                   begin
     
    17431773    lblNotes.Caption := 'Search for "'+FCurrentContext.SearchString+'" was stopped!';
    17441774  end;
     1775  //Clear the search text. We are done searching
     1776  FCurrentContext.SearchString := '';
    17451777  frmSearchStop.Hide;
    17461778  // Text Search CQ: HDS00002856 --------------------
     1779  lblNotes.Caption := lblNotes.Caption + ' (Total: ' + NoteTotal + ')';
    17471780  lblNotes.hint := lblNotes.Caption;
    17481781  tvNotes.Caption := lblNotes.Caption;
     
    19842017  inherited;
    19852018  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;
    19862024  ActOnDocument(ActionSts, lstNotes.ItemIEN, 'DELETE RECORD');
    19872025  if ShowMsgOn(not ActionSts.Success, ActionSts.Reason, TX_IN_AUTH) then Exit;
     
    23222360  begin
    23232361    popNoteMemoSpell.Enabled    := True;
     2362    popNoteMemoSpellOpenSource.Enabled   := True;  //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine
    23242363    popNoteMemoGrammar.Enabled  := True;
    23252364    popNoteMemoReformat.Enabled := True;
     
    23312370  begin
    23322371    popNoteMemoSpell.Enabled    := False;
     2372    popNoteMemoSpellOpenSource.Enabled    := False; //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine
    23332373    popNoteMemoGrammar.Enabled  := False;
    23342374    popNoteMemoReformat.Enabled := False;
     
    23552395begin
    23562396  inherited;
    2357   FEditCtrl.SelText := Clipboard.AsText; {*KCM*}
     2397  Sendmessage(FEditCtrl.Handle,EM_PASTESPECIAL,CF_TEXT,0);
    23582398  frmNotes.pnlWriteResize(Self);
    23592399  //FEditCtrl.PasteFromClipboard;        // use AsText to prevent formatting
     
    24372477  timAutoSave.Enabled := False;
    24382478  try
    2439     SpellCheckForControl(memNewNote);
     2479    SpellCheckForControl(memNewNote, Sender = popNoteMemoSpellOpenSource);  //WordVisTA@SK_Arora@HealthSevak to implement OpenSource SpellCheck Engine
    24402480  finally
    24412481    FChanged := True;
     
    29452985              end;
    29462986            Dest.Free;
    2947           end;
     2987          end else
     2988          //Reset the caption
     2989          lblNotes.Caption := SetNoteTreeLabel(FCurrentContext);
     2990
    29482991        // Text Search CQ: HDS00002856 ---------------------------------------
    29492992
Note: See TracChangeset for help on using the changeset viewer.