1
0
mirror of https://github.com/pcvolkmer/mv64e-onkostar-data.git synced 2025-07-02 02:22:54 +00:00

feat: require radio button checked to extract medication recommendations

This commit is contained in:
2025-06-28 22:31:34 +02:00
parent 798729b874
commit 73526f296e
2 changed files with 11 additions and 2 deletions

View File

@ -53,10 +53,13 @@ public class TherapieplanDataMapper implements DataMapper<MtbCarePlan> {
.id(therapieplanData.getString("id"))
.patient(getPatientReference(therapieplanData.getString("patient_id")))
.issuedOn(therapieplanData.getDate("datum"))
.medicationRecommendations(einzelempfehlungWirkstoffDataMapper.getByParentId(id))
.procedureRecommendations(einzelempfehlungProzedurDataMapper.getByParentId(id))
;
if (therapieplanData.isTrue("mit_einzelempfehlung")) {
builder.medicationRecommendations(einzelempfehlungWirkstoffDataMapper.getByParentId(id));
}
// Formularfeld "protokollauszug"
if (therapieplanData.getString("protokollauszug") != null) {
// TODO see https://github.com/dnpm-dip/mtb-model/issues/8

View File

@ -46,7 +46,8 @@ class TherapieplanDataMapperTest {
"id", "1",
"patient_id", "42",
"wirkstoffe_json", "[{\"code\":\"\",\"name\":\"PARP-Inhibierung\",\"system\":\"UNREGISTERED\"}]",
"protokollauszug", "Das ist ein Protokollauszug"
"protokollauszug", "Das ist ein Protokollauszug",
"mit_einzelempfehlung", true
);
doAnswer(invocationOnMock -> {
@ -54,6 +55,11 @@ class TherapieplanDataMapperTest {
return testData.get(columnName);
}).when(resultSet).getString(anyString());
doAnswer(invocationOnMock -> {
var columnName = invocationOnMock.getArgument(0, String.class);
return testData.get(columnName);
}).when(resultSet).isTrue(anyString());
doAnswer(invocationOnMock -> resultSet)
.when(therapieplanCatalogue)
.getById(anyInt());