|Re: Create CDA R1.1 and R2.1 [message #1755852 is a reply to message #1755688]
||Wed, 08 March 2017 15:46
| Dan Brown
Registered: December 2015
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
// Access (or initialize) the R2.1 or R1.1 singleton instance (without MU2 certification)
// C-CDA document type is determined automatically by the II provided in the xml file
Or for MU2 R1.1 validation:
// Reload Mu2consolPackage into the registry if it has been unloaded so we get back dual results
// Access (or initialize) the R1.1 with MU2 certification singleton instance
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.
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.
Powered by FUDForum
. Page generated in 0.02293 seconds