1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-04-21 02:06:50 +00:00

fix: ignore possible null values in mtb files

This commit is contained in:
Paul-Christian Volkmer 2024-03-12 17:56:25 +01:00
parent f47b0b7de4
commit af714f7b64
2 changed files with 98 additions and 98 deletions

View File

@ -11,7 +11,7 @@ plugins {
} }
group = "de.ukw.ccc" group = "de.ukw.ccc"
version = "0.9.0" version = "0.9.1"
var versions = mapOf( var versions = mapOf(
"bwhc-dto-java" to "0.2.0", "bwhc-dto-java" to "0.2.0",

View File

@ -73,151 +73,151 @@ infix fun MtbFile.anonymizeContentWith(pseudonymizeService: PseudonymizeService)
return "$prefix$hash" return "$prefix$hash"
} }
this.episode.apply { this.episode?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
this.carePlans.onEach { carePlan -> this.carePlans?.onEach { carePlan ->
carePlan.apply { carePlan?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
diagnosis = anonymize(diagnosis) diagnosis?.apply { anonymize(this) }
geneticCounsellingRequest = anonymize(geneticCounsellingRequest) geneticCounsellingRequest?.apply { anonymize(this) }
rebiopsyRequests = rebiopsyRequests.map { anonymize(it) } rebiopsyRequests = rebiopsyRequests.map { it?.apply { anonymize(this) } }
recommendations = recommendations.map { anonymize(it) } recommendations = recommendations.map { it?.apply { anonymize(this) } }
studyInclusionRequests = studyInclusionRequests.map { anonymize(it) } studyInclusionRequests = studyInclusionRequests.map { it?.apply { anonymize(this) } }
} }
} }
this.claims.onEach { claim -> this.claims?.onEach { claim ->
claim.apply { claim?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
therapy = anonymize(therapy) therapy?.apply { anonymize(this) }
} }
} }
this.claimResponses.onEach { claimResponse -> this.claimResponses?.onEach { claimResponse ->
claimResponse.apply { claimResponse?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
claim = anonymize(claim) claim?.apply { anonymize(this) }
} }
} }
this.consent.apply { this.consent?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
this.diagnoses.onEach { diagnosis -> this.diagnoses?.onEach { diagnosis ->
diagnosis.apply { diagnosis?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
histologyResults = histologyResults.map { anonymize(it) } histologyResults = histologyResults?.map { it?.apply { anonymize(this) } }
} }
} }
this.ecogStatus.onEach { ecogStatus -> this.ecogStatus?.onEach { ecogStatus ->
ecogStatus.apply { ecogStatus?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
} }
this.familyMemberDiagnoses.onEach { familyMemberDiagnosis -> this.familyMemberDiagnoses?.onEach { familyMemberDiagnosis ->
familyMemberDiagnosis.apply { familyMemberDiagnosis?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
} }
this.geneticCounsellingRequests.onEach { geneticCounsellingRequest -> this.geneticCounsellingRequests?.onEach { geneticCounsellingRequest ->
geneticCounsellingRequest.apply { geneticCounsellingRequest?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
} }
this.histologyReevaluationRequests.onEach { histologyReevaluationRequest -> this.histologyReevaluationRequests?.onEach { histologyReevaluationRequest ->
histologyReevaluationRequest.apply { histologyReevaluationRequest?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
} }
} }
this.histologyReports.onEach { histologyReport -> this.histologyReports?.onEach { histologyReport ->
histologyReport.apply { histologyReport?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
tumorMorphology.apply { tumorMorphology?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
} }
tumorCellContent.apply { tumorCellContent?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
} }
} }
} }
this.lastGuidelineTherapies.onEach { lastGuidelineTherapy -> this.lastGuidelineTherapies?.onEach { lastGuidelineTherapy ->
lastGuidelineTherapy.apply { lastGuidelineTherapy?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
diagnosis = anonymize(diagnosis) diagnosis?.apply { anonymize(this) }
} }
} }
this.molecularPathologyFindings.onEach { molecularPathologyFinding -> this.molecularPathologyFindings?.onEach { molecularPathologyFinding ->
molecularPathologyFinding.apply { molecularPathologyFinding?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
} }
} }
this.molecularTherapies.onEach { molecularTherapy -> this.molecularTherapies?.onEach { molecularTherapy ->
molecularTherapy.apply { molecularTherapy?.apply {
history.onEach { history -> history?.onEach { history ->
history.apply { history?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
basedOn = anonymize(basedOn) basedOn?.apply { anonymize(this) }
} }
} }
} }
} }
this.ngsReports.onEach { ngsReport -> this.ngsReports?.onEach { ngsReport ->
ngsReport.apply { ngsReport?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
tumorCellContent.apply { tumorCellContent?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
} }
simpleVariants.onEach { simpleVariant -> simpleVariants?.onEach { simpleVariant ->
simpleVariant.apply { simpleVariant?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
} }
} }
} }
this.previousGuidelineTherapies.onEach { previousGuidelineTherapy -> this.previousGuidelineTherapies?.onEach { previousGuidelineTherapy ->
previousGuidelineTherapy.apply { previousGuidelineTherapy?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
diagnosis = anonymize(diagnosis) diagnosis?.apply { anonymize(this) }
this.medication.forEach { medication -> this.medication.forEach { medication ->
medication.apply { medication?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
} }
} }
} }
this.rebiopsyRequests.onEach { rebiopsyRequest -> this.rebiopsyRequests?.onEach { rebiopsyRequest ->
rebiopsyRequest.apply { rebiopsyRequest?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
specimen = anonymize(specimen) specimen?.apply { anonymize(this) }
} }
} }
this.recommendations.onEach { recommendation -> this.recommendations?.onEach { recommendation ->
recommendation.apply { recommendation?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
diagnosis = anonymize(diagnosis) diagnosis?.apply { anonymize(this) }
ngsReport = anonymize(ngsReport) ngsReport?.apply { anonymize(this) }
} }
} }
this.responses.onEach { response -> this.responses?.onEach { response ->
response.apply { response?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
therapy = anonymize(therapy) therapy?.apply { anonymize(this) }
} }
} }
this.studyInclusionRequests.onEach { studyInclusionRequest -> this.studyInclusionRequests?.onEach { studyInclusionRequest ->
studyInclusionRequest.apply { studyInclusionRequest?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
reason = anonymize(reason) reason?.apply { anonymize(this) }
} }
} }
this.specimens.onEach { specimen -> this.specimens?.onEach { specimen ->
specimen.apply { specimen?.apply {
id = anonymize(id) id?.apply { anonymize(this) }
} }
} }
} }