Procedure

TfrmODDiet.SetupDialog

Directives

Override

Module

fODDiet

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public

Overrides

TfrmODBase.SetupDialog

Owner

TfrmODDiet

Declaration

procedure SetupDialog(OrderAction: Integer; const ID: string); override;

Calls Hierarchy


TfrmODDiet.SetupDialog
 ├ExternalName
 ├DietDialogType
 ├TfrmODBase.OrderForInpatient
 │ ├OrderEventTypeOnCreate
 │ └IsPassEvt1
 ├TfrmODDiet.nbkDietChange
 │ ├TfrmODBase.cmdQuitClick
 │ ├TResponses.Clear
 │ ├CurrentDietText
 │ ├CheckForAutoDCDietOrders
 │ │ ├LoadOrdersAbbr
 │ │ │ ├ClearOrders
 │ │ │ ├LoadDGroupMap
 │ │ │ ├ExpiredOrdersStartDT
 │ │ │ ├FMNow
 │ │ │ └SeqOfDGroup
 │ │ │   └LoadDGroupMap
 │ │ └RetrieveOrderFields
 │ │   └SetOrderFields
 │ │     ├TOrder.Clear
 │ │     ├SeqOfDGroup...
 │ │     └TopNameOfDGroup
 │ │       └LoadDGroupMap
 │ ├TfrmODBase.OrderMessage
 │ │ └TfrmODBase.ShowOrderMessage
 │ ├TResponses.SetDialog
 │ │ ├LoadDialogDefinition
 │ │ └SortPromptsBySequence
 │ ├TfrmODBase.SetDisplayGroup
 │ ├DisplayGroupForDialog
 │ ├LoadDietQuickList
 │ ├TfrmODDiet.ResetControlsDO
 │ ├TfrmODBase.OrderForInpatient...
 │ ├TfrmODDiet.PatientHasRecurringMeals
 │ │ └GetCurrentRecurringOPMeals
 │ ├..(rec)..
 │ ├TextForOrder
 │ ├AppendTFProducts
 │ ├TfrmODDiet.ResetControlsTF
 │ │ └TfrmODDiet.TFClearGrid
 │ ├TfrmODDiet.ResetControlsEL
 │ ├LoadIsolations
 │ ├CurrentIsolation
 │ ├IsolationID
 │ ├TfrmODDiet.ResetControlsIP
 │ ├TfrmODDiet.ResetControlsAO
 │ ├TfrmODDiet.ResetControlsOP
 │ ├SubSetOfOPDiets
 │ ├TfrmODDiet.cboOPDietAvailMouseClick
 │ │ ├TResponses.SetQuickOrder
 │ │ │ ├TResponses.Clear
 │ │ │ └LoadResponses
 │ │ │   └ExtractToResponses
 │ │ │     └ExpandOrderObjects
 │ │ │       ├TdmodShared.BoilerplateOK
 │ │ │       │ ├ErrCount
 │ │ │       │ ├AddErr
 │ │ │       │ └TdmodShared.LoadTIUObjects
 │ │ │       │   └GetObjectList
 │ │ │       └GetTemplateText
 │ │ │         └TEncounter.GetVisitStr
 │ │ │           └TEncounter.GetVisitCategory
 │ │ ├TfrmODDiet.SetValuesFromResponsesOP
 │ │ │ ├TfrmODDiet.ResetControlsOP
 │ │ │ ├TResponses.FindResponseByName
 │ │ │ ├DietAttributes
 │ │ │ ├TResponses.SetControl
 │ │ │ │ ├TResponses.FindResponseByName
 │ │ │ │ └AssignBPText
 │ │ │ │   ├DisplayGroupToLinkType
 │ │ │ │   │ └DisplayGroupByName
 │ │ │ │   ├TResponses.EValueFor
 │ │ │ │   ├GetServiceIEN
 │ │ │ │   ├TResponses.IValueFor
 │ │ │ │   ├GetProcedureIEN
 │ │ │ │   ├ExpandOrderObjects...
 │ │ │ │   ├SetTemplateDialogCanceled
 │ │ │ │   ├CheckBoilerplate4Fields
 │ │ │ │   ├ExecuteTemplateOrBoilerPlate
 │ │ │ │   └WasTemplateDialogCanceled
 │ │ │ ├TfrmODDiet.calOPStopChange
 │ │ │ │ ├TfrmODDiet.SetEnableOPDOW
 │ │ │ │ ├TfrmODDiet.FMDOW
 │ │ │ │ ├TfrmODDiet.FMDays
 │ │ │ │ └TfrmODDiet.OPChange
 │ │ │ │   ├TResponses.Clear
 │ │ │ │   ├TResponses.Update
 │ │ │ │   │ ├TResponses.FindResponseByName
 │ │ │ │   │ └TResponses.IENForPrompt
 │ │ │ │   ├TfrmODDiet.GetOPDaysOfWeek
 │ │ │ │   └TResponses.GetOrderText
 │ │ │ │     ├TResponses.NextInstance
 │ │ │ │     ├TResponses.FindResponseByName
 │ │ │ │     ├TResponses.FormatResponse
 │ │ │ │     │ └TResponses.FindResponseByIEN
 │ │ │ │     └TResponses.AppendChildren
 │ │ │ │       ├TResponses.FindPromptByIEN
 │ │ │ │       ├TResponses.FindResponseByIEN
 │ │ │ │       └TResponses.FormatResponse...
 │ │ │ ├TfrmODDiet.OPDietCheckForNPO
 │ │ │ ├TfrmODDiet.OPDietCheckForTF
 │ │ │ │ └TextForOrder
 │ │ │ └TfrmODDiet.OPChange...
 │ │ ├DietAttributes
 │ │ ├TfrmODDiet.OPDietCheckForNPO
 │ │ ├TfrmODDiet.OPDietCheckForTF...
 │ │ ├TfrmODBase.OrderMessage...
 │ │ ├OIMessage
 │ │ └TfrmODDiet.OPChange...
 │ └TfrmODDiet.SetEnableOPDOW
 ├TfrmODDiet.SetValuesFromResponsesDO
 │ ├TfrmODDiet.ResetControlsDO
 │ ├TResponses.NextInstance
 │ ├TResponses.FindResponseByName
 │ ├DietAttributes
 │ ├TResponses.SetControl...
 │ ├TfrmODDiet.DietCheckForNPO
 │ ├TfrmODDiet.DietCheckForTF
 │ │ └TextForOrder
 │ └TfrmODDiet.DietChange
 │   ├TResponses.Clear
 │   ├TResponses.Update...
 │   └TResponses.GetOrderText...
 ├TfrmODDiet.PatientHasRecurringMeals...
 ├TfrmODDiet.SetValuesFromResponsesTF
 │ ├TfrmODDiet.ResetControlsTF...
 │ ├TResponses.NextInstance
 │ ├TResponses.FindResponseByName
 │ ├TfrmODDiet.TFSetAmountForRow
 │ │ ├TfrmODDiet.TFStrengthCode
 │ │ └ExpandedQuantity
 │ ├TfrmODBase.OrderForInpatient...
 │ ├TResponses.SetControl...
 │ └TfrmODDiet.TFChange
 │   ├TResponses.Clear
 │   ├TResponses.Update...
 │   ├TfrmODDiet.TFStrengthCode
 │   ├TfrmODBase.OrderForInpatient...
 │   └TResponses.GetOrderText...
 ├TfrmODDiet.SetValuesFromResponsesEL
 │ ├TfrmODDiet.ResetControlsEL
 │ ├TResponses.FindResponseByName
 │ ├TfrmODDiet.grpMealClick
 │ │ ├SetMealTimes
 │ │ │ └ActivateButton
 │ │ ├TfrmODBase.OrderForInpatient...
 │ │ ├TfrmODDiet.PatientHasRecurringMeals...
 │ │ └TfrmODDiet.ELChange
 │ │   ├TResponses.Clear
 │ │   ├TResponses.Update...
 │ │   ├TfrmODDiet.GetMealTime
 │ │   ├TfrmODDiet.IsEarlyTray
 │ │   ├TfrmODBase.OrderForInpatient...
 │ │   ├TfrmODDiet.GetDaysOfWeek
 │ │   └TResponses.GetOrderText...
 │ ├TfrmODBase.OrderForInpatient...
 │ ├TResponses.SetControl...
 │ ├TfrmODDiet.calELStopChange
 │ │ ├TfrmODDiet.SetEnableDOW
 │ │ └TfrmODDiet.ELChange...
 │ └TfrmODDiet.ELChange...
 ├TfrmODDiet.SetValuesFromResponsesIP
 │ ├TfrmODDiet.ResetControlsIP
 │ ├TResponses.SetControl...
 │ └TfrmODDiet.IPChange
 │   ├TResponses.Clear
 │   ├TResponses.Update...
 │   └TResponses.GetOrderText...
 ├TfrmODDiet.SetValuesFromResponsesAO
 │ ├TfrmODDiet.ResetControlsAO
 │ ├TResponses.SetControl...
 │ └TfrmODDiet.AOChange
 │   ├TResponses.Update...
 │   ├TfrmODBase.OrderForInpatient...
 │   └TResponses.GetOrderText...
 ├UserHasFHAUTHKey
 │ └HasSecurityKey
 └TfrmODDiet.SetValuesFromResponsesOP...

Calls

Name Declaration Comments
DietDialogType function DietDialogType(GroupIEN: Integer): Char; -
ExternalName function ExternalName(IEN: Int64; FileNumber: Double): string; -
TfrmODDiet.nbkDietChange procedure nbkDietChange(Sender: TObject); -
TfrmODBase.OrderForInpatient function OrderForInpatient: Boolean; -
TfrmODDiet.PatientHasRecurringMeals function PatientHasRecurringMeals(var MealList: TStringList; MealType: string = ''): boolean; -
TfrmODDiet.SetValuesFromResponsesAO procedure SetValuesFromResponsesAO; -
TfrmODDiet.SetValuesFromResponsesDO procedure SetValuesFromResponsesDO; -
TfrmODDiet.SetValuesFromResponsesEL procedure SetValuesFromResponsesEL; -
TfrmODDiet.SetValuesFromResponsesIP procedure SetValuesFromResponsesIP; -
TfrmODDiet.SetValuesFromResponsesOP procedure SetValuesFromResponsesOP; -
TfrmODDiet.SetValuesFromResponsesTF procedure SetValuesFromResponsesTF; -
UserHasFHAUTHKey function UserHasFHAUTHKey: boolean; -


Source

414   procedure TfrmODDiet.SetupDialog(OrderAction: Integer; const ID: string);
415   begin
416     if AbortOrder then exit;
417     inherited;
418     uDialogName := ExternalName(DialogIEN, 101.41);
419     case DietDialogType(DisplayGroup) of
420     'D': begin
421            if not OrderForInpatient then
422              begin
423                InfoBox(TX_INPT_ONLY, TC_INPT_ONLY, MB_OK);
424                Close;
425                Exit;
426              end;
427            pgeDiet.TabVisible := True;
428            pgeOutPt.TabVisible := False;
429            nbkDiet.ActivePage := pgeDiet;
430            nbkDietChange(Self);
431            if OrderAction <> ORDER_NEW then SetValuesFromResponsesDO;
432          end;
433     'N': begin
434            if not OrderForInpatient then
435              begin
436                InfoBox(TX_INPT_ONLY, TC_INPT_ONLY, MB_OK);
437                Close;
438                Exit;
439              end;
440            nbkDiet.ActivePage := pgeDiet;
441            nbkDietChange(Self);
442            if OrderAction <> ORDER_NEW then SetValuesFromResponsesDO;
443          end;
444     'T': begin
445            if (not OrderForInpatient) and (not PatientHasRecurringMeals(uRecurringMealList)) then
446            begin
447              Close;
448              Exit;
449            end;
450            nbkDiet.ActivePage := pgeTubefeeding;
451            nbkDietChange(Self);
452            if OrderAction <> ORDER_NEW then SetValuesFromResponsesTF;
453          end;
454     'E': begin
455            if (not OrderForInpatient) and (not PatientHasRecurringMeals(uRecurringMealList)) then
456            begin
457              Close;
458              Exit;
459            end;
460            nbkDiet.ActivePage := pgeEarlyLate;
461            nbkDietChange(Self);
462            if OrderAction <> ORDER_NEW then SetValuesFromResponsesEL;
463          end;
464     'P': begin
465            nbkDiet.ActivePage := pgeIsolations;
466            nbkDietChange(Self);
467            if OrderAction <> ORDER_NEW then SetValuesFromResponsesIP;
468          end;
469     'A': begin
470            if (not OrderForInpatient) and (not PatientHasRecurringMeals(uRecurringMealList)) then
471            begin
472              Close;
473              Exit;
474            end;
475            nbkDiet.ActivePage := pgeAdditional;
476            nbkDietChange(Self);
477            if OrderAction <> ORDER_NEW then SetValuesFromResponsesAO;
478          end;
479     'M': begin
480            if OrderForInpatient then
481              begin
482                InfoBox(TX_OUTPT_ONLY, TC_OUTPT_ONLY, MB_OK);
483                Close;
484                Exit;
485              end;
486            uFHAUTH := UserHasFHAUTHKey;       // is this really needed for other than printing?
487            pgeDiet.TabVisible := False;
488            pgeOutPt.TabVisible := True;
489            nbkDiet.ActivePage := pgeOutPt;
490            nbkDietChange(Self);
491            if OrderAction <> ORDER_NEW then SetValuesFromResponsesOP;
492          end
493     else
494         begin
495           if not OrderForInpatient then
496            begin
497              InfoBox(TX_INPT_ONLY, TC_INPT_ONLY, MB_OK);
498              Close;
499              Exit;
500            end;
501           pgeDiet.TabVisible := True;
502           pgeOutPt.TabVisible := False;
503           nbkDiet.ActivePage := pgeDiet;
504           nbkDietChange(Self);
505           if OrderAction <> ORDER_NEW then SetValuesFromResponsesDO;
506           ActiveControl := cboOPDietAvail;
507         end;
508     end;
509     if OrderAction = ORDER_NEW then SetFocusedControl(nbkDiet);
510   end;