summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2025-10-23 09:57:55 +0200
committerGitHub2025-10-23 09:57:55 +0200
commitf284da254a71c6e028df89ab69ca77ba423cca48 (patch)
treec602a027eb232cafeb65b0ec32673117e4c8555f /src
parente3841c23fcebd7139e6d278c0d9989e75bd0d211 (diff)
fix: remove entry from consent.category (#162)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java7
-rw-r--r--src/test/resources/fake_broadConsent_mii_response_permit.json5
2 files changed, 7 insertions, 5 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 be6cbc0..a1a613e 100644
--- a/src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java
+++ b/src/main/java/dev/dnpm/etl/processor/consent/GicsConsentService.java
@@ -318,6 +318,13 @@ public class GicsConsentService implements IConsentService {
consentAsOne.setPolicyRule(null);
+ consentAsOne
+ .getCategory()
+ .removeIf(
+ category ->
+ category.hasCoding(
+ "http://fhir.de/ConsentManagement/CodeSystem/ResultType", "policy"));
+
final var miiConsentCategory = new CodeableConcept();
miiConsentCategory.addCoding(
new Coding()
diff --git a/src/test/resources/fake_broadConsent_mii_response_permit.json b/src/test/resources/fake_broadConsent_mii_response_permit.json
index 6ec5343..53f13b5 100644
--- a/src/test/resources/fake_broadConsent_mii_response_permit.json
+++ b/src/test/resources/fake_broadConsent_mii_response_permit.json
@@ -40,11 +40,6 @@
} ]
}, {
"coding": [ {
- "system": "http://fhir.de/ConsentManagement/CodeSystem/ResultType",
- "code": "policy"
- } ]
- }, {
- "coding": [ {
"system": "https://www.medizininformatik-initiative.de/fhir/modul-consent/CodeSystem/mii-cs-consent-consent_category",
"code": "2.16.840.1.113883.3.1937.777.24.2.184"
} ]