diff --git a/api/src/main/java/org/openmrs/hl7/handler/ORUR01Handler.java b/api/src/main/java/org/openmrs/hl7/handler/ORUR01Handler.java index 83486065ef05..d9561c7657ac 100644 --- a/api/src/main/java/org/openmrs/hl7/handler/ORUR01Handler.java +++ b/api/src/main/java/org/openmrs/hl7/handler/ORUR01Handler.java @@ -15,6 +15,7 @@ import java.util.Date; import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.regex.Pattern; @@ -1272,8 +1273,21 @@ private void updateHealthCenter(Patient patient, PV1 pv1) { // save the patient and their new attribute Context.getPatientService().savePatient(patient); } - } log.debug("finished discharge to location method"); } + + private static class LazyConcept extends Concept { + public LazyConcept(Integer conceptId) { + super(conceptId); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null || getClass() != obj.getClass()) return false; + LazyConcept that = (LazyConcept) obj; + return this.getConceptId().equals(that.getConceptId()); + } + } }