summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java9
-rw-r--r--src/main/kotlin/dev/dnpm/etl/processor/config/AppConfigProperties.kt5
-rw-r--r--src/test/resources/fake_broadConsent_mii_response_permit.json2
4 files changed, 13 insertions, 5 deletions
diff --git a/README.md b/README.md
index 151214a..c15b356 100644
--- a/README.md
+++ b/README.md
@@ -176,6 +176,8 @@ Modelvorhaben ยง64e.
Falls leer wird `2.16.840.1.113883.3.1937.777.24.5.3.6` angenommen.
* `APP_CONSENT_GICS_POLICYSYSTEM`: Das System der Einwilligung-Regel der Objekt-IDs. Falls leer wird
`urn:oid:2.16.840.1.113883.3.1937.777.24.5.3` angenommen.
+* `APP_CONSENT_GICS_POLICYURI`: Die Version der Einwilligung. Falls leer wird Version 1.6d
+ (`urn:oid:2.16.840.1.113883.3.1937.777.24.2.1790`) angenommen.
### Anmeldung mit einem Passwort
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",
diff --git a/src/test/resources/fake_broadConsent_mii_response_permit.json b/src/test/resources/fake_broadConsent_mii_response_permit.json
index 53f13b5..e701a28 100644
--- a/src/test/resources/fake_broadConsent_mii_response_permit.json
+++ b/src/test/resources/fake_broadConsent_mii_response_permit.json
@@ -56,7 +56,7 @@
"reference": "QuestionnaireResponse/7d314bc5-79b1-11f0-ab27-6ed0ed82d0fd"
},
"policy": [ {
- "uri": "urn:oid:2.16.840.1.113883.3.1937.777.24.2.1791"
+ "uri": "urn:oid:2.16.840.1.113883.3.1937.777.24.2.1790"
} ],
"provision": {
"type": "deny",