cancel
Showing results for 
Search instead for 
Did you mean: 

AS2 adapter for HL7 format

Former Member
0 Kudos

hey guys,

do u have any info on using AS2 adapter in PI system for transforming a document in HL7 format? thx.

all helpful replies will be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Stewart,

We had a requirement for some HL7 processing this past summer and had to move it from our old EDI platform to our new PO 7.4 system.  I was able to download all the .xsd files from hl7.org and I used the HAPI open source library to perform the conversion into the expected XML format.  I had to import several archives for the HAPI libraries and then I wrote a java mapping to use the HAPI libraries to do the HL7 -> XML conversion and then from there I can easily do whatever else is necessary with all the standard PI tools.

Regards,

Ryan Crosby

Former Member
0 Kudos

thx Ryan.

the requirement which we have is send some data from ECC by XI proxy adapter to PI to target system in hl7 format by as2 adapter. then we would get the acknowledgements back from target system to PI to send it back to ECC. we would be using the HL7 XSD both on sender and reciever side, proxy would be generated on HL7 XSD, so mapping in PI would be one-to-one. what would be the challenge areas, which you think we would get on PI AS2 connectivity to third party system?

in your above reply in your HL7 work, did you use AS2 adapter?

thx.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Stewart,

If you are using the HL7 standards without any deviations then the use of HAPI should be pretty straightforward - it's a bit more difficult if there are any deviations however because I had to edit some of the xsd files and also decompile one of the libraries and make some minor adjustments for it to convert to the XML that would work in our scenario.  The only other challenge I could think of would be trying to use AS2 in a synchronous scenario - I think that typically the only response the AS2 adapter would expect is an MDN and it wouldn't know what to do with an HL7 message.

Regards,

Ryan Crosby

Former Member
0 Kudos

hey Ryan,

thx again.

now i am more confused . so few questions to clarify -

is AS2 a wrong adapter to use for working on HL7 document?

in our scenario, ecc would send proxy message to PI and PI would do one-to-one mapping to the XSD structure and send via AS2. the ECC proxy message would be based on HL7 XSD, so the mapping would be one-to-one, but the service would be synchronous, as the third party on getting the HL7 would send the Acknowlegment back via AS2 to PI system, which then PI would send back to ECC.

then 2 more asynchronous flows would run from third-party to PI to ECC system containing second acknowledgment data and the third final acknowledgment data.

hope you would have now got some info on our scenarios.

so what would be the challenges here? also we heard something about recurrsion in HL7 XSD, which might be of challenge, so we might have to edit the HL7 XSD to get it to a workable format for PI, as a recursive structure might be difficult for PI to process - any inputs on this point?

thx again. what about the number of days you think would be needed to develop the sync flow and 2 async scenarios, which are described above from PI side, if only one pi consultant has to work on the PI design config and also taking the basis activities of certificate handling into consideration and other connectivity activities, as the basis team might not have that much info on the pi basis admin side?

any inputs, here, thx.

hey all,

anyone having info on the above can also pls share their inputs.

nitindeshpande
Active Contributor
0 Kudos

Hello Stewart,

Firstly, i have not worked on HL7 integration, but have worked on EDI integration using AS2 adapter.

I have got your flow, which would be one synchronous and two asynchronous scenarios.

For synchronous, you need to generate a proxy which triggers the data to PI. And the structure for your proxy interface would be the one provided by HL7. Please use the same XSD for both sender and receiver.

To connect to HL7 via AS2, you require Basis help to open the port, setup HTTPs connection, import SSL certificates etc. Certificates also need to be exchanged with AS2. Both parties, SAP PI and HL7 must have their certificates CA signed.

Make sure the above mentioned setup is done properly. Once done, you will have no problem in connecting to HL7.

And once the request reaches HL7 and acknowledgement is sent to SAP PI, how it is being handled? You are sending it to same proxy? If yes, then your sender interface also must be a synchronous one.

If the acknowledgement is being handled in a different way, other than proxy then you need to setup a Sync-Async bridge to handle acknowledgements.

Similarly the other two acknowledgements needs to be handled.

Regards,
Nitin

Answers (2)

Answers (2)

Dimitri
Active Contributor
0 Kudos

Hi Stewart,

You can also use the IAH adapter. This is the Integration Adapter for Healthcare.

I already use this for several years now. First on a SAP PI 7.11 system and now on our SAP PO 7.4 system. Works fine and straight forward.

Just one thing: this is a separate adapter, licensed via SAP Netherlands.

Kind regards,

Dimitri

Former Member
0 Kudos

hey all,

got the scenario further clarified.

1 sync scenario proxy to AS2 and in its response get back ack1 MDN and send back to ECC system.

2 asnyc scenarios to get ack2 and ack3 from third party system and send to ECC system.

one complexity which has arose is this - the output of initial AS2 request message to third party system should be like this:

an output file say file1 inside directory dir1 which would be inside dir2. so the heirarchy would be:

dir2\dir1\file1

now this complete directory structure needs to be archived as .tar file and gzip to finally get a .tar.gz file. then this file needs to be sent in the AS2 message to third party system.

now using payloadzipbean we can get the zipping done to get the final .gz file - BUT the question is how to get the .tar archive file - because there is no run OS command option in AS2 receiver adapter and the initial scenario is synchronous proxy to synchronous AS2.

Hope u got the req. So the question comes down to if i get a proxy XML msg in PI, then how can i place it in a heirarchy like dir2\dir1\file1, archive this dir2 to get a .tar file and then zip it to get .tar.gz file? the last part of zip the .tar file to get .tar.gzip can be done through payloadzipbean, but how to get the file in that dir2 and then its archive tar file?

all helpful replies would be appreciated. thx.

nitindeshpande
Active Contributor
0 Kudos

Hello Stewart,

If you are sending the file to third party via AS2, then what is the necessity to store in a folder?

And for archiving it in.tar format, you need to write a java code to convert the XML input file into .tar file. For this conversion, i guess you can find the java library from apache and for zipping you can use the PayloadZipbean adapter module.

If i am correct, the folder you are talking about is present in your local PI system or some other server. To place the file, you can use file receiver channel which will place the file and another receiver channel would be your AS2 channel.

Hence for single sender you need to have 2 receiver.

Regards,

Nitin

0 Kudos

Hi Stewart,

Hope you have done HL7 integration through PI.

Right now i am also doing the same. I need to know the approach you have used to achieve the folder structure and .tar archive.

Please help me out. Thanks much

Regards

Akhil