Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/fNotes.pas

    r830 r1679  
    99  uPCE, ORClasses, fDrawers, ImgList, rTIU, uTIU, uDocTree, fRptBox, fPrintList,
    1010  fNoteST, ORNet, fNoteSTStop, fBase508Form, VA508AccessibilityManager,
    11   VA508ImageListLabeler;
     11  VA508ImageListLabeler, RichEdit;
    1212
    1313type
     
    416416  uChanging: Boolean;
    417417  uIDNotesActive: Boolean;
     418  NoteTotal: string;
    418419
    419420
     
    453454                 frmRemDlg.btnCancelClick(Self);
    454455               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;
    455466           end;
    456467    end;
     
    466477      '0': begin
    467478             if WhyNot = 'COMMIT' then FSilent := True;
    468              SaveCurrentNote(Result)
     479             SaveCurrentNote(Result);
    469480           end;
    470481    end;
     
    529540  uPCEEdit.Clear;
    530541  frmDrawers.ResetTemplates;
     542  NoteTotal := sCallV('ORCNOTE GET TOTAL', [Patient.DFN]);
    531543end;
    532544
     
    592604begin
    593605  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}
    602621end;
    603622
     
    649668  // clear the editing controls (also clear the new labels?)
    650669  txtSubject.Text := '';
    651   //lblNotes.Caption := '';
     670  lblNotes.Caption := '';
    652671  SearchTextStopFlag := false;
    653672  if memNewNote <> nil then memNewNote.Clear; //CQ7012 Added test for nil
     
    703722          EnableList := [odTemplates]
    704723        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;
    707734      end
    708735      else
     
    13591386  if(assigned(frmReminderTree)) then
    13601387    frmReminderTree.EnableActions;
    1361   DisplayPCE; 
     1388  DisplayPCE;
    13621389  pnlRight.Refresh;
    13631390  memNewNote.Repaint;
     
    13731400  inherited;
    13741401  mnuActNewClick(Self);
    1375  end;
     1402end;
    13761403
    13771404procedure TfrmNotes.cmdPCEClick(Sender: TObject);
     
    14841511          if not NoteEmpty then
    14851512//            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)
    14871515              then memNewNote.Lines.Clear;
    14881516        end;
     
    16591687  NC_SEARCHTEXT: begin;
    16601688                   SearchTextStopFlag := False;
    1661                    SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt );
     1689                   SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt, StringReplace(TMenuItem(Sender).Caption, '&', '', [rfReplaceAll]) );
    16621690                   with SearchCtxt do if Changed then
    16631691                   begin
     
    17431771    lblNotes.Caption := 'Search for "'+FCurrentContext.SearchString+'" was stopped!';
    17441772  end;
     1773  //Clear the search text. We are done searching
     1774  FCurrentContext.SearchString := '';
    17451775  frmSearchStop.Hide;
    17461776  // Text Search CQ: HDS00002856 --------------------
     1777  lblNotes.Caption := lblNotes.Caption + ' (Total: ' + NoteTotal + ')';
    17471778  lblNotes.hint := lblNotes.Caption;
    17481779  tvNotes.Caption := lblNotes.Caption;
     
    19842015  inherited;
    19852016  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;
    19862022  ActOnDocument(ActionSts, lstNotes.ItemIEN, 'DELETE RECORD');
    19872023  if ShowMsgOn(not ActionSts.Success, ActionSts.Reason, TX_IN_AUTH) then Exit;
     
    23552391begin
    23562392  inherited;
    2357   FEditCtrl.SelText := Clipboard.AsText; {*KCM*}
     2393  Sendmessage(FEditCtrl.Handle,EM_PASTESPECIAL,CF_TEXT,0);
    23582394  frmNotes.pnlWriteResize(Self);
    23592395  //FEditCtrl.PasteFromClipboard;        // use AsText to prevent formatting
     
    29452981              end;
    29462982            Dest.Free;
    2947           end;
     2983          end else
     2984          //Reset the caption
     2985          lblNotes.Caption := SetNoteTreeLabel(FCurrentContext);
     2986
    29482987        // Text Search CQ: HDS00002856 ---------------------------------------
    29492988
Note: See TracChangeset for help on using the changeset viewer.