Skip to content

Commit

Permalink
Change condition and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
celinepelletier committed Oct 4, 2024
1 parent 780c685 commit 05a6eca
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ private static ByteBuffer bytesForString(String string) {
return ByteBuffer.wrap(string.getBytes(StandardCharsets.UTF_8));
}

// valueQuantity and valueCode from DeviceProperty in FHIR R4 should not be treated as value[x] fields.
private static Boolean isRealValueXField(Base base, String fieldName) {
return !(base instanceof Device.DevicePropertyComponent) || (!fieldName.equals("valueQuantity") && !fieldName.equals("valueCode"));
return !((base instanceof Device.DevicePropertyComponent) && (fieldName.equals("valueQuantity") || fieldName.equals("valueCode")));
}

private static Optional<Property> getProperty(Base base, Schema.Field field) {
Expand Down

0 comments on commit 05a6eca

Please sign in to comment.