From 827dc75eaf9ad3707cf46b6949b415ca02cbf0b5 Mon Sep 17 00:00:00 2001 From: Stanslaus Date: Thu, 14 Oct 2021 18:18:35 +0300 Subject: [PATCH] NPE check on importing patient obs --- .../api/impl/RegistrationCoreServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/registrationcore/api/impl/RegistrationCoreServiceImpl.java b/api/src/main/java/org/openmrs/module/registrationcore/api/impl/RegistrationCoreServiceImpl.java index 53a1c39..e49df57 100644 --- a/api/src/main/java/org/openmrs/module/registrationcore/api/impl/RegistrationCoreServiceImpl.java +++ b/api/src/main/java/org/openmrs/module/registrationcore/api/impl/RegistrationCoreServiceImpl.java @@ -464,7 +464,9 @@ public String importMpiPatient(String patientIdentifier, String patientIdentifie memberObs.setPerson(savedPatient); memberObs.setObsGroup(next); } - registrationEncounter.addObs(next); + if(next.getConcept()!= null){ + registrationEncounter.addObs(next); + } } // Save everything in one place at least - for now, missing observations.