|
Re: Create CDA R1.1 and R2.1 [message #1755852 is a reply to message #1755688] |
Wed, 08 March 2017 15:46   |
Dan Brown Messages: 21 Registered: December 2015 |
Junior Member |
|
|
Hi,
That build should work great for your purposes. I'm going to copy the text I wrote in a prior build from when I combined the APIs as I think it addresses your concern perfectly. If you have any further questions let me know I'm happy to help.
Mu2consol has been updated to work with consol2 vs the original consol model. The ability to unload and reload the Mu2ConsolPackage from the registry via the API has been added. This allows for one program instance to handle all forms of validation involving R1.1/MU2/R2.1 as opposed to having separate instances for each requirement. To implement, one would do something along these lines:
For R1.1 or R2.1 validation:
// Unload Mu2consolPackage from the registry if it has been loaded
// so we get back only Consol results
Mu2consolPackage.eINSTANCE.unload();
// Access (or initialize) the R2.1 or R1.1 singleton instance (without MU2 certification)
ConsolPackage.eINSTANCE.eClass();
// C-CDA document type is determined automatically by the II provided in the xml file
CDAUtil.load(in, result);
Or for MU2 R1.1 validation:
// Reload Mu2consolPackage into the registry if it has been unloaded so we get back dual results
Mu2consolPackage.eINSTANCE.reload();
// Access (or initialize) the R1.1 with MU2 certification singleton instance
Mu2consolPackage.eINSTANCE.eClass();
EClass docType = null; //pupulate this with something like Mu2consolPackage.eINSTANCE.getTransitionOfCareAmbulatorySummary()
// C-CDA document type is determined manually by the user
CDAUtil.loadAs(in, docType, result);
R1.1 and R2.1 are handled by one model, consol2, and MU2 can also be run in the same instance. This is part of an effort to deprecate the original consol model. If you are using it, I would suggest using consol2 instead, which will offer the same validation, but will have continued updates, and for MU2 validation (with future builds), will be necessary.
Other notes:
The API calls are exactly the same for consol2 vs 1 (excepting that more options are available) so your code doesn't need to change unless you are using MU2 (see above, just add a few lines, not a change of existing code).
So, the consol2 jar can accomplish everything the consol(1) jar could, and in the same manner, but also includes R2.1 support. Basically, the consol2 model is a copy of the R1.1 consol model, where the R2.1 changes inherit from it, and add to it.
This is more efficient/less error prone, vs working on two different models which may cause discrepancies. For the API user, it means less jars and no need for separate web services.
Thanks,
Dan
|
|
|
Re: Create CDA R1.1 and R2.1 [message #1755862 is a reply to message #1755852] |
Wed, 08 March 2017 16:57   |
sanj Guna Messages: 12 Registered: March 2017 |
Junior Member |
|
|
Thank you Dan. This is really helpful and it gave me the confidence of library selection.
Could you point me out to the source jars for these runtime jars.
On load, I see that CDAUtil.load(in, result) know how to identify that it is a CCDA 1.1 or 2.1 based on C-CDA document type is determined automatically by the II provided in the xml file.
How does it work when we create a document,
we use ConsolFactory.eINSTANCE.createContinuityOfCareDocument().init(); to create a document but it always create the 1.1 version. How do we create a 2.1 version document here.
[Updated on: Wed, 08 March 2017 19:14] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01869 seconds