Procedure

AppendMedRoutes

Module

rODBase

Last Modified

7/15/2014 3:26:42 PM

Comments

Medication Calls

Scope

Interfaced

Declaration

procedure AppendMedRoutes(Dest: TStrings);


Source

726   procedure AppendMedRoutes(Dest: TStrings);
727   var
728     i: Integer;
729     x: string;
730   begin
731     if uMedRoutes = nil then
732     begin
733       CallV('ORWDPS32 ALLROUTE', [nil]);
734       with RPCBrokerV do
735       begin
736         uMedRoutes := TStringList.Create;
737         FastAssign(RPCBrokerV.Results, uMedRoutes);
738         for i := 0 to Results.Count - 1 do if Length(Piece(Results[i], U, 3)) > 0 then
739         begin
740           x := Piece(Results[i], U, 1) + U + Piece(Results[i], U, 3) +
741                ' (' + Piece(Results[i], U, 2) + ')' + U + Piece(Results[i], U, 3);
742           uMedRoutes.Add(x);
743         end; {if Length}
744         SortByPiece(uMedRoutes, U, 2);
745       end; {with RPCBrokerV}
746     end; {if uMedRoutes}
747     FastAddStrings(uMedRoutes, Dest);
748   end;