web stats
Non-Coded CDA Document example - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2015, 08:14 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default Non-Coded CDA Document example

I'm having trouble getting the example shown at
https://bitbucket.org/itk/itk-payloa...Helper.textile

to work in Mirth Connect.

I downloaded the .jar file and added as a resource to my test channel.

In the destination transformer I'm trying to use:

Code:
 
 importPackage(Packages.uk.nhs.interoperability.payloads.*);
importPackage(Packages.uk.nhs.interoperability.payloads.DateValue);
importPackage(Packages.uk.nhs.interoperability.payloads.commontypes.*);
importPackage(Packages.uk.nhs.interoperability.payloads.exceptions.MissingMandatoryFieldException);
importPackage(Packages.uk.nhs.interoperability.payloads.helpers.*);
importPackage(Packages.uk.nhs.interoperability.payloads.noncodedcdav2.ClinicalDocument);
importPackage(Packages.uk.nhs.interoperability.payloads.util.FileWriter);
importPackage(Packages.uk.nhs.interoperability.payloads.vocabularies.generated.*);
importPackage(Packages.uk.nhs.interoperability.payloads.vocabularies.internal.*);
 
var fields = new NonCodedCDACommonFields();
to load the packages but get the following error:

374: importPackage(Packages.uk.nhs.interoperability.pay loads.*);
375: importPackage(Packages.uk.nhs.interoperability.pay loads.DateValue);
376: importPackage(Packages.uk.nhs.interoperability.pay loads.commontypes.*);
377: importPackage(Packages.uk.nhs.interoperability.pay loads.exceptions.MissingMandatoryFieldException);
378: importPackage(Packages.uk.nhs.interoperability.pay loads.helpers.*);
379: importPackage(Packages.uk.nhs.interoperability.pay loads.noncodedcdav2.ClinicalDocument);
LINE NUMBER: 375
DETAILS: Function importPackage must be called with a package; had "[JavaClass uk.nhs.interoperability.payloads.DateValue]" instead.
at cd98ed94-7f35-4db2-885f-ce2a9f0ed997:375 (doTransform)

If anyone can take the time to look up the example and show my how to produce this in Mirth Connect I would be very grateful.
Reply With Quote
  #2  
Old 06-12-2015, 08:43 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

The importPackage method only takes in a fully-qualified package name, not a specific class. So only include the packages you need, and then you'll have access to the classes within:

Code:
importPackage(Packages.uk.nhs.interoperability.payloads);
importPackage(Packages.uk.nhs.interoperability.payloads.commontypes);
importPackage(Packages.uk.nhs.interoperability.payloads.exceptions);
importPackage(Packages.uk.nhs.interoperability.payloads.helpers);
importPackage(Packages.uk.nhs.interoperability.payloads.noncodedcdav2);
importPackage(Packages.uk.nhs.interoperability.payloads.util);
importPackage(Packages.uk.nhs.interoperability.payloads.vocabularies.generated);
importPackage(Packages.uk.nhs.interoperability.payloads.vocabularies.internal);
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 06-12-2015, 09:41 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

I see.. thanks Nick
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation