Null pointer with patient correlation in HL7PRPA201301Transforms

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Null pointer with patient correlation in HL7PRPA201301Transforms

Jeff C.
Hey guys,

I'm getting the following null pointer when CONNECT tries to correlate patient IDs after receiving a patient discovery response:

 java.lang.NullPointerException
        at gov.hhs.fha.nhinc.transform.subdisc.HL7PRPA201301Transforms.copySender(HL7PRPA201301Transforms.java:521)
        at gov.hhs.fha.nhinc.transform.subdisc.HL7PRPA201301Transforms.createPRPA201301(HL7PRPA201301Transforms.java:179)
        at gov.hhs.fha.nhinc.patientdiscovery.response.TrustMode.sendToPatientCorrelationComponent(TrustMode.java:181)
        at gov.hhs.fha.nhinc.patientdiscovery.response.TrustMode.processResponse(TrustMode.java:99)
        at gov.hhs.fha.nhinc.patientdiscovery.entity.OutboundPatientDiscoveryProcessor.processResponse(OutboundPatientDiscoveryProcessor.java:169)
        at gov.hhs.fha.nhinc.patientdiscovery.entity.OutboundPatientDiscoveryProcessor.processResponse(OutboundPatientDiscoveryProcessor.java:132)
        at gov.hhs.fha.nhinc.patientdiscovery.entity.OutboundPatientDiscoveryProcessor.processNhinResponse(OutboundPatientDiscoveryProcessor.java:102)
        at gov.hhs.fha.nhinc.gateway.executorservice.NhinTaskExecutor.executeTask(NhinTaskExecutor.java:123)
        at gov.hhs.fha.nhinc.patientdiscovery.outbound.StandardOutboundPatientDiscovery.getResponseFromCommunities(StandardOutboundPatientDiscovery.java:209)
        at gov.hhs.fha.nhinc.patientdiscovery.outbound.StandardOutboundPatientDiscovery.respondingGatewayPRPAIN201305UV02(StandardOutboundPatientDiscovery.java:132)
        at gov.hhs.fha.nhinc.patientdiscovery.outbound.StandardOutboundPatientDiscovery$$FastClassByCGLIB$$2a321407.invoke(<generated>)

Here's the line that's failing in HL7PRPA201301Transforms:

newOrg.getId()
    .add(orig.getDevice().getAsAgent().getValue().getRepresentedOrganization().getValue().getId()
    .get(0));

And based on the sender we're getting back:

<sender typeCode="SND">
    <device classCode="DEV" determinerCode="INSTANCE">
        <id root="2.16.840.1.113883.3.2591.600.1.99.2.2"/>
        <telecom value=""/>
    </device>
</sender>

The null pointer is because there's no asAgent element.

I don't think the endpoint we're sending to is willing to change the response they're sending back. Is there any way around this? Will I just have to patch this locally?

This is with CONNECT 4.4.1.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Null pointer with patient correlation in HL7PRPA201301Transforms

christophermay07
Hey Jeff,

    We've opened a ticket for this Sprint to look into the issue, but on a cursory glance, the only way around this for now will be a local patch that wraps all the AsAgent-related lines in a null check against .getAsAgent().  I will update you when we have had a chance to look further into this issue.

Regards,

Chris May
CONNECT Product Team