summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2026-11-02 12:54:54 +0100
committerGitHub2026-11-02 11:54:54 +0000
commitdba675ae494ee836e1138f6133e2b2bd3233ea8e (patch)
treeb9b575e0667724b622186d6ef8695219406356b8 /src/main
parent348dbc3b617ae960fcb7818c743d2bf6750f0f15 (diff)
feat: update data model for use with DNPM:DIP 1.3.5 (#332)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/dev/dnpm/etl/processor/pseudonym/extensions.kt11
-rw-r--r--src/main/kotlin/dev/dnpm/etl/processor/services/RequestProcessor.kt3
2 files changed, 13 insertions, 1 deletions
diff --git a/src/main/kotlin/dev/dnpm/etl/processor/pseudonym/extensions.kt b/src/main/kotlin/dev/dnpm/etl/processor/pseudonym/extensions.kt
index 21f3a7f..cc13a04 100644
--- a/src/main/kotlin/dev/dnpm/etl/processor/pseudonym/extensions.kt
+++ b/src/main/kotlin/dev/dnpm/etl/processor/pseudonym/extensions.kt
@@ -95,6 +95,9 @@ infix fun PatientRecord.pseudonymizeWith(pseudonymizeService: PseudonymizeServic
this.systemicTherapies?.filterNotNull()?.forEach { systemicTherapy ->
systemicTherapy.history?.filterNotNull()?.forEach { it.patient?.id = patientPseudonym }
}
+ this.studyInclusions?.filterNotNull()?.forEach { studyInclusion ->
+ studyInclusion.history?.filterNotNull()?.forEach { it.patient?.id = patientPseudonym }
+ }
this.followUps?.filterNotNull()?.forEach { it.patient?.id = patientPseudonym }
this.msiFindings?.filterNotNull()?.forEach { it.patient?.id = patientPseudonym }
@@ -278,6 +281,14 @@ infix fun PatientRecord.anonymizeContentWith(pseudonymizeService: PseudonymizeSe
history.basedOn?.id = history.basedOn?.id?.let(::anonymize)
}
}
+
+ this.studyInclusions?.filterNotNull()?.forEach { studyInclusion ->
+ studyInclusion.history?.filterNotNull()?.forEach { history ->
+ history.id = history.id?.let(::anonymize)
+ history.reason?.id = history.reason?.id?.let(::anonymize)
+ history.basedOn?.id = history.basedOn?.id?.let(::anonymize)
+ }
+ }
}
fun PatientRecord.ensureMetaDataIsInitialized() {
diff --git a/src/main/kotlin/dev/dnpm/etl/processor/services/RequestProcessor.kt b/src/main/kotlin/dev/dnpm/etl/processor/services/RequestProcessor.kt
index 6ce9d14..d94bfb3 100644
--- a/src/main/kotlin/dev/dnpm/etl/processor/services/RequestProcessor.kt
+++ b/src/main/kotlin/dev/dnpm/etl/processor/services/RequestProcessor.kt
@@ -372,11 +372,12 @@ class RequestProcessor(
}
private fun fingerprint(s: String): Fingerprint {
- return Fingerprint(
+ val f = Fingerprint(
Base32().encodeAsString(DigestUtils.sha256(s))
.replace("=", "")
.lowercase()
)
+ return f
}
}