diff options
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java | 9 | ||||
| -rw-r--r-- | src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java b/src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java index a69ba53..72238a3 100644 --- a/src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java +++ b/src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java @@ -40,8 +40,6 @@ public class GicsConsentService implements IConsentService { "/$currentPolicyStatesForPerson"; private static final String BROAD_CONSENT_PROFILE_URI = "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung"; - private static final String BROAD_CONSENT_POLICY = - "urn:oid:2.16.840.1.113883.3.1937.777.24.2.1791"; private final RetryTemplate retryTemplate; private final RestTemplate restTemplate; @@ -331,8 +329,11 @@ public class GicsConsentService implements IConsentService { return gIcsResultBundle; } - if (consentAsOne.getPolicy().stream().noneMatch(p -> p.getUri().equals(BROAD_CONSENT_POLICY))) { - consentAsOne.addPolicy(new Consent.ConsentPolicyComponent().setUri(BROAD_CONSENT_POLICY)); + if (consentAsOne.getPolicy().stream() + .noneMatch(p -> p.getUri().equals(gIcsConfigProperties.getBroadConsentPolicyUri()))) { + consentAsOne.addPolicy( + new Consent.ConsentPolicyComponent() + .setUri(gIcsConfigProperties.getBroadConsentPolicyUri())); } if (consentAsOne.getMeta().getProfile().stream() 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 ee33114..57ab06c 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt @@ -107,6 +107,11 @@ data class GIcsConfigProperties( val broadConsentPolicySystem: String = "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", /** + * Consent Policy uri for MII Broad Consent Version + */ + val broadConsentPolicyUri: String = "urn:oid:2.16.840.1.113883.3.1937.777.24.2.1790", + + /** * Value to expect in case of positiv consent */ val genomeDePolicyCode: String = "sequencing", |
