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

fix: column name for therapy line

This commit is contained in:
2025-06-25 23:39:38 +02:00
parent 95d29364ad
commit e15457d2af
2 changed files with 3 additions and 4 deletions

View File

@ -46,8 +46,8 @@ public class KpaTherapielinieDataMapper extends AbstractKpaTherapieverlaufDataMa
.id(resultSet.getString("id"))
.patient(getPatientReference(resultSet.getString("patient_id")))
.basedOn(Reference.builder().id(diseases.get(0).getString("id")).build())
.therapyLine(resultSet.getLong("nummer"))
.recordedOn(resultSet.getDate("erfassungsdatum"))
.therapyLine(resultSet.getLong("therapielinie"))
.intent(
getMtbTherapyIntentCoding(
resultSet.getString("intention"),

View File

@ -43,13 +43,13 @@ class KpaTherapielinieDataMapperTest {
void shouldMapResultSet(@Mock ResultSet resultSet) {
var testData = Map.of(
"id", "1",
"nummer", 42L,
"beginn", new java.sql.Date(Date.from(Instant.parse("2000-01-01T12:00:00Z")).getTime()),
"ende", new java.sql.Date(Date.from(Instant.parse("2024-06-19T12:00:00Z")).getTime()),
"erfassungsdatum", new java.sql.Date(Date.from(Instant.parse("2024-06-19T12:00:00Z")).getTime()),
"intention", "S",
"status", "stopped",
"statusgrund", "patient-death",
"therapielinie", 1L,
"patient_id", "42"
);
@ -101,6 +101,7 @@ class KpaTherapielinieDataMapperTest {
.isEqualTo("1");
assertThat(actual.getPatient())
.isEqualTo(Reference.builder().id("42").type("Patient").build());
assertThat(actual.getTherapyLine()).isEqualTo(42);
assertThat(actual.getPeriod())
.isEqualTo(
PeriodDate.builder()
@ -134,8 +135,6 @@ class KpaTherapielinieDataMapperTest {
.system("dnpm-dip/therapy/status-reason")
.build()
);
assertThat(actual.getTherapyLine())
.isEqualTo(1);
}
}