1
0
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:
2025-06-26 00:35:35 +02:00
parent f8d8936689
commit 4841aae3e7
3 changed files with 13 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ public class EinzelempfehlungWirkstoffDataMapper extends AbstractSubformDataMapp
resultSet.getInteger("evidenzlevel_propcat_version")
)
)
.medication(JsonToMedicationMapper.map(resultSet.getString("wirkstoffe_json")))
.build();
}

View File

@@ -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()