Skip to content

Commit

Permalink
Merge pull request #1213 from mozzy11/develop
Browse files Browse the repository at this point in the history
incoming Order Location should be populated on Order Entry
  • Loading branch information
mozzy11 authored Jul 31, 2024
2 parents 6d674c4 + d8632c9 commit ad75b49
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,20 @@ private void createOrderXML(String orderMessage, String patientGuid, StringBuild

private void addRequestingOrg(StringBuilder xml) {
xml.append("<requestingOrg>");
org.openelisglobal.organization.valueholder.Organization organization = null;
if (referringOrganization != null) {
org.openelisglobal.organization.valueholder.Organization organization = organizationService
organization = organizationService
.getOrganizationByFhirId(referringOrganization.getIdElement().getIdPart());
XMLUtil.appendKeyValue("fhir-id", referringOrganization.getIdElement().getIdPart(), xml);
}
if (organization == null && task.getLocation() != null) {
organization = organizationService
.getOrganizationByFhirId(task.getLocation().getReferenceElement().getIdPart());
}

if (organization != null) {
XMLUtil.appendKeyValue("fhir-id", organization.getFhirUuidAsString(), xml);
XMLUtil.appendKeyValue("id", organization.getId(), xml);
XMLUtil.appendKeyValue("name", organization.getOrganizationName(), xml);
}
xml.append("</requestingOrg>");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,11 @@ private Observation transformResultToObservation(Result result) {
observation.setIssued(analysis.getReleasedDate()); // update to get Released Date instead of commpleted date
// observation.setEffective(new
// DateTimeType(result.getLastupdated()));
observation.setEffective(new DateTimeType(analysis.getReleasedDate()));
if (analysis.getReleasedDate() != null) {
observation.setEffective(new DateTimeType(analysis.getReleasedDate()));
} else {
observation.setEffective(new DateTimeType(analysis.getStartedDate()));
}
// observation.setIssued(new Date());
return observation;
}
Expand Down

0 comments on commit ad75b49

Please sign in to comment.