1
0
mirror of https://github.com/pcvolkmer/mv64e-onkostar-data.git synced 2025-09-13 16:02:52 +00:00

fix: possible NPE if no notes given

This commit is contained in:
2025-06-28 15:12:17 +02:00
parent 3119921ddd
commit c88f36f2ab
2 changed files with 11 additions and 3 deletions

View File

@@ -50,11 +50,15 @@ public class TherapieplanDataMapper implements DataMapper<MtbCarePlan> {
.id(therapieplanData.getString("id"))
.patient(getPatientReference(therapieplanData.getString("patient_id")))
.issuedOn(therapieplanData.getDate("datum"))
// TODO see https://github.com/dnpm-dip/mtb-model/issues/8
.notes(List.of(therapieplanData.getString("protokollauszug")))
.medicationRecommendations(einzelempfehlungWirkstoffDataMapper.getByParentId(id))
.procedureRecommendations(einzelempfehlungProzedurDataMapper.getByParentId(id))
;
if (therapieplanData.getString("protokollauszug") != null) {
// TODO see https://github.com/dnpm-dip/mtb-model/issues/8
builder.notes(List.of(therapieplanData.getString("protokollauszug")));
}
return builder.build();
}