Closed af-pwo closed 3 years ago
The error is logic according to the following code in SmokingStatusCompositionConverter
(line 45):
effectiveDateTime = observation.getEffectiveDateTimeType().getValueAsCalendar().toZonedDateTime();
According to the SmokingStatus profile, effectiveDateTime
is not mandatory. As a result, a NullPointerException occurs when .toZonedDateTime()
is invoked when the value is not provided in the JSON.
I just pushed the following fix:
GregorianCalendar effectiveDateTime = observation.getEffectiveDateTimeType().getValueAsCalendar();
if (effectiveDateTime != null) {
result.setStartTimeValue(effectiveDateTime.toZonedDateTime());
}
thanks @subigre that is a known issue of many mappings that were not taking into account the alternatives for effective[x]
Done.
Test Case/s To Reproduce Issue
Alternative Flows Observation Smoking Status