Announcement

Collapse
No announcement yet.

Non-Coded CDA Document example

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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.

    Comment


    • #3
      I see.. thanks Nick

      Comment

      Working...
      X