Function

TfrmMeds.GetPlainText

Module

fMeds

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmMeds

Declaration

function GetPlainText(Control: TWinControl; Index: integer): string;

Calls Hierarchy


TfrmMeds.GetPlainText
 ├TfrmMeds.GetMedList
 ├TfrmMeds.GetHeader
 └TfrmMeds.GetListText
   ├TfrmMeds.GetActionText
   └TfrmMeds.GetInstructText

Called-By Hierarchy


                                                     TfrmMeds.GetPlainText
                                                    TfrmMeds.NotifyOrder┤ 
                                                  TfrmFrame.UMNewOrder┘ │ 
                                                TfrmMeds.RefreshMedLists┘ 
                                                  TfrmMeds.DisplayPage┤   
                                               TfrmMeds.NotifyOrder...┤   
                                                  TfrmMeds.SetFontSize┤   
                                                TfrmFrame.ChangeFont┘ │   
                                        TfrmFrame.LoadSizesForUser┤   │   
                                   TfrmFrame.LoadUserPreferences┘ │   │   
                                          TfrmFrame.UMInitiate┘   │   │   
                                        TfrmFrame.mnuFontSizeClick┘   │   
                               TfrmMeds.SortbyStatusthenLocation1Click┤   
                TfrmMeds.SortbyClinicOrderthenStatusthenStopDate1Click┤   
TfrmMeds.SortbyDrugalphabeticallystatusactivestatusrecentexpired1Click┤   
                                           TfrmOptionsOther.btnOKClick┘   

Calls

Name Declaration Comments
TfrmMeds.GetHeader function GetHeader(Control: TWinControl): THeaderControl; -
TfrmMeds.GetListText function GetListText(const AMed: TMedListRec; Column: integer; var Detail: string): string; -
TfrmMeds.GetMedList function GetMedList(Control: TWinControl): TList; -

Called-By

Name Declaration Comments
TfrmMeds.NotifyOrder procedure NotifyOrder(OrderAction: Integer; AnOrder: TOrder); override; -
TfrmMeds.RefreshMedLists procedure RefreshMedLists; -


Source

865   function TFrmMeds.GetPlainText(Control: TWinControl; Index: integer): string;
866   var
867     AMed: TMedListRec;
868     AHeader: THeaderControl;
869     i: integer;
870     x, y: string;
871   begin
872     Result := '';
873     AMed := TMedListRec(GetMedList(Control)[Index]);
874     AHeader := GetHeader(Control);
875     for i := 0 to AHeader.Sections.Count-1 do
876     begin
877       x := GetListText(AMed, i, y);
878       if (x <> '') or (y <> '') then
879         Result := Result + AHeader.Sections[i].Text + ': ' + x + ' ' + y + CRLF;
880     end;
881     Result := Trim(Result);
882   end;