mirror of
https://github.com/pcvolkmer/mv64e-onkostar-data.git
synced 2025-09-13 16:02:52 +00:00
feat: add JSON to medication mapping for Einzelempfehlung
This commit is contained in:
@@ -40,6 +40,7 @@ public class EinzelempfehlungWirkstoffDataMapper extends AbstractSubformDataMapp
|
||||
resultSet.getInteger("evidenzlevel_propcat_version")
|
||||
)
|
||||
)
|
||||
.medication(JsonToMedicationMapper.map(resultSet.getString("wirkstoffe_json")))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,9 @@ public class JsonToMedicationMapper {
|
||||
}
|
||||
|
||||
public static List<AtcUnregisteredMedicationCoding> map(String wirkstoffejson) {
|
||||
if (wirkstoffejson == null) {
|
||||
return List.of();
|
||||
}
|
||||
try {
|
||||
return new ObjectMapper().readValue(wirkstoffejson, new TypeReference<List<Wirkstoff>>() {
|
||||
}).stream()
|
||||
|
Reference in New Issue
Block a user