From 2ba333c771c100ac463f9ca854185ed80c1ac7c4 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Thu, 22 Jan 2026 14:06:07 +0100 Subject: feat!: allow missing GenomDE gICS domain name (#244) If no domain name is given vor GenomDE consent, this will be ignored and the consent information must be present in incoming MTB data in order to satisfy DNPM:DIP.--- .../etl/processor/config/AppConfigProperties.kt | 2 +- .../etl/processor/services/ConsentProcessor.kt | 26 +++++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt b/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt index 96e48ea..d2922f2 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt @@ -85,7 +85,7 @@ data class GIcsConfigProperties( /** Domain of broad consent resources */ val broadConsentDomainName: String = "MII", /** Domain of Modelvorhaben 64e consent resources */ - val genomDeConsentDomainName: String = "GenomDE_MV", + val genomDeConsentDomainName: String? = null, /** Value to expect in case of positiv consent */ val broadConsentPolicyCode: String = "2.16.840.1.113883.3.1937.777.24.5.3.6", /** Consent Policy which should be used for consent check */ diff --git a/src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt b/src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt index 6b8ae89..1880528 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt @@ -74,25 +74,29 @@ class ConsentProcessor( // fast exit - if patient has not been asked, we can skip and exit if (!broadConsentHasBeenAsked) return false - val genomeDeConsent = - consentService.getConsent( - personIdentifierValue, - requestDate, - ConsentDomain.MODELLVORHABEN_64E, - ) + // GenomDE_MV-Consent only if domain name available else fallback to file check + val genomDeSequencingStatus = if (null != gIcsConfigProperties.genomDeConsentDomainName) { + val genomeDeConsent = + consentService.getConsent( + personIdentifierValue, + requestDate, + ConsentDomain.MODELLVORHABEN_64E, + ) - addGenomeDbProvisions(mtbFile, genomeDeConsent) + addGenomeDbProvisions(mtbFile, genomeDeConsent) - if (genomeDeConsent.entry.isNotEmpty()) setGenomDeSubmissionType(mtbFile) + if (genomeDeConsent.entry.isNotEmpty()) setGenomDeSubmissionType(mtbFile) + + getProvisionTypeByPolicyCode(genomeDeConsent, requestDate, ConsentDomain.MODELLVORHABEN_64E) + } else { + true + } embedBroadConsentResources(mtbFile, broadConsent) val broadConsentStatus = getProvisionTypeByPolicyCode(broadConsent, requestDate, ConsentDomain.BROAD_CONSENT) - val genomDeSequencingStatus = - getProvisionTypeByPolicyCode(genomeDeConsent, requestDate, ConsentDomain.MODELLVORHABEN_64E) - if (Consent.ConsentProvisionType.NULL == broadConsentStatus) { // bc not asked return false -- cgit v1.2.3