Hi everyone,
I’ve just joined Jembi and I’m starting to implement the National Pregnancy Register. We are using openEMPI as the Client Registry. I have some questions about identifiers and I’m hoping someone from this community can give me a hand.
We have a requirement that persons can have more than one identifier (SA National ID as well as a facility id and possibly a passport number as well), and an autogenerated global id that will be used for referencing records in other registries. I’m able to add a person via the api when specifying a SA National Id (I created this as a new identifier), but only when the section in the mpi-config.xml is not present. As soon as I add that the addPerson call fails with a null pointer exception. Details are below.
The getGlobalIdentifierById call also responds with a 404 error …(…openempi-admin/openempi-ws-rest/person-query-resource/getGlobalIdentifierById) is not available.
If anyone has any input and/or explanation about how the identifiers work please reply.
Many thanks,
Pierre
example addPerson payloads (with xml present in mpi-config.xml)
TestFamily
TestGiven
TestMiddle
2012-06-12T00:00:00-04:00
FAIL - stack trace below
TestFamily
TestGiven
TestMiddle
SUCCESS
TestFamily
TestGiven
TestMiddle
2012-06-12T00:00:00-04:00
<identifier>7404271222127</identifier>
<identifierDomain>
SANID
FAIL (but works when the global-identifier section is removed from the config) - stack trace below
The error message is:
Apache Tomcat/7.0.26 - Error reportHTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerExceptionorg.openhie.openempi.service.impl.PersonManagerServiceImpl.getGlobalPersonIdentifierCopy(PersonManagerServiceImpl.java:1656) org.openhie.openempi.service.impl.PersonManagerServiceImpl.findAndProcessAddRecordLinks(PersonManagerServiceImpl.java:1368) org.openhie.openempi.service.impl.PersonManagerServiceImpl.addPerson(PersonManagerServiceImpl.java:103) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) com.sun.proxy.$Proxy35.addPerson(Unknown Source) org.openempi.webservices.restful.resources.PersonManagerResource.addPerson(PersonManagerResource.java:58) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483) com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414) com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363) com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353) com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414) com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.26 logs.