Attach report in ORU

Discussion of open issues, suggestions and bugs regarding to (known as Delphi HL7) HL7 Components
Post Reply
miguito
Posts: 12
Joined: Thu Apr 05, 2012 4:44 pm

Attach report in ORU

Post 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
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: Attach report in ORU

Post 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;
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests