• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1099
  • Last Modified:

Delphi and HL7

Hello experts!

I was asked to add new functionality to my Delphi application.

It is HL7 communication between my application and some other third party application.

Downloaded and installed proper components from www.delphihl7.com/ but I do not know how to send and read incoming messages..

Any help for a newbie please?

Thank you

panJames
0
panJames
Asked:
panJames
  • 2
2 Solutions
 
Eddie ShipmanAll-around developerCommented:
0
 
panJamesAuthor Commented:
It is a parsing sample.

What technique should I use to actually get such a sample?

panJames
0
 
rinfoCommented:
You need to create a message .
There is an example after parsing the message that shows how to create a message .
This does all the properties that are available as well as which are the neccessary and which are optional parameters that are needed to create the message - which is needed to create the message - a sample as you said.This is quite obivious.
procedure TForm1.diMessageCreateClick(Sender: TObject);
var
    msg : TdiADT_A01_22;
begin
    msg := TdiADT_A01_22.Create;
    // Populate the MSH Segment

    //adt_a01.MSH.FieldSeparator.AsString:='|'; Default Value
    //adt_a01.MSH.Encodingcharacters.AsString:='^~\&'; Default Value
    msg.MSH.Sendingapplication.AsString:='TestSendingSystem';      
    //adt_a01.MSH.DateTimeofmessage.TimeOfAnEvent.AsString:='200701011539'; Default Value is System Date Time
    //adt_a01.MSH.Messagetype.MessageType.AsString:='ADT'; Default Value        
    //adt_a01.MSH.Messagetype.TriggerEvent.AsString:='A01'; Default Value      
    //adt_a01.MSH.ProcessingID.AsString:='P'; Default Value
    //adt_a01.MSH.VersionID.AsString:='2.2'; Default Value                
    msg.MSH.Sequencenumber.AsString:='123';

    // Populate the PID Segment
    msg.PID.PatientName.FamilyName.AsString:='Doe';
    msg.PID.PatientName.GivenName.AsString:='John';
    msg.PID.PatientID1[0].IDNumber.AsString:='123456';

    Memo1.Lines.Text:= msg.AsString;      
      
    {    
    MSH|^~\&|TestSendingSystem||||200701011539||ADT^A01||P|2.2|123
    PID|||123456||Doe^John
    }    

    FreeAndNil(msg);
end;
0
 
Eddie ShipmanAll-around developerCommented:
There is also an example of CREATING a message there.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now