Commit b5696287 authored by R.W.Majeed's avatar R.W.Majeed
Browse files

fixed NPE for CDAs with new encounters

parent fa97f30e
......@@ -142,7 +142,7 @@ public class CDAImporter extends AbstractCDAImporter implements AutoCloseable{
String patId = getAnonymizer().calculatePatientPseudonym(patientId[0], patientId[1]);"Using patid="+patId+", encid="+encId+", docid="+documentId);
I2b2Visit visit = visitStore.findVisit(encId);
if( false == patId.equals(visit.getPatientId()) ) {
if( visit != null && false == patId.equals(visit.getPatientId()) ) {
log.warning("Encounter "+encId+" assigned different patient "+patId);
// delete all facts for the encounter
try {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment