Skip to content

Commit 249ba64

Browse files
committed
accept prefilled dvquantity
1 parent c9220ef commit 249ba64

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/de/uksh/medic/etl/openehrmapper/Generator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ public void gen_DV_QUANTITY(String path, String name, Object jsonmap,
801801
unitDisplayName = q.getUnit();
802802
}
803803
}
804+
case DvQuantity dvq -> ((Element) jsonmap).setValue(dvq);
804805
default -> {
805806
}
806807
}
@@ -809,7 +810,7 @@ public void gen_DV_QUANTITY(String path, String name, Object jsonmap,
809810
return;
810811
}
811812

812-
if (isInBounds(path, unit, magnitude, violations)) {
813+
if (((Element) jsonmap).getValue() != null && isInBounds(path, unit, magnitude, violations)) {
813814
DvQuantity dvq = new DvQuantity(unit, magnitude, precision);
814815
if (unitDisplayName != null) {
815816
dvq.setUnitsDisplayName(unitDisplayName);

0 commit comments

Comments
 (0)