Posted: Aug 28, 2015 13:36 by moforiappiah------------------------------------------------------------------------------
I ma trying to import data into openempi using the file-loader-map-connectathon-v3-preconectathon.xml schema but I get the following error:
2015-08-28 15:21:03,079]ERROR766098[pool-1-thread-2] - org.openhie.openempi.loader.FlexibleFileLoader.loadMappingConfiguration(FlexibleFileLoader.java:183) - Unable to initialize the flexible file loader; the mapping file is not valid: java.lang.NullPointerException
java.lang.NullPointerException
at java.util.regex.Pattern.<init>(Pattern.java:1336)
at java.util.regex.Pattern.compile(Pattern.java:1022)
at org.openhie.openempi.loader.FlexibleFileLoader.loadMappingConfiguration(FlexibleFileLoader.java:166)
at org.openhie.openempi.loader.FlexibleFileLoader.init(FlexibleFileLoader.java:137)
at org.openhie.openempi.loader.FileLoaderManager.loadFile(FileLoaderManager.java:65)
at org.openhie.openempi.jobqueue.impl.FileImportJobTypeHandler.run(FileImportJobTypeHandler.java:51)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[2015-08-28 15:21:03,080] WARN766099[pool-1-thread-2] - org.openhie.openempi.jobqueue.impl.FileImportJobTypeHandler.run(FileImportJobTypeHandler.java:55) - Failed while trying to load a file: java.lang.RuntimeException: Unable to initialize the flexible file loader; the mapping file is not valid.
java.lang.RuntimeException: Unable to initialize the flexible file loader; the mapping file is not valid.
at org.openhie.openempi.loader.FlexibleFileLoader.loadMappingConfiguration(FlexibleFileLoader.java:184)
at org.openhie.openempi.loader.FlexibleFileLoader.init(FlexibleFileLoader.java:137)
at org.openhie.openempi.loader.FileLoaderManager.loadFile(FileLoaderManager.java:65)
at org.openhie.openempi.jobqueue.impl.FileImportJobTypeHandler.run(FileImportJobTypeHandler.java:51)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Can someone help. I have tried several times using the test data on this link but with no success
www.openempi.org/confluence/display/openempi30/Flexible+Data+Loader
Posted: Aug 31, 2015 19:27 by chrishi------------------------------------------------------------------------------
It looks like there is something wrong with the delimiter that is used in your mapping file. Can you post the section of the mapping file you are using?
Chris
Posted: Sep 03, 2015 09:05 by moforiappiah------------------------------------------------------------------------------
This is the mapping file details: I
<file-loader-map
xsi:schemaLocation="
http://configuration.openempi.openhie.org/fileloadermap fileloadermap.xsd"
xmlns="
http://configuration.openempi.openhie.org/fileloadermap"
xmlns:fl="
http://configuration.openempi.openhie.org/fileloadermap"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
delimeter=","
header-first-line="true">
<fields>
<field
datatype="String"
one-to-many="true"
is-identifier="true"
delimeter=":">
<subfields>
<field
datatype="String">
<column-index>1</column-index>
<field-name>identifier</field-name>
</field>
<field
datatype="String">
<column-index>2</column-index>
<field-name>namespaceIdentifier</field-name>
</field>
<field
datatype="String">
<column-index>3</column-index>
<field-name>universalIdentifier</field-name>
</field>
<field
datatype="String">
<column-index>4</column-index>
<field-name>universalIdentifierTypeCode</field-name>
</field>
</subfields>
</field>
<field
datatype="String">
<column-index>2</column-index>
<field-name>familyName</field-name>
</field>
<field
datatype="String">
<column-index>3</column-index>
<field-name>givenName</field-name>
</field>
<field
datatype="String">
<column-index>4</column-index>
<field-name>mothersMaidenName</field-name>
</field>
<field
datatype="Date"
date-format-string="yyyyMMdd">
<column-index>5</column-index>
<field-name>dateOfBirth</field-name>
</field>
<field
datatype="String">
<column-index>6</column-index>
<field-name>gender</field-name>
</field>
<field
datatype="String">
<column-index>7</column-index>
<field-name>address1</field-name>
</field>
<field
datatype="String">
<column-index>8</column-index>
<field-name>city</field-name>
</field>
<field
datatype="String">
<column-index>9</column-index>
<field-name>state</field-name>
</field>
<field
datatype="String">
<column-index>10</column-index>
<field-name>postalCode</field-name>
</field>
<field
datatype="String">
<column-index>11</column-index>
<field-name>phoneAreaCode</field-name>
</field>
<field
datatype="String">
<column-index>12</column-index>
<field-name>phoneNumber</field-name>
</field>
<field
datatype="String">
<column-index>13</column-index>
<field-name>ssn</field-name>
</field>
</fields>
</file-loader-map>
The data is in this format:
29050909

HA:2.16.840.1.113883.3.72.5.9.1:ISO,Paul,Solomons,Rebecca,19761215,M,378 Camila Road,Lynwood,GP,40202,502,566-5945,401-25-4355
It works when I remove the identity subfields and hard code both the domain name and delimiter in the source code.
Posted: Sep 04, 2015 15:57 by mdaly------------------------------------------------------------------------------
Yes I agree, I am currently running into this same issue. I need the mapping file to describe where to find the values in the imported data for the identifier domain attributes and dynamically assign them.
I have discovered that using the <subfields> element and using these child fields:
<field-name>universalIdentifier</field-name>
<field-name>namespaceIdentifier</field-name>
<field-name>universalIdentifierTypeCode</field-name>
<field-name>identifierDomainName</field-name>
does not work, and attempts to import a new identifier domain with null attributes which fails on SQL NULL constraints error. However, changing the mapping file to remove the <subfields> element and contents and instead assign the following attributes to the field element that represents the singular data import field:
is-identifier="true"
identifier-domain-name="SSN"
namespace-identifier="2.16.840.1.113883.4.1"
universal-identifier="2.16.840.1.113883.4.1"
universal-identifier-type-code="SSN"
The data import was changed to not have ':' delimited subfields for the identifier fields, and just have the IDs. This works, and imports the records. But the values must be hardcoded into the XML map on the server. How can we define a map to dynamically assign these values using imported data?
UPDATE:
I was able to get this working using the first method. In the import mapping XML file, I had to define the fields that contain the identifiers like this:
<field
datatype="String"
one-to-many="true"
is-identifier="true"
enclosing-character="""
delimiter=":">
<field-name>identifier</field-name>
<column-index>37</column-index>
<subfields>
<field datatype="String">
<column-index>1</column-index>
<field-name>identifier</field-name>
</field>
<field datatype="String">
<column-index>2</column-index>
<field-name>namespaceIdentifier</field-name>
</field>
</subfields>
</field>
This will add the data in the format "ID:OID" within the import record to the list of identifiers for the person record. The namespaceID values must correspond to an existing record in the identifier domains list.