Procedure

TfrmDCSumm.cmdChangeClick

Module

fDCSumm

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public/Published

Owner

TfrmDCSumm

Declaration

procedure cmdChangeClick(Sender: TObject);

Calls Hierarchy


TfrmDCSumm.cmdChangeClick
 ├ExecuteDCSummProperties
 │ ├TfrmBase508Form.Create
 │ │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ │ ├UnfocusableControlEnter
 │ │ └AdjustControls
 │ │   ├TfrmBase508Form.ModifyUnfocusableControl
 │ │   └..(rec)..
 │ ├ListDCSummTitlesShort
 │ │ └LoadDCSummTitles
 │ │   └TDCSummTitles.Create
 │ ├LoadDCUrgencies
 │ ├TfrmDCSummProperties.ShowAdmissionList
 │ │ └ListAdmitAll
 │ ├PrintNameForTitle
 │ ├StrToFMDateTime
 │ ├GetDischargeDate
 │ ├FMNow
 │ └GetTIUListItem
 ├TChanges.ReplaceSignState
 ├MakeDCSummDisplayText
 ├TChanges.ReplaceText
 ├TfrmDCSumm.GetTitleText
 └TfrmDCSumm.mnuActLoadBoilerClick
   ├TfrmDCSumm.NoSummSelected
   ├LoadBoilerPlate
   ├GetLinkedTemplate
   │ ├GetLinkedTemplateData
   │ └AddTemplate
   │   ├TTemplate.Create
   │   │ └TTemplate.ReminderDialogIEN
   │   └TTemplate.AddChild
   │     └TTemplate.GetItems
   │       └ExpandTemplate
   │         ├TTemplate.GetChildren
   │         ├GetTemplateChildren
   │         ├AddTemplate...
   │         └TTemplate.ItemIENs
   │           └TTemplate.GetItems...
   ├MakeXMLParamTIU
   │ └ExternalName
   ├AssignBoilerText
   │ └QuickCopyWith508Msg
   │   └SpeakTextInserted
   ├QueryBoilerPlate
   │ └TfrmBase508Form.Create...
   └QuickAddWith508Msg
     └SpeakTextInserted

Called-By Hierarchy


                                             TfrmDCSumm.cmdChangeClick
                                            TfrmDCSumm.InsertNewSumm┤ 
                                         TfrmDCSumm.mnuActNewClick┤ │ 
                                      TfrmDCSumm.cmdNewSummClick┘ │ │ 
                                  TfrmDCSumm.mnuActAddIDEntryClick┘ │ 
                                           TfrmDCSumm.InsertAddendum┤ 
                                      TfrmDCSumm.mnuActAddendClick┘ │ 
                                              TfrmDCSumm.LoadForEdit┤ 
                                       TfrmDCSumm.InsertNewSumm...┤ │ 
                                        TfrmDCSumm.mnuActEditClick┘ │ 
                                           TfrmDCSumm.SaveEditedSumm┤ 
                                        TfrmDCSumm.SaveCurrentSumm┘ │ 
                                   TfrmDCSumm.AllowContextChange┤   │ 
                               TfrmFrame.AllowContextChangeAll┘ │   │ 
                                    TfrmFrame.FormCloseQuery┤   │   │ 
                                  TfrmFrame.mnuFileNextClick┤   │   │ 
                                TfrmFrame.mnuFileOpenClick┤ │   │   │ 
                                    TfrmFrame.UMInitiate┤ │ │   │   │ 
                           TfrmFrame.mnuFileNextClick...┤ │ │   │   │ 
                           TfrmFrame.mnuFileRefreshClick┤ │ │   │   │ 
                           TfrmOrders.CheckOrderStatus┤ │ │ │   │   │ 
                       TfrmOrders.mnuActChgEvntClick┤ │ │ │ │   │   │ 
                          TfrmOrders.mnuActHoldClick┤ │ │ │ │   │   │ 
                        TfrmOrders.mnuActUnholdClick┤ │ │ │ │   │   │ 
                         TfrmOrders.mnuActRenewClick┤ │ │ │ │   │   │ 
                        TfrmOrders.mnuActChangeClick┤ │ │ │ │   │   │ 
                          TfrmOrders.mnuActCopyClick┘ │ │ │ │   │   │ 
                                TfrmMeds.mnuActDCClick┤ │ │ │   │   │ 
                               TfrmMeds.CheckMedStatus┘ │ │ │   │   │ 
                            TfrmMeds.mnuActHoldClick┤   │ │ │   │   │ 
                           TfrmMeds.mnuActRenewClick┤   │ │ │   │   │ 
                          TfrmMeds.mnuActUnholdClick┤   │ │ │   │   │ 
                          TfrmMeds.mnuActChangeClick┤   │ │ │   │   │ 
                            TfrmMeds.mnuActCopyClick┤   │ │ │   │   │ 
                          TfrmMeds.mnuActRefillClick┘   │ │ │   │   │ 
                                      TfrmFrame.ViewInfo┘ │ │   │   │ 
                                   TfrmDCSumm.ViewInfo┤   │ │   │   │ 
                                 TfrmConsults.ViewInfo┤   │ │   │   │ 
                         TfrmFrame.pnlRemindersMouseUp┤   │ │   │   │ 
                          TfrmFrame.RemindersChanged┘ │   │ │   │   │ 
                              TfrmFrame.FormCreate┘   │   │ │   │   │ 
                                TfrmFrame.pnlCIRNClick┤   │ │   │   │ 
                          TfrmFrame.pnlVistaWebClick┤ │   │ │   │   │ 
                               TfrmFrame.FormKeyDown┘ │   │ │   │   │ 
                             TfrmFrame.pnlPatientClick┤   │ │   │   │ 
                               TfrmFrame.pnlVisitClick┤   │ │   │   │ 
                         TfrmFrame.pnlPrimaryCareClick┤   │ │   │   │ 
                           TfrmFrame.pnlRemindersClick┤   │ │   │   │ 
                            TfrmFrame.pnlPostingsClick┤   │ │   │   │ 
                                TfrmFrame.pnlFlagClick┤   │ │   │   │ 
                                  TfrmFrame.laMHVClick┤   │ │   │   │ 
                                 TfrmFrame.laVAA2Click┤   │ │   │   │ 
                                   TfrmOrders.ViewInfo┤   │ │   │   │ 
                                     TfrmMeds.ViewInfo┤   │ │   │   │ 
                                  TfrmSurgery.ViewInfo┤   │ │   │   │ 
                                    TfrmNotes.ViewInfo┤   │ │   │   │ 
                                 TfrmProblems.ViewInfo┘   │ │   │   │ 
                         TfrmFrame.mnuFileNotifRemoveClick┤ │   │   │ 
                                 TfrmFrame.NextButtonClick┘ │   │   │ 
                               TfrmFrame.SetUpNextButton┘   │   │   │ 
                         TfrmFrame.mnuFileOpenClick...┤     │   │   │ 
                                  TfrmFrame.FormResize┘     │   │   │ 
                                TfrmFrame.ChangeFont┘       │   │   │ 
                        TfrmFrame.LoadSizesForUser┤         │   │   │ 
                   TfrmFrame.LoadUserPreferences┘ │         │   │   │ 
                          TfrmFrame.UMInitiate┘   │         │   │   │ 
                        TfrmFrame.mnuFontSizeClick┘         │   │   │ 
                               TfrmFrame.mnuFileOpenClick...┤   │   │ 
                               TfrmFrame.ctxContextorPending┤   │   │ 
                              TfrmFrame.StartCCOWContextor┘ │   │   │ 
                                    TfrmFrame.FormCreate┘   │   │   │ 
                             TfrmFrame.ctxContextorCommitted┤   │   │ 
                           TfrmFrame.StartCCOWContextor...┘ │   │   │ 
                      TfrmFrame.mnuFileResumeContextGetClick┤   │   │ 
                      TfrmFrame.mnuFileResumeContextSetClick┘   │   │ 
                                      TfrmDCSumm.LstSummsToPrint┤   │ 
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘ │   │ 
                                         TfrmDCSumm.RequestPrint┤   │ 
                                   TfrmFrame.mnuFilePrintClick┘ │   │ 
                                     TfrmDCSumm.InsertNewSumm...┤   │ 
                                         TfrmDCSumm.mnuViewClick┤   │ 
                                     TfrmDCSumm.SetViewContext┤ │   │ 
                                      TfrmDCSumm.DisplayPage┤ │ │   │ 
                      TfrmDCSumm.mnuViewReturntoDefaultClick┘ │ │   │ 
                          TfrmDCSumm.mnuViewSaveAsDefaultClick┘ │   │ 
                                         TfrmDCSumm.StartNewEdit┤   │ 
                                  TfrmDCSumm.mnuActNewClick...┤ │   │ 
                              TfrmDCSumm.mnuActAddIDEntryClick┤ │   │ 
                                  TfrmDCSumm.mnuActAddendClick┤ │   │ 
                                    TfrmDCSumm.mnuActEditClick┘ │   │ 
                        TfrmDCSumm.mnuActDetachFromIDParentClick┤   │ 
                                    TfrmDCSumm.mnuActDeleteClick┤   │ 
                                  TfrmDCSumm.SaveEditedSumm...┘ │   │ 
                                      TfrmDCSumm.mnuActSaveClick┤   │ 
                                      TfrmDCSumm.mnuActSignClick┤   │ 
                                         TfrmDCSumm.SaveSignItem┤   │ 
                                         TfrmReview.cmdOKClick┘ │   │ 
                                               ReviewChanges┘   │   │ 
                        TfrmFrame.AllowContextChangeAll...┤     │   │ 
                                  TfrmFrame.FormCloseQuery┤     │   │ 
                              TfrmFrame.mnuFileReviewClick┤     │   │ 
                                           UpdateEncounter┘     │   │ 
                         TfrmFrame.mnuFileEncounterClick┤       │   │ 
                                 TfrmFrame.ViewInfo...┤ │       │   │ 
                    TfrmODMedIV.SetValuesFromResponses┤ │       │   │ 
                             TfrmODMedIV.SetupDialog┤ │ │       │   │ 
                   TfrmODMedIV.cboSolutionMouseClick┘ │ │       │   │ 
                       TfrmODMedIV.cboSolutionExit┘   │ │       │   │ 
                  TfrmODMedIV.cboSolutionMouseClick...┤ │       │   │ 
                     TfrmODMedIV.cboAdditiveMouseClick┤ │       │   │ 
                         TfrmODMedIV.cboAdditiveExit┘ │ │       │   │ 
                                TfrmODAuto.SetupDialog┤ │       │   │ 
                                   ActivateOrderDialog┤ │       │   │ 
                           TfrmRemDlg.btnFinishClick┤ │ │       │   │ 
           TfrmConsults.mnuActNewConsultRequestClick┤ │ │       │   │ 
                   TfrmConsults.cmdNewConsultClick┘ │ │ │       │   │ 
                TfrmConsults.mnuActNewProcedureClick┤ │ │       │   │ 
                      TfrmConsults.cmdNewProcClick┘ │ │ │       │   │ 
                                        ChangeOrders┤ │ │       │   │ 
                      TfrmOrders.mnuActChangeClick┤ │ │ │       │   │ 
                        TfrmMeds.mnuActChangeClick┘ │ │ │       │   │ 
                                     ChangeOrdersEvt┤ │ │       │   │ 
                                          CopyOrders┤ │ │       │   │ 
                        TfrmOrders.mnuActCopyClick┤ │ │ │       │   │ 
                          TfrmMeds.mnuActCopyClick┤ │ │ │       │   │ 
                           TfrmODActive.btnOKClick┘ │ │ │       │   │ 
                                      TransferOrders┤ │ │       │   │ 
                        TfrmOrders.mnuActCopyClick┤ │ │ │       │   │ 
                          TfrmMeds.mnuActCopyClick┤ │ │ │       │   │ 
                           TfrmODActive.btnOKClick┘ │ │ │       │   │ 
                            TfrmOrders.lstWriteClick┤ │ │       │   │ 
               TfrmOrders.PlaceOrderForDefaultDialog┤ │ │       │   │ 
                  TfrmOrders.DisplayDefaultDlgList┤ │ │ │       │   │ 
                       TfrmOrders.ResetOrderPage┘ │ │ │ │       │   │ 
               TfrmOrders.btnDelayedOrderClick┘   │ │ │ │       │   │ 
                                 DisplayEvntDialog┤ │ │ │       │   │ 
                             SetDelayEventForMed┘ │ │ │ │       │   │ 
                      TfrmMeds.mnuActCopyClick┘   │ │ │ │       │   │ 
                                 DisplayEvntDialog┤ │ │ │       │   │ 
                                  SetViewForCopy┘ │ │ │ │       │   │ 
                    TfrmOrders.mnuActCopyClick┘   │ │ │ │       │   │ 
                                 DisplayEvntDialog┘ │ │ │       │   │ 
                                ExecuteChangeEvt┘   │ │ │       │   │ 
                 TfrmOrders.mnuActChgEvntClick┘     │ │ │       │   │ 
                             TfrmMeds.mnuActNewClick┤ │ │       │   │ 
                           TfrmOMNavA.ActivateDialog┤ │ │       │   │ 
                         TfrmOMNavA.grdMenuKeyDown┤ │ │ │       │   │ 
                         TfrmOMNavA.grdMenuMouseUp┘ │ │ │       │   │ 
                                TfrmOMSet.DoNextItem┘ │ │       │   │ 
                              TfrmOMSet.InsertList┤   │ │       │   │ 
                               ActivateOrderList┘ │   │ │       │   │ 
                     TfrmRemDlg.btnFinishClick┤   │   │ │       │   │ 
                             ActivateOrderHTML┤   │   │ │       │   │ 
                    TfrmOrders.lstWriteClick┤ │   │   │ │       │   │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │   │ │       │   │ 
                              ActivateOrderSet┤   │   │ │       │   │ 
                   TfrmRemDlg.btnFinishClick┤ │   │   │ │       │   │ 
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │   │ │       │   │ 
     TfrmConsults.mnuActNewProcedureClick...┤ │   │   │ │       │   │ 
                    TfrmOrders.lstWriteClick┤ │   │   │ │       │   │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │   │ │       │   │ 
                     TfrmMeds.mnuActNewClick┤ │   │   │ │       │   │ 
                TfrmOMNavA.ActivateDialog...┤ │   │   │ │       │   │ 
                     TfrmOMSet.DoNextItem...┘ │   │   │ │       │   │ 
                       TfrmOMNavA.DoSelectList┘   │   │ │       │   │ 
                     TfrmOMNavA.grdMenuKeyUp┤     │   │ │       │   │ 
                   TfrmOMNavA.grdMenuMouseUp┘     │   │ │       │   │ 
                                        SkipToNext┤   │ │       │   │ 
                         TfrmOMSet.DoNextItem...┘ │   │ │       │   │ 
                            TfrmOMSet.UMDelayEvent┘   │ │       │   │ 
                               TfrmOMSet.InsertList...┤ │       │   │ 
                                TfrmODMeds.SetupDialog┤ │       │   │ 
                             TfrmODMeds.btnSelectClick┤ │       │   │ 
                             TfrmODMeds.UMDelayClick┘ │ │       │   │ 
                                    ExecuteRenewOrders┘ │       │   │ 
                         TfrmOrders.mnuActRenewClick┤   │       │   │ 
                           TfrmMeds.mnuActRenewClick┘   │       │   │ 
                                        EncounterPresent┤       │   │ 
                                      ReadyForNewOrder┤ │       │   │ 
                           TfrmRemDlg.btnFinishClick┤ │ │       │   │ 
        TfrmConsults.mnuActNewConsultRequestClick...┤ │ │       │   │ 
             TfrmConsults.mnuActNewProcedureClick...┤ │ │       │   │ 
                                     ChangeOrders...┤ │ │       │   │ 
                                     ChangeOrdersEvt┤ │ │       │   │ 
                                       CopyOrders...┤ │ │       │   │ 
                                   TransferOrders...┤ │ │       │   │ 
                            TfrmOrders.lstWriteClick┤ │ │       │   │ 
                             TfrmMeds.mnuActNewClick┘ │ │       │   │ 
                                     ReadyForNewOrder1┤ │       │   │ 
            TfrmOrders.PlaceOrderForDefaultDialog...┘ │ │       │   │ 
                              TfrmOrders.mnuActDCClick┤ │       │   │ 
                             TfrmOrders.mnuActRelClick┤ │       │   │ 
                            TfrmOrders.mnuActHoldClick┤ │       │   │ 
                          TfrmOrders.mnuActUnholdClick┤ │       │   │ 
                           TfrmOrders.mnuActRenewClick┤ │       │   │ 
                         TfrmOrders.mnuActReleaseClick┤ │       │   │ 
                         TfrmOrders.mnuActOnChartClick┤ │       │   │ 
                            TfrmOrders.mnuActSignClick┤ │       │   │ 
                                TfrmMeds.mnuActDCClick┤ │       │   │ 
                              TfrmMeds.mnuActHoldClick┤ │       │   │ 
                             TfrmMeds.mnuActRenewClick┤ │       │   │ 
                            TfrmMeds.mnuActUnholdClick┤ │       │   │ 
                              TfrmMeds.mnuActCopyClick┤ │       │   │ 
                            TfrmMeds.mnuActRefillClick┘ │       │   │ 
                                     EncounterPresentEDO┤       │   │ 
                                   ReadyForNewOrder...┤ │       │   │ 
                         TfrmOrders.mnuActChgEvntClick┤ │       │   │ 
                          TfrmOrders.mnuActChangeClick┤ │       │   │ 
                            TfrmOrders.mnuActCopyClick┤ │       │   │ 
                       TfrmOrders.btnDelayedOrderClick┤ │       │   │ 
                            TfrmMeds.mnuActChangeClick┤ │       │   │ 
                              TfrmMeds.mnuActCopyClick┘ │       │   │ 
                                             UpdateVisit┤       │   │ 
                                           EditPCEData┤ │       │   │ 
                             TfrmSurgery.cmdPCEClick┤ │ │       │   │ 
                                 UpdateEncounterInfo┘ │ │       │   │ 
                             TfrmNotes.cmdPCEClick┘   │ │       │   │ 
                        TfrmVitals.btnEnterVitalsClick┘ │       │   │ 
                                             UpdateVisit┤       │   │ 
                                        EncounterPresent┘       │   │ 
                         TfrmProblems.lstProbActsClick┘         │   │ 
                     TfrmProblems.wgProbDataDblClick┤           │   │ 
                           TfrmProblems.lstViewClick┘           │   │ 
                   TfrmProblems.HighlightDuplicate┘             │   │ 
                         TfrmProblems.AddProblem┤               │   │ 
              TfrmProblems.lstProbActsClick...┤ │               │   │ 
                 TfrmProblems.lstProbPickClick┤ │               │   │ 
              TfrmProblems.lstProbPickDblClick┤ │               │   │ 
              TfrmProblems.edProbEntKeyPress┘ │ │               │   │ 
                      TfrmProblems.UMPLLexicon┘ │               │   │ 
                   TfrmdlgProb.bbChangeProbClick┘               │   │ 
                                            TfrmDCSumm.FormClose┤   │ 
                       TfrmDCSumm.mnuActIdentifyAddlSignersClick┤   │ 
                           TfrmDCSumm.popSummMemoAddlSignClick┘ │   │ 
                                 TfrmDCSumm.ProcessNotifications┤   │ 
                                        TfrmDCSumm.DisplayPage┘ │   │ 
                                    TfrmDCSumm.SetViewContext...┤   │ 
                                      TfrmDCSumm.tvSummsDragDrop┤   │ 
                                     TfrmDCSumm.tvSummsStartDrag┤   │ 
                          TfrmDCSumm.mnuActAttachtoIDParentClick┘   │ 
                                        TfrmDCSumm.mnuActChangeClick┘ 

Calls

Name Declaration Comments
ExecuteDCSummProperties function ExecuteDCSummProperties(var ASumm: TEditDCSummRec; var ListBoxItem: string; ShowAdmissions, IDNoteTitlesOnly: boolean): Boolean; -
TfrmDCSumm.GetTitleText function GetTitleText(AnIndex: Integer): string; -
MakeDCSummDisplayText function MakeDCSummDisplayText(RawText: string): string; -
TfrmDCSumm.mnuActLoadBoilerClick procedure mnuActLoadBoilerClick(Sender: TObject); -
TChanges.ReplaceSignState procedure ReplaceSignState(ItemType: Integer; const AnID: string; NewState: Integer); -
TChanges.ReplaceText procedure ReplaceText(ItemType: Integer; const AnID, NewText: string); -

Called-By

Name Declaration Comments
TfrmDCSumm.InsertAddendum procedure InsertAddendum; -
TfrmDCSumm.InsertNewSumm procedure InsertNewSumm(IsIDChild: boolean; AnIDParent: integer); -
TfrmDCSumm.LoadForEdit procedure LoadForEdit(PreserveValues: Boolean); -
TfrmDCSumm.mnuActChangeClick procedure mnuActChangeClick(Sender: TObject); -
TfrmDCSumm.SaveEditedSumm procedure SaveEditedSumm(var Saved: Boolean); -


Source

2436  procedure TfrmDCSumm.cmdChangeClick(Sender: TObject);
2437  var
2438    LastTitle: Integer;
2439    OKPressed, IsIDChild: Boolean;
2440    x: string;
2441    ListItemForEdit: string;
2442  begin
2443    inherited;
2444    IsIDChild := uIDNotesActive and (FEditDCSumm.IDParent > 0);
2445    LastTitle   := FEditDCSumm.Title;
2446    if Sender <> Self then
2447      begin
2448        FShowAdmissions := False;
2449        OKPressed := ExecuteDCSummProperties(FEditDCSumm, ListItemForEdit, FShowAdmissions, IsIDChild);
2450      end
2451    else
2452      OKPressed := True;
2453    if not OKPressed then Exit;
2454    // update display fields & uPCEEdit
2455    lblNewTitle.Caption := ' ' + FEditDCSumm.TitleName + ' ';
2456    if (FEditDCSumm.Addend > 0)  and (CompareText(Copy(lblNewTitle.Caption, 2, 8), 'Addendum') <> 0) then
2457      lblNewTitle.Caption := 'Addendum to: ' + lblNewTitle.Caption;
2458    with lblNewTitle do bvlNewTitle.SetBounds(Left - 1, Top - 1, Width + 2, Height + 2);
2459    lblRefDate.Caption := FormatFMDateTime('mmm dd,yyyy@hh:nn', FEditDCSumm.DischargeDateTime);
2460    lblDictator.Caption  := FEditDCSumm.DictatorName;
2461    x := 'Adm: ' + FormatFMDateTime('mm/dd/yy', FEditDCSumm.AdmitDateTime) + '  ' + FEditDCSumm.LocationName;
2462    lblVisit.Caption   := x;
2463    x := '  Dis: ' + FormatFMDateTime('mm/dd/yy', FEditDCSumm.DischargeDateTime);
2464    lblDischarge.Caption := x;
2465    if Length(FEditDCSumm.AttendingName) > 0
2466      then lblCosigner.Caption := 'Attending: ' + FEditDCSumm.AttendingName
2467      else lblCosigner.Caption := '';
2468    uPCEEdit.NoteTitle  := FEditDCSumm.Title;
2469    // modify signature requirements if author or cosigner changed
2470    if (User.DUZ <> FEditDCSumm.Dictator) and (User.DUZ <> FEditDCSumm.Attending)
2471      then Changes.ReplaceSignState(CH_SUM, lstSumms.ItemID, CH_SIGN_NA)
2472      else Changes.ReplaceSignState(CH_SUM, lstSumms.ItemID, CH_SIGN_YES);
2473    x := lstSumms.Items[EditingIndex];
2474    SetPiece(x, U, 2, lblNewTitle.Caption);
2475    SetPiece(x, U, 3, FloatToStr(FEditDCSumm.DischargeDateTime));
2476    tvSumms.Selected.Text := MakeDCSummDisplayText(x);
2477    TORTreeNode(tvSumms.Selected).StringData := x;
2478    lstSumms.Items[EditingIndex] := x;
2479    Changes.ReplaceText(CH_SUM, lstSumms.ItemID, GetTitleText(EditingIndex));
2480    if LastTitle <> FEditDCSumm.Title then mnuActLoadBoilerClick(Self);
2481  end;