Procedure

TfraEvntDelayList.mlstEventsChange

Module

mEvntDelay

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfraEvntDelayList

Declaration

procedure mlstEventsChange(Sender: TObject);

Calls Hierarchy


TfraEvntDelayList.mlstEventsChange
 ├isExistedEvent
 ├TfrmOrders.ClickLstSheet
 │ └TfrmOrders.lstSheetsClick
 │   ├CloseOrdering
 │   ├TfrmOrders.PtEvtCompleted
 │   │ ├IsCompletedPtEvt
 │   │ ├TfrmOrders.GroupChangesUpdate
 │   │ │ ├TChanges.ChangeOrderGrp
 │   │ │ └TChanges.ReplaceODGrpName
 │   │ ├TfrmOrders.InitOrderSheetsForEvtDelay
 │   │ │ ├TfrmOrders.InitOrderSheets
 │   │ │ │ ├TfrmOrders.ClearOrderSheets
 │   │ │ │ ├LoadOrderSheetsED
 │   │ │ │ ├DGroupAll
 │   │ │ │ └EventInfo
 │   │ │ └TfrmOrders.DfltViewForEvtDelay
 │   │ │   ├TfrmOrders.CanChangeOrderView
 │   │ │   │ └ActiveOrdering
 │   │ │   └LoadOrderViewDefault
 │   │ ├TfrmOrders.lstSheetsClick...
 │   │ └TfrmOrders.RefreshOrderList
 │   │   ├LoadOrdersAbbr
 │   │   │ ├ClearOrders
 │   │   │ ├LoadDGroupMap
 │   │   │ ├ExpiredOrdersStartDT
 │   │   │ ├FMNow
 │   │   │ └SeqOfDGroup
 │   │   │   └LoadDGroupMap
 │   │   ├ClearOrders
 │   │   ├LoadOrdersAbbr
 │   │   │ ├LoadDGroupMap
 │   │   │ ├FMNow
 │   │   │ └SeqOfDGroup...
 │   │   ├TfrmOrders.ExpandEventSection
 │   │   ├TfrmOrders.CompressEventSection
 │   │   ├SortOrders
 │   │   │ ├InverseByGroup
 │   │   │ │ └TChanges.Exist
 │   │   │ ├ForwardByGroup
 │   │   │ │ └TChanges.Exist
 │   │   │ ├InverseChrono
 │   │   │ └ForwardChrono
 │   │   ├TfrmOrders.AddToListBox
 │   │   │ └TfrmOrders.GetPlainText
 │   │   │   └TfrmOrders.GetOrderText
 │   │   │     ├LoadFlagReason
 │   │   │     ├TfrmOrders.GetStartStopText
 │   │   │     └NameOfStatus
 │   │   └DGroupAll
 │   ├DeleteEmptyEvt
 │   │ ├PtEvtEmpty
 │   │ ├GetEventName
 │   │ └DeletePtEvent
 │   ├TfrmOrders.ChangesUpdate
 │   │ ├TheParentPtEvt
 │   │ └TChanges.Remove
 │   │   ├UnlockOrder
 │   │   └UnlockDocument
 │   ├TfrmOrders.InitOrderSheetsForEvtDelay...
 │   ├..(rec)..
 │   ├LoadWriteOrdersED
 │   ├LoadWriteOrders
 │   ├TfrmOrders.RefreshOrderList...
 │   ├PtEvtEmpty
 │   └DeletePtEvent
 ├isMatchedEvent
 └TfrmOrders.lstSheetsClick...

Called-By Hierarchy


                TfraEvntDelayList.mlstEventsChange
  TfrmOrdersTS.fraEvntDelayListcboEvntListChange┤ 
   TfrmOrdersTS.fraEvntDelayListmlstEventsChange┤ 
   TfrmMedCopy.fraEvntDelayListcboEvntListChange┤ 
    TfrmMedCopy.fraEvntDelayListmlstEventsChange┤ 
TfrmCopyOrders.fraEvntDelayListcboEvntListChange┤ 
 TfrmCopyOrders.fraEvntDelayListmlstEventsChange┘ 

Calls

Name Declaration Comments
TfrmOrders.ClickLstSheet procedure ClickLstSheet; -
isExistedEvent function isExistedEvent(const APtDFN: string; const AEvtID: string; var APtEvtID: string): Boolean; -
isMatchedEvent function isMatchedEvent(const APtDFN: string; const AEvtID: string; var ATs: string): Boolean; -
TfrmOrders.lstSheetsClick procedure lstSheetsClick(Sender: TObject); -

Called-By

Name Declaration Comments
TfrmOrdersTS.fraEvntDelayListcboEvntListChange procedure fraEvntDelayListcboEvntListChange(Sender: TObject); -
TfrmMedCopy.fraEvntDelayListcboEvntListChange procedure fraEvntDelayListcboEvntListChange(Sender: TObject); -
TfrmCopyOrders.fraEvntDelayListcboEvntListChange procedure fraEvntDelayListcboEvntListChange(Sender: TObject); -
TfrmOrdersTS.fraEvntDelayListmlstEventsChange procedure fraEvntDelayListmlstEventsChange(Sender: TObject); -
TfrmMedCopy.fraEvntDelayListmlstEventsChange procedure fraEvntDelayListmlstEventsChange(Sender: TObject); -
TfrmCopyOrders.fraEvntDelayListmlstEventsChange procedure fraEvntDelayListmlstEventsChange(Sender: TObject); -


Source

206   procedure TfraEvntDelayList.mlstEventsChange(Sender: TObject);
207   var
208     i,idx : integer;
209     AnEvtID, AnEvtType, APtEvtID: string;
210     AnEvtName,ATsName: string;
211   begin
212     inherited;
213     if mlstEvents.ItemIndex >= 0 then
214     begin
215       AnEvtID   := Piece(mlstEvents.Items[mlstEvents.ItemIndex],'^',1);
216       AnEvtType := Piece(mlstEvents.Items[mlstEvents.ItemIndex],'^',3);
217       idx := mlstEvents.ItemIndex;
218     end else
219     begin
220       AnEvtID   := '';
221       AnEvtType := '';
222       idx := -1;
223     end;
224     if AnEvtType = 'D' then
225     begin
226       pnlDate.Visible := True;
227       lblEffective.Left := 1;
228       orDateBox.Left := 1;
229       orDateBox.Hint  := orDateBox.Text;
230     end else
231       pnlDate.Visible := False;
232     if mlstEvents.ItemIndex >= 0 then
233       AnEvtName := Piece(mlstEvents.Items[mlstEvents.ItemIndex],'^',9)
234     else
235       AnEvtName := '';
236     if isExistedEvent(Patient.DFN, AnEvtID, APtEvtID) then
237     begin
238       if IsForCpXfer then
239         DisableWarning := True;
240       for i := 0 to frmOrders.lstSheets.Items.Count - 1 do
241       begin
242         if Piece(frmOrders.lstSheets.Items[i],'^',1)=APtEvtID then
243         begin
244           frmOrders.lstSheets.ItemIndex := i;
245           frmOrders.ClickLstSheet;
246         end;
247       end;
248       IsForCpXfer := False;
249     end;
250     if (StrToIntDef(AnEvtID,0)>0) and (isMatchedEvent(Patient.DFN,AnEvtID,ATsName))
251        and (not DisableWarning) then
252     begin
253       if InfoBox(Patient.Name + TX_MCHEVT1 + ATsName + ' on ' + Encounter.LocationName + TX_MCHEVT2 + TX_MCHEVT3,
254         'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL then
255      begin
256        FMatchedCancel := True;
257        frmOrders.lstSheets.ItemIndex := 0;
258        frmOrders.lstSheetsClick(Self);
259      end else
260      begin
261         if Screen.ActiveForm.Name = 'frmOrdersTS' then
262           SendMessage(frmOrdersTS.Handle, UM_STILLDELAY, 0, 0);
263         if Screen.ActiveForm.Name = 'frmMedCopy' then
264           SendMessage(frmMedCopy.Handle, UM_STILLDELAY, 0, 0);
265         if Screen.ActiveForm.Name = 'frmCopyOrders' then
266           SendMessage(frmCopyOrders.Handle, UM_STILLDELAY, 0, 0);
267      end;
268     end;
269     mlstEvents.ItemIndex := idx;
270   end;