Page 1 of 1

Attach report in ORU

Posted: Mon Apr 09, 2012 8:57 pm
by miguito
My project is
ORM - Received
ACK - Send
ORU - Send
The first 2 are already, now I will study the ORU, but can not find any examples
of how to attach a PDF file with test data / medical observations.
It may be ED (embedded) or RP (reference pointer) I think so.

any suggestions

Re: Attach report in ORU

Posted: Tue Apr 10, 2012 4:37 am
by admin
Hi,

Sample code for ED data type :

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var
  msg :TdiORM_O01_25;
  pdf_ed : TdiED_25;

begin
  msg:=TdiORM_O01_25.Create;
  msg.ORDER[0].ORDER_DETAIL.OBSERVATION[0].OBX.SetIDOBX.AsString:='1';
  msg.ORDER[0].ORDER_DETAIL.OBSERVATION[0].OBX.ValueType.AsString:='ED';
  pdf_ed:=TdiED_25.Create;
  pdf_ed.SourceApplication.NamespaceID.AsString:='application';
  pdf_ed.TypeofData.AsString:='PDF';
  pdf_ed.Data.AsBase64:='PDF TEXT';
  // pdf_ed.Data.Value:='Raw Data';
  msg.ORDER[0].ORDER_DETAIL.OBSERVATION[0].OBX.ObservationValue[0]:=pdf_ed;

  FreeAndNil(msg);
end;