In my application I have the need for runtime validation of messages. So far, my solution has been to load all profiles up at startup and populate a map with the key being the following tuple <messageType, eventType, structureId, version> and the value being the actual profile.
Then when one of my handlers implementing the Application interface is hit it can then lookup the profile in the map which matches the message and validate against it. This works absolutely fine but I think this functionality ought to be provided by the HAPI framework and might already is. If not, I am willing to provide you with some ideas. If this already is implemented please provide me with a link to a sample
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It has been almost a year now since I posted this. Could it really only be MY need to see this functionality presented as it was thought to work? In that case, I'll probably send some additions to HAPI
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm betting you aren't the only person who needs this, but unfortunately it looks like nobody has taken it on. Such is the nature of Open Source Software- Developers have only so much time they can spend on any given product, and it's often hard to predict where their efforts will go.
That said, I don't believe there is currently any "one true way" to take advantage of runtime profiles. HAPI has a few different ProfileStore implementations out of the box but even these aren't neccesary to use. The HAPI TestPanel doesn't bother with a ProfileStore at all, but rather just manually loads profiles and uses a ProfileParser.
Certainly this remains "help wanted". If you had any interest in contributing documentation or examples, I'm happy to help format them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since my first post a year ago, I have actually written what is needed to do runtime profile validation against a profile repository located locally (I actually needed it because I attended at the IHE Bern Connectathon). Back then, I also looked at what the Gazelle team did but their logic did not meet my exact requirements (the profile validation I wrote validated directly against the profiles found at svn://scm.gforge.inria.fr/svnroot/gazelle/Data/tags - I made IHE tag the profiles for each session, eg. EYECARE2012).
As a service to the community and to the HAPI framework, I will soon make a contribution that contains my best guess of how I think it should work and I will hope you will have a look at it and evaluate it and see if it does indeed fit the HAPI project. I'll see if I can find the time within a short period and submit it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So the request goes like this:
In my application I have the need for runtime validation of messages. So far, my solution has been to load all profiles up at startup and populate a map with the key being the following tuple <messageType, eventType, structureId, version> and the value being the actual profile.
Then when one of my handlers implementing the Application interface is hit it can then lookup the profile in the map which matches the message and validate against it. This works absolutely fine but I think this functionality ought to be provided by the HAPI framework and might already is. If not, I am willing to provide you with some ideas. If this already is implemented please provide me with a link to a sample
It has been almost a year now since I posted this. Could it really only be MY need to see this functionality presented as it was thought to work? In that case, I'll probably send some additions to HAPI
Hi Jens,
I'm betting you aren't the only person who needs this, but unfortunately it looks like nobody has taken it on. Such is the nature of Open Source Software- Developers have only so much time they can spend on any given product, and it's often hard to predict where their efforts will go.
That said, I don't believe there is currently any "one true way" to take advantage of runtime profiles. HAPI has a few different ProfileStore implementations out of the box but even these aren't neccesary to use. The HAPI TestPanel doesn't bother with a ProfileStore at all, but rather just manually loads profiles and uses a ProfileParser.
Certainly this remains "help wanted". If you had any interest in contributing documentation or examples, I'm happy to help format them.
The Gazelle team heavily uses Conformance Profiles to validate HL7 requests against corresponding IHE specs. They are mainly using HAPI although they have rewritten a couple of classes (e.g. DefaultValidator -> GazelleValidator) to suit their purposes (it would surely be interesting to have a closer look).
They relevant sources can be accessed under https://gforge.inria.fr/scm/viewvc.php/Maven/GazelleHL7v2Validator/trunk/GazelleHL7v2Validator-ejb/src/main/java/net/ihe/gazelle/hl7/validator/core/?root=gazelle.
The profiles themselves are stored in a database and available using their EVSClient.
HTH
Christian
Since my first post a year ago, I have actually written what is needed to do runtime profile validation against a profile repository located locally (I actually needed it because I attended at the IHE Bern Connectathon). Back then, I also looked at what the Gazelle team did but their logic did not meet my exact requirements (the profile validation I wrote validated directly against the profiles found at svn://scm.gforge.inria.fr/svnroot/gazelle/Data/tags - I made IHE tag the profiles for each session, eg. EYECARE2012).
As a service to the community and to the HAPI framework, I will soon make a contribution that contains my best guess of how I think it should work and I will hope you will have a look at it and evaluate it and see if it does indeed fit the HAPI project. I'll see if I can find the time within a short period and submit it.
Mail has been sent to James Agnew containing a sample application that does exactly this