Procedure

TfrmDCSumm.mnuViewClick

Module

fDCSumm

Last Modified

7/15/2014 3:26:36 PM

Comments

View menu events ------------------------------------------------------------------------- 

 changes the list of Summs available for viewing

Visibility

Public/Published

Owner

TfrmDCSumm

Declaration

procedure mnuViewClick(Sender: TObject);

Calls Hierarchy


TfrmDCSumm.mnuViewClick
 ├TfrmDCSumm.SaveCurrentSumm
 │ └TfrmDCSumm.SaveEditedSumm
 │   ├TfrmDCSumm.tvSummsChange
 │   │ ├CanBeAttached
 │   │ ├CanReceiveAttachment
 │   │ ├TraverseTree
 │   │ │ ├ContextMatch
 │   │ │ ├TextFound
 │   │ │ ├AddListViewItem
 │   │ │ └..(rec)..
 │   │ ├TfrmDCSumm.lvSummsSelectItem
 │   │ │ └TfrmDCSumm.lstSummsClick
 │   │ │   ├MakeDCSummDisplayText
 │   │ │   ├LoadDocumentText
 │   │ │   ├TfrmDCSumm.DisplayPCE
 │   │ │   │ ├TPCEData.AddStrData
 │   │ │   │ │ ├Add
 │   │ │   │ │ ├TPCEData.StrVisitType
 │   │ │   │ │ │ ├GetPCEDataText
 │   │ │   │ │ │ │ └GetDiagnosisText
 │   │ │   │ │ │ ├TPCEProc.ModText
 │   │ │   │ │ │ │ └ModifierName
 │   │ │   │ │ │ │   └ModifierIdx
 │   │ │   │ │ │ │     ├TPCEData.VisitDateTime
 │   │ │   │ │ │ │     │ └TPCEData.IsSecondaryVisit
 │   │ │   │ │ │ │     ├FMToday
 │   │ │   │ │ │ │     │ └FMNow
 │   │ │   │ │ │ │     └MixedCaseModifier
 │   │ │   │ │ │ └TPCEData.StrVisitType
 │   │ │   │ │ │   └AddTxt
 │   │ │   │ │ ├TPCEData.StrDiagnoses
 │   │ │   │ │ │ └GetPCEDataText...
 │   │ │   │ │ ├TPCEData.StrProcedures
 │   │ │   │ │ │ ├GetPCEDataText...
 │   │ │   │ │ │ └TPCEProc.ModText...
 │   │ │   │ │ ├TPCEData.StrImmunizations
 │   │ │   │ │ │ └GetPCEDataText...
 │   │ │   │ │ ├TPCEData.StrSkinTests
 │   │ │   │ │ │ └GetPCEDataText...
 │   │ │   │ │ ├TPCEData.StrPatientEds
 │   │ │   │ │ │ └GetPCEDataText...
 │   │ │   │ │ ├TPCEData.StrHealthFactors
 │   │ │   │ │ │ └GetPCEDataText...
 │   │ │   │ │ └TPCEData.StrExams
 │   │ │   │ │   └GetPCEDataText...
 │   │ │   │ ├GetVitalsFromDate
 │   │ │   │ │ ├TPCEData.IsSecondaryVisit
 │   │ │   │ │ └GetVitalsFromEncDateTime
 │   │ │   │ ├TPCEData.AddVitalData
 │   │ │   │ │ └FormatVitalForNote
 │   │ │   │ │   └ConvertVitalData
 │   │ │   │ ├CanEditPCE
 │   │ │   │ │ ├GetAskPCE
 │   │ │   │ │ └FutureEncounter
 │   │ │   │ │   └FMToday...
 │   │ │   │ ├TfrmDCSumm.ShowPCEControls
 │   │ │   │ ├TfrmDrawers.DisplayDrawers
 │   │ │   │ │ └..(rec)..
 │   │ │   │ ├ActOnDocument
 │   │ │   │ ├TPCEData.PCEForNote
 │   │ │   │ │ ├TEncounter.GetVisitStr
 │   │ │   │ │ │ └TEncounter.GetVisitCategory
 │   │ │   │ │ ├VisitStrForNote
 │   │ │   │ │ ├TPCEData.GetVisitString
 │   │ │   │ │ │ └TPCEData.VisitDateTime...
 │   │ │   │ │ ├TPCEData.CopyPCEData
 │   │ │   │ │ │ ├TPCEData.Clear
 │   │ │   │ │ │ │ ├ClearList
 │   │ │   │ │ │ │ ├TPCEProc.Clear
 │   │ │   │ │ │ │ │ └TPCEItem.Clear
 │   │ │   │ │ │ │ │   └TPCEItem.SetComment
 │   │ │   │ │ │ │ └TPCEProviderList.Clear
 │   │ │   │ │ │ │   └TPCEProviderList.GetPrimaryIdx
 │   │ │   │ │ │ ├TPCEProc.CopyProc
 │   │ │   │ │ │ │ └TPCEItem.SetComment
 │   │ │   │ │ │ ├TPCEProviderList.Assign
 │   │ │   │ │ │ └TPCEData.CopyPCEItems
 │   │ │   │ │ │   └TPCEItem.Assign
 │   │ │   │ │ │     └TPCEItem.SetComment
 │   │ │   │ │ ├TPCEData.IsSecondaryVisit
 │   │ │   │ │ ├GetLocSecondaryVisitCode
 │   │ │   │ │ ├TPCEData.Clear...
 │   │ │   │ │ ├LoadPCEDataForNote
 │   │ │   │ │ ├ListVisitTypeByLoc
 │   │ │   │ │ ├SetRPCEncLocation
 │   │ │   │ │ ├SCCValue
 │   │ │   │ │ ├TPCEProviderList.Add
 │   │ │   │ │ │ ├TPCEProviderList.GetPrimaryIdx
 │   │ │   │ │ │ ├TPCEProviderList.IndexOfProvider
 │   │ │   │ │ │ └TPCEProviderList.SetPrimaryIdx
 │   │ │   │ │ │   ├TPCEProviderList.GetPrimaryIdx
 │   │ │   │ │ │   └TPCEProviderList.SetPrimary
 │   │ │   │ │ ├AppendComment
 │   │ │   │ │ ├TPCEDiag.SetFromString
 │   │ │   │ │ │ └TPCEItem.SetFromString
 │   │ │   │ │ │   └TPCEItem.SetComment
 │   │ │   │ │ ├TPCEProc.SetFromString
 │   │ │   │ │ │ └TPCEItem.SetFromString...
 │   │ │   │ │ ├TPCEImm.SetFromString
 │   │ │   │ │ │ └TPCEItem.SetFromString...
 │   │ │   │ │ ├TPCESkin.SetFromString
 │   │ │   │ │ │ ├TPCEItem.SetFromString...
 │   │ │   │ │ │ └StrToFMDateTime
 │   │ │   │ │ ├TPCEPat.SetFromString
 │   │ │   │ │ │ └TPCEItem.SetFromString...
 │   │ │   │ │ ├TPCEHealth.SetFromString
 │   │ │   │ │ │ └TPCEItem.SetFromString...
 │   │ │   │ │ └TPCEExams.SetFromString
 │   │ │   │ │   └TPCEItem.SetFromString...
 │   │ │   │ └GetVitalsFromNote
 │   │ │   │   ├TPCEData.IsSecondaryVisit
 │   │ │   │   ├GetVitalsFromEncDateTime
 │   │ │   │   └GetVitalFromNoteIEN
 │   │ │   └NotifyOtherApps
 │   │ │     ├AppNotificationEnabled
 │   │ │     │ └TNotifyAppsThread.CreateThread
 │   │ │     └TNotifyAppsThread.ResumeIfIdle
 │   │ ├TfrmDCSumm.ShowPCEControls
 │   │ └TfrmDCSumm.lstSummsClick...
 │   ├TfrmDCSumm.GetTitleText
 │   ├TfrmDCSumm.mnuActDeleteClick
 │   │ ├TfrmDCSumm.NoSummSelected
 │   │ ├ActOnDocument
 │   │ ├SelectDeleteReason
 │   │ │ ├JustifyDocumentDelete
 │   │ │ └TfrmBase508Form.Create
 │   │ │   ├TfrmBase508Form.UpdateAccessibilityActions
 │   │ │   ├UnfocusableControlEnter
 │   │ │   └AdjustControls
 │   │ │     ├TfrmBase508Form.ModifyUnfocusableControl
 │   │ │     └..(rec)..
 │   │ ├MakeDCSummDisplayText
 │   │ ├TfrmDCSumm.LockSumm
 │   │ │ ├TChanges.Exist
 │   │ │ └LockDocument
 │   │ ├JustifyDocumentDelete
 │   │ ├TfrmDCSumm.SaveCurrentSumm...
 │   │ ├TfrmDCSumm.SetEditingIndex
 │   │ ├VisitStrForNote
 │   │ ├TfrmDCSumm.RemovePCEFromChanges
 │   │ │ ├VisitStrForNote
 │   │ │ └TChanges.Remove
 │   │ │   ├UnlockOrder
 │   │ │   └UnlockDocument
 │   │ ├DeleteDocument
 │   │ ├TChanges.Exist
 │   │ ├UnlockDocument
 │   │ ├TChanges.Remove...
 │   │ ├DeletePCE
 │   │ ├TfrmDCSumm.ClearEditControls
 │   │ │ ├TPCEData.Clear...
 │   │ │ └TfrmDCSumm.SetEditingIndex
 │   │ ├TfrmDCSumm.LoadSumms
 │   │ │ ├KillDocTreeObjects
 │   │ │ │ └ResetDocTreeObjectStrings
 │   │ │ ├ListSummsForTree
 │   │ │ ├CreateListItemsForDocumentTree
 │   │ │ ├TfrmDCSumm.UpdateTreeView
 │   │ │ │ └BuildDocumentTree
 │   │ │ │   ├MakeNoteDisplayText
 │   │ │ │   ├MakeConsultNoteDisplayText
 │   │ │ │   ├MakeDCSummDisplayText
 │   │ │ │   ├MakeNoteTreeObject
 │   │ │ │   │ └MakeNoteDisplayText
 │   │ │ │   ├MakeConsultsNoteTreeObject
 │   │ │ │   │ ├MakeConsultNoteDisplayText
 │   │ │ │   │ └GetConsultOrderIEN
 │   │ │ │   ├MakeDCSummTreeObject
 │   │ │ │   │ └MakeDCSummDisplayText
 │   │ │ │   ├SetTreeNodeImagesAndFormatting
 │   │ │ │   │ ├ExternalName
 │   │ │ │   │ ├TextFound
 │   │ │ │   │ └MakeBold
 │   │ │ │   └..(rec)..
 │   │ │ ├RemoveParentsWithNoChildren
 │   │ │ │ └KillDocTreeNode
 │   │ │ │   └ResetDocTreeObjectStrings
 │   │ │ └TfrmDCSumm.tvSummsChange...
 │   │ ├UpdateReminderFinish
 │   │ │ └TfrmRemDlg.UpdateButtons
 │   │ │   ├TfrmRemDlg.BackReminder
 │   │ │   │ └TfrmRemDlg.GetCurReminderList
 │   │ │   │   └TReminderDialog.GetIEN
 │   │ │   └TfrmRemDlg.NextReminder
 │   │ │     └TfrmRemDlg.GetCurReminderList...
 │   │ ├TfrmDCSumm.ShowPCEControls
 │   │ └TfrmDrawers.DisplayDrawers...
 │   ├TfrmDCSumm.cmdChangeClick
 │   │ ├ExecuteDCSummProperties
 │   │ │ ├TfrmBase508Form.Create...
 │   │ │ ├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
 │   ├TPCEData.GetCPTRequired
 │   │ └TPCEData.NeededPCEData
 │   │   ├FutureEncounter...
 │   │   ├PromptForWorkload
 │   │   ├TPCEData.StandAlone
 │   │   │ └HasVisit
 │   │   ├TPCEData.GetHasCPTList
 │   │   │ └AddList
 │   │   │   └TPCEItem.HasCPTStr
 │   │   ├DataHasCPTCodes
 │   │   ├RequireExposures
 │   │   └EligbleConditions
 │   ├RequireMASVerification
 │   ├RequireRelease
 │   ├PutEditedDCSumm
 │   │ └SetText
 │   │   └InitParams
 │   ├TChanges.Remove...
 │   ├UnlockDocument
 │   ├TfrmDCSumm.SetEditingIndex
 │   └TfrmDCSumm.lstSummsClick...
 ├ReturnMaxDCSumms
 │ └LoadDCSummPrefs
 │   ├ExternalName
 │   └GetAttending
 ├TfrmDCSumm.LoadSumms...
 ├SelectAuthor
 │ ├TfrmBase508Form.Create...
 │ └ExternalName
 ├SelectNoteDateRange
 │ └TfrmBase508Form.Create...
 ├SelectTIUView
 │ ├TfrmBase508Form.Create...
 │ ├ExternalName
 │ ├TfrmTIUView.lstStatusSelect
 │ │ └FMToday...
 │ └TfrmTIUView.cmdOKClick
 │   └StrToFMDateTime
 └TfrmDCSumm.SetSummTreeLabel
   ├ExternalName
   └SetDateRangeText

Called-By Hierarchy


                   TfrmDCSumm.mnuViewClick
               TfrmDCSumm.SetViewContext┤ 
                TfrmDCSumm.DisplayPage┤ │ 
TfrmDCSumm.mnuViewReturntoDefaultClick┘ │ 
    TfrmDCSumm.mnuViewSaveAsDefaultClick┘ 

Calls

Name Declaration Comments
TfrmDCSumm.LoadSumms procedure LoadSumms; -
ReturnMaxDCSumms function ReturnMaxDCSumms: Integer; -
TfrmDCSumm.SaveCurrentSumm procedure SaveCurrentSumm(var Saved: Boolean); -
SelectAuthor procedure SelectAuthor(FontSize: Integer; CurrentContext: TTIUContext; var AuthorContext: TAuthorContext); -
SelectNoteDateRange procedure SelectNoteDateRange(FontSize: Integer; CurrentContext: TTIUContext; var NoteDateRange: TNoteDateRange); -
SelectTIUView function SelectTIUView(FontSize: Integer; ShowForm: Boolean; CurrentContext: TTIUContext; var TIUContext: TTIUContext): boolean ; -
TfrmDCSumm.SetSummTreeLabel function SetSummTreeLabel(AContext: TTIUContext): string; -

Called-By

Name Declaration Comments
TfrmDCSumm.mnuViewSaveAsDefaultClick procedure mnuViewSaveAsDefaultClick(Sender: TObject); -
TfrmDCSumm.SetViewContext procedure SetViewContext(AContext: TTIUContext); -


Source

1188  procedure TfrmDCSumm.mnuViewClick(Sender: TObject);
1189  { changes the list of Summs available for viewing }
1190  var
1191    AuthCtxt: TAuthorContext;
1192    DateRange: TNoteDateRange;
1193    Saved: Boolean;
1194  begin
1195    inherited;
1196    if EditingIndex <> -1 then
1197    begin
1198      SaveCurrentSumm(Saved);
1199      if not Saved then Exit;
1200    end;
1201    FLastSummID := lstSumms.ItemID;
1202    StatusText('Retrieving Discharge Summary list...');
1203    mnuViewDetail.Checked := False;
1204    if Sender is TMenuItem then ViewContext := TMenuItem(Sender).Tag
1205      else if FCurrentContext.Status <> '' then ViewContext := NC_CUSTOM
1206      else ViewContext := NC_RECENT;
1207    case ViewContext of
1208    NC_RECENT:     begin
1209                     FillChar(FCurrentContext, SizeOf(FCurrentContext), 0);
1210                     lblSumms.Caption := 'Last ' + IntToStr(ReturnMaxDCSumms) + ' Summaries';
1211                     FCurrentContext.Status := IntToStr(ViewContext);
1212                     FCurrentContext.MaxDocs := ReturnMaxDCSumms;
1213                     LoadSumms;
1214                   end;
1215    NC_ALL:        begin
1216                     FillChar(FCurrentContext, SizeOf(FCurrentContext), 0);
1217                     lblSumms.Caption := 'All Signed Summaries';
1218                     FCurrentContext.Status := IntToStr(ViewContext);
1219                     LoadSumms;
1220                   end;
1221    NC_UNSIGNED:   begin
1222                     FillChar(FCurrentContext, SizeOf(FCurrentContext), 0);
1223                     lblSumms.Caption := 'Unsigned Summaries';
1224                     FCurrentContext.Status := IntToStr(ViewContext);
1225                     LoadSumms;
1226                   end;
1227    NC_UNCOSIGNED: begin
1228                     FillChar(FCurrentContext, SizeOf(FCurrentContext), 0);
1229                     lblSumms.Caption := 'Uncosigned Summaries';
1230                     FCurrentContext.Status := IntToStr(ViewContext);
1231                     LoadSumms;
1232                   end;
1233    NC_BY_AUTHOR:  begin
1234                     SelectAuthor(Font.Size, FCurrentContext, AuthCtxt);
1235                     with AuthCtxt do if Changed then
1236                     begin
1237                       FillChar(FCurrentContext, SizeOf(FCurrentContext), 0);
1238                       lblSumms.Caption := AuthorName + ': Signed Summaries';
1239                       FCurrentContext.Status := IntToStr(NC_BY_AUTHOR);
1240                       FCurrentContext.Author := Author;
1241                       FCurrentContext.TreeAscending := Ascending;
1242                       LoadSumms;
1243                     end;
1244                   end;
1245    NC_BY_DATE:    begin
1246                     SelectNoteDateRange(Font.Size, FCurrentContext, DateRange);
1247                     with DateRange do if Changed then
1248                     begin
1249                       FillChar(FCurrentContext, SizeOf(FCurrentContext), 0);
1250                       lblSumms.Caption := FormatFMDateTime('mmm dd,yy', FMBeginDate) + ' to ' +
1251                                           FormatFMDateTime('mmm dd,yy', FMEndDate) + ': Signed Summaries';
1252                       FCurrentContext.BeginDate     := BeginDate;
1253                       FCurrentContext.EndDate       := EndDate;
1254                       FCurrentContext.FMBeginDate   := FMBeginDate;
1255                       FCurrentContext.FMEndDate     := FMEndDate;
1256                       FCurrentContext.TreeAscending := Ascending;
1257                       FCurrentContext.Status := IntToStr(NC_BY_DATE);
1258                       LoadSumms;
1259                     end;
1260                   end;
1261    NC_CUSTOM:     begin
1262                     if Sender is TMenuItem then
1263                       begin
1264                         SelectTIUView(Font.Size, True, FCurrentContext, uDCSummContext);
1265                         //lblSumms.Caption := 'Custom List';
1266                       end;
1267                     with uDCSummContext do if Changed then
1268                     begin
1269                       //if not (Sender is TMenuItem) then lblSumms.Caption := 'Default List';
1270                       //if MaxDocs = 0 then MaxDocs := ReturnMaxNotes;
1271                       FCurrentContext.BeginDate     := BeginDate;
1272                       FCurrentContext.EndDate       := EndDate;
1273                       FCurrentContext.FMBeginDate   := FMBeginDate;
1274                       FCurrentContext.FMEndDate     := FMEndDate;
1275                       FCurrentContext.Status        := Status;
1276                       FCurrentContext.Author        := Author;
1277                       FCurrentContext.MaxDocs       := MaxDocs;
1278                       FCurrentContext.ShowSubject   := ShowSubject;
1279                       // NEW PREFERENCES:
1280                       FCurrentContext.SortBy        := SortBy;
1281                       FCurrentContext.ListAscending := ListAscending;
1282                       FCurrentContext.GroupBy       := GroupBy;
1283                       FCurrentContext.TreeAscending := TreeAscending;
1284                       FCurrentContext.SearchField   := SearchField;
1285                       FCurrentContext.Keyword       := Keyword;
1286                       FCurrentContext.Filtered      := Filtered;
1287                       LoadSumms;
1288                     end;
1289                   end;
1290    end; {case}
1291    lblSumms.Caption := SetSummTreeLabel(FCurrentContext);
1292    lblSumms.hint := lblSumms.Caption;
1293    tvSumms.Caption := lblSumms.Caption;
1294    StatusText('');
1295  end;