mirror of
https://github.com/pcvolkmer/etl-processor.git
synced 2025-04-20 17:56:50 +00:00
fix: assign new value from scope function
This commit is contained in:
parent
af714f7b64
commit
12eb1feea6
@ -74,150 +74,152 @@ infix fun MtbFile.anonymizeContentWith(pseudonymizeService: PseudonymizeService)
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.episode?.apply {
|
this.episode?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let {
|
||||||
|
anonymize(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.carePlans?.onEach { carePlan ->
|
this.carePlans?.onEach { carePlan ->
|
||||||
carePlan?.apply {
|
carePlan?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
diagnosis?.apply { anonymize(this) }
|
diagnosis = diagnosis?.let { anonymize(it) }
|
||||||
geneticCounsellingRequest?.apply { anonymize(this) }
|
geneticCounsellingRequest = geneticCounsellingRequest?.let { anonymize(it) }
|
||||||
rebiopsyRequests = rebiopsyRequests.map { it?.apply { anonymize(this) } }
|
rebiopsyRequests = rebiopsyRequests.map { it?.let { anonymize(it) } }
|
||||||
recommendations = recommendations.map { it?.apply { anonymize(this) } }
|
recommendations = recommendations.map { it?.let { anonymize(it) } }
|
||||||
studyInclusionRequests = studyInclusionRequests.map { it?.apply { anonymize(this) } }
|
studyInclusionRequests = studyInclusionRequests.map { it?.let { anonymize(it) } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.claims?.onEach { claim ->
|
this.claims?.onEach { claim ->
|
||||||
claim?.apply {
|
claim?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
therapy?.apply { anonymize(this) }
|
therapy = therapy?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.claimResponses?.onEach { claimResponse ->
|
this.claimResponses?.onEach { claimResponse ->
|
||||||
claimResponse?.apply {
|
claimResponse?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
claim?.apply { anonymize(this) }
|
claim = claim?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.consent?.apply {
|
this.consent?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
this.diagnoses?.onEach { diagnosis ->
|
this.diagnoses?.onEach { diagnosis ->
|
||||||
diagnosis?.apply {
|
diagnosis?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
histologyResults = histologyResults?.map { it?.apply { anonymize(this) } }
|
histologyResults = histologyResults?.map { it?.let { anonymize(it) } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.ecogStatus?.onEach { ecogStatus ->
|
this.ecogStatus?.onEach { ecogStatus ->
|
||||||
ecogStatus?.apply {
|
ecogStatus?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.familyMemberDiagnoses?.onEach { familyMemberDiagnosis ->
|
this.familyMemberDiagnoses?.onEach { familyMemberDiagnosis ->
|
||||||
familyMemberDiagnosis?.apply {
|
familyMemberDiagnosis?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.geneticCounsellingRequests?.onEach { geneticCounsellingRequest ->
|
this.geneticCounsellingRequests?.onEach { geneticCounsellingRequest ->
|
||||||
geneticCounsellingRequest?.apply {
|
geneticCounsellingRequest?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.histologyReevaluationRequests?.onEach { histologyReevaluationRequest ->
|
this.histologyReevaluationRequests?.onEach { histologyReevaluationRequest ->
|
||||||
histologyReevaluationRequest?.apply {
|
histologyReevaluationRequest?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.histologyReports?.onEach { histologyReport ->
|
this.histologyReports?.onEach { histologyReport ->
|
||||||
histologyReport?.apply {
|
histologyReport?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
tumorMorphology?.apply {
|
tumorMorphology?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
tumorCellContent?.apply {
|
tumorCellContent?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.lastGuidelineTherapies?.onEach { lastGuidelineTherapy ->
|
this.lastGuidelineTherapies?.onEach { lastGuidelineTherapy ->
|
||||||
lastGuidelineTherapy?.apply {
|
lastGuidelineTherapy?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
diagnosis?.apply { anonymize(this) }
|
diagnosis = diagnosis?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.molecularPathologyFindings?.onEach { molecularPathologyFinding ->
|
this.molecularPathologyFindings?.onEach { molecularPathologyFinding ->
|
||||||
molecularPathologyFinding?.apply {
|
molecularPathologyFinding?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.molecularTherapies?.onEach { molecularTherapy ->
|
this.molecularTherapies?.onEach { molecularTherapy ->
|
||||||
molecularTherapy?.apply {
|
molecularTherapy?.apply {
|
||||||
history?.onEach { history ->
|
history?.onEach { history ->
|
||||||
history?.apply {
|
history?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
basedOn?.apply { anonymize(this) }
|
basedOn = basedOn?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.ngsReports?.onEach { ngsReport ->
|
this.ngsReports?.onEach { ngsReport ->
|
||||||
ngsReport?.apply {
|
ngsReport?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
tumorCellContent?.apply {
|
tumorCellContent?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
simpleVariants?.onEach { simpleVariant ->
|
simpleVariants?.onEach { simpleVariant ->
|
||||||
simpleVariant?.apply {
|
simpleVariant?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.previousGuidelineTherapies?.onEach { previousGuidelineTherapy ->
|
this.previousGuidelineTherapies?.onEach { previousGuidelineTherapy ->
|
||||||
previousGuidelineTherapy?.apply {
|
previousGuidelineTherapy?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
diagnosis?.apply { anonymize(this) }
|
diagnosis = diagnosis?.let { anonymize(it) }
|
||||||
this.medication.forEach { medication ->
|
medication.forEach { medication ->
|
||||||
medication?.apply {
|
medication?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.rebiopsyRequests?.onEach { rebiopsyRequest ->
|
this.rebiopsyRequests?.onEach { rebiopsyRequest ->
|
||||||
rebiopsyRequest?.apply {
|
rebiopsyRequest?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
specimen?.apply { anonymize(this) }
|
specimen = specimen?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.recommendations?.onEach { recommendation ->
|
this.recommendations?.onEach { recommendation ->
|
||||||
recommendation?.apply {
|
recommendation?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
diagnosis?.apply { anonymize(this) }
|
diagnosis = diagnosis?.let { anonymize(it) }
|
||||||
ngsReport?.apply { anonymize(this) }
|
ngsReport = ngsReport?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.responses?.onEach { response ->
|
this.responses?.onEach { response ->
|
||||||
response?.apply {
|
response?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
therapy?.apply { anonymize(this) }
|
therapy = therapy?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.studyInclusionRequests?.onEach { studyInclusionRequest ->
|
this.studyInclusionRequests?.onEach { studyInclusionRequest ->
|
||||||
studyInclusionRequest?.apply {
|
studyInclusionRequest?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
reason?.apply { anonymize(this) }
|
reason = reason?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.specimens?.onEach { specimen ->
|
this.specimens?.onEach { specimen ->
|
||||||
specimen?.apply {
|
specimen?.apply {
|
||||||
id?.apply { anonymize(this) }
|
id = id?.let { anonymize(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user