diff options
| author | Paul-Christian Volkmer | 2026-06-16 13:32:59 +0200 |
|---|---|---|
| committer | GitHub | 2026-06-16 11:32:59 +0000 |
| commit | 556577102ed8287b25351f68241264c7062fd362 (patch) | |
| tree | f3cb043706d33cffa5f66774d8e020fecde7e0d4 /src/main | |
| parent | efeccbd63040e5525fd574a7eb8f3180b64d7173 (diff) | |
feat: do not request research consent if reason missing is given (#298)
This is a first approach to make use of a reason missing given in MTB file at UKGM Marburg due to special handling of research consent.
Without these changes, the request will be canceled without any further processing.
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt | 25 |
1 files changed, 15 insertions, 10 deletions
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 a95420a..20a2ba3 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/services/ConsentProcessor.kt @@ -83,16 +83,6 @@ class ConsentProcessor( // 2.1 -> yes -> send mtb file // 2.2 -> no -> warn/info no consent given - /* - * broad consent - */ - val broadConsent = - consentService.getConsent(personIdentifierValue, requestDate, ConsentDomain.BROAD_CONSENT) - val broadConsentHasBeenAsked = broadConsent.entry.isNotEmpty() - - // fast exit - if patient has not been asked, we can skip and exit - if (!broadConsentHasBeenAsked) return false - // GenomDE_MV-Consent only if domain name available else fallback to file check val genomDeSequencingStatus = if (null != gIcsConfigProperties.genomDeConsentDomainName) { val genomeDeConsent = @@ -111,6 +101,21 @@ class ConsentProcessor( true } + /* + * broad consent + */ + if (null != mtbFile.metadata?.reasonResearchConsentMissing) { + // early return if there is a reason for missing broad consent + return false + } + + val broadConsent = + consentService.getConsent(personIdentifierValue, requestDate, ConsentDomain.BROAD_CONSENT) + val broadConsentHasBeenAsked = broadConsent.entry.isNotEmpty() + + // fast exit - if patient has not been asked, we can skip and exit + if (!broadConsentHasBeenAsked) return false + embedBroadConsentResources(mtbFile, broadConsent) val broadConsentStatus = |
