RPC HELP TParamRecord Mult Property Example

From VistApedia
Jump to: navigation, search

RPC Broker Help Home

Mult Example

The following program code demonstrates how the Mult property can be used to pass several data elements to the VistA M Server in one parameter:

   procedure TForm1.Button1Click(Sender: TObject);
   begin
     with brkrRPCBroker1 do begin
       Param[0].PType :=list;
       Param[0].Mult['"NAME"'] := 'DOE,JOHN';
       Param[0].Mult['"SSN"'] := '123456789';
       RemoteProcedure := 'SETUP PATIENT INFO';
       Call;
     end;
   end;	

Assuming variable P1 is used on the VistA M Server to receive this array, it would look like the following:

   P1("NAME")=DOE,JOHN
   P1("SSN")=123456789