Function

TfrmMeds.GetInstructText

Module

fMeds

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmMeds

Declaration

function GetInstructText(const AMed: TMedListRec; var Detail: string): string;

Called-By Hierarchy


                                                      TfrmMeds.GetInstructText
                                                        TfrmMeds.GetListText┤ 
                                                     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┘   │ │ 
                                                  TfrmMeds.lstMedsDrawItem┘ │ 
                                                 TfrmMeds.lstMedsMeasureItem┘ 

Called-By

Name Declaration Comments
TfrmMeds.GetListText function GetListText(const AMed: TMedListRec; Column: integer; var Detail: string): string; -
TfrmMeds.lstMedsMeasureItem procedure lstMedsMeasureItem(Control: TWinControl; Index: Integer; var AHeight: Integer); -


Source

820   function TfrmMeds.GetInstructText(const AMed: TMedListRec; var Detail: string): string;
821   var
822     AnAction: string;
823     Indent: integer;
824   begin
825     AnAction := uPendingChanges.Values[Piece(AMed.OrderID, ';', 1)];
826     result := AMed.Instruct;
827     // replace pharmacy text with order text if this is a change
828     if CharAt(AnAction, 1) = 'X' then result := Piece(AnAction, U, 3);
829     if AMed.IVFluid then Indent := Pos(CRLF + 'in ', result) else Indent := Pos(#13, result);
830     if Indent > 0 then
831     begin
832       if AMed.IVFluid then
833       begin
834         Detail := Copy(result, Indent + Length(CRLF), Length(result));
835         result := Copy(result, 1, Indent - 1);
836       end else
837       begin
838         Detail := Copy(result, Indent + 2, Length(result));
839         result := Copy(result, 1, Indent - 1);
840       end;
841     end;
842   end;