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
panJamesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eddie ShipmanAll-around developerCommented:
There is also an example of CREATING a message there.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.