diff options
| author | Paul-Christian Volkmer | 2026-01-22 14:06:07 +0100 |
|---|---|---|
| committer | GitHub | 2026-01-22 13:06:07 +0000 |
| commit | 2ba333c771c100ac463f9ca854185ed80c1ac7c4 (patch) | |
| tree | d20a8f555310e6ef8ef2301403f601fc0df3ba77 /src/main/kotlin/dev/dnpm | |
| parent | c9ccf9c1c92e49f927f2346e27032acd87174f48 (diff) | |
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.
Diffstat (limited to 'src/main/kotlin/dev/dnpm')
| -rw-r--r-- | src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt | 2 | ||||
| -rw-r--r-- | src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt | 26 |
2 files changed, 16 insertions, 12 deletions
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 |
