Skip to content

Commit

Permalink
Formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Aug 9, 2024
1 parent a845ea3 commit 791664a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Location toFhirResource(@Nonnull org.openmrs.Location openmrsLocation) {
fhirLocation.setName(getMetadataTranslation(openmrsLocation));
fhirLocation.setDescription(openmrsLocation.getDescription());
fhirLocation.setAddress(locationAddressTranslator.toFhirResource(openmrsLocation));

Location.LocationPositionComponent position = null;
if (openmrsLocation.getLatitude() != null && !openmrsLocation.getLatitude().isEmpty()) {
double latitude = NumberUtils.toDouble(openmrsLocation.getLatitude(), -1.0d);
Expand All @@ -91,7 +91,7 @@ public Location toFhirResource(@Nonnull org.openmrs.Location openmrsLocation) {
position.setLatitude(latitude);
}
}

if (openmrsLocation.getLongitude() != null && !openmrsLocation.getLongitude().isEmpty()) {
double longitude = NumberUtils.toDouble(openmrsLocation.getLongitude(), -1.0d);
if (longitude >= 0.0d) {
Expand All @@ -101,7 +101,7 @@ public Location toFhirResource(@Nonnull org.openmrs.Location openmrsLocation) {
position.setLongitude(longitude);
}
}

if (position != null) {
fhirLocation.setPosition(position);
}
Expand All @@ -122,11 +122,11 @@ public Location toFhirResource(@Nonnull org.openmrs.Location openmrsLocation) {
tag.getDescription());
}
}

if (openmrsLocation.getParentLocation() != null) {
fhirLocation.setPartOf(locationReferenceTranslator.toFhirResource(openmrsLocation.getParentLocation()));
}

fhirLocation.getMeta().setLastUpdated(getLastUpdated(openmrsLocation));
fhirLocation.getMeta().setVersionId(getVersionId(openmrsLocation));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private static String getLocalization(String shortClassName, String uuid) {
catch (Exception e) {
log.info("Caught exception while attempting to localize code [{}]", code, e);
}

if (localization == null || localization.equals(code)) {
return null;
} else {
Expand Down

0 comments on commit 791664a

Please sign in to comment.