Skip to content

Commit

Permalink
ORUR01Handler should load patient and concept from the datatabase -
Browse files Browse the repository at this point in the history
TRUNK-3929
  • Loading branch information
dkayiwa committed Mar 21, 2013
1 parent c758e5e commit cdd0d58
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/src/main/java/org/openmrs/hl7/handler/ORUR01Handler.java
Expand Up @@ -937,8 +937,7 @@ protected Concept getConcept(String hl7ConceptId, String codingSystem, String ui
// the concept is local
try {
Integer conceptId = new Integer(hl7ConceptId);
Concept concept = new Concept(conceptId);
return concept;
return Context.getConceptService().getConcept(conceptId);
}
catch (NumberFormatException e) {
throw new HL7Exception("Invalid concept ID '" + hl7ConceptId + "' in hl7 message with uid: " + uid);
Expand Down Expand Up @@ -1062,9 +1061,8 @@ private Patient getPatient(PID pid) throws HL7Exception {
Integer patientId = Context.getHL7Service().resolvePatientId(pid);
if (patientId == null)
throw new HL7Exception("Could not resolve patient");
Patient patient = new Patient();
patient.setPatientId(patientId);
return patient;

return Context.getPatientService().getPatient(patientId);
}

/**
Expand Down

0 comments on commit cdd0d58

Please sign in to comment.