Announcement

Collapse
No announcement yet.

How to use OpenCSV in channel?

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

  • How to use OpenCSV in channel?

    I am new to using Java functions and I am trying to use OpenCSV to read in a CSV file to use as a cross reference file.

    I put the OpenCSV.jar file in: C:\Program Files\Mirth Connect\custom-lib

    Went into Settings-->Resources and made sure the library was loaded.

    I am stuck on how to use the functions within my Javascript step. I can't seem to find any examples of it used in Mirth. Does anyone have any insights?

    Thanks!

  • #2
    There are many, many examples here on the forums if you search. There's also an article on our wiki about it.

    Basically all you do to access a Java class is use "Packages.[package name].[class name]". For example if you wanted to access FileUtils you would use "Packages.org.apache.commons.io.FileUtils". The "Packages." part is optional to common top-level package domains (com/net/org/java/etc.)
    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
      Thanks Narupley. I did come across that Wiki page, but was having issues getting OpenCSV to work. I will do some more digging.

      Comment


      • #4
        What "doesn't work"? If you give more information, then people here might be able to help.
        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

        Working...
        X