From cb00b972d7fcef08091e2b3103faea00c864357a Mon Sep 17 00:00:00 2001
From: VHofman <vincent.hofman@kereval.com>
Date: Thu, 20 Jun 2024 18:34:28 +0200
Subject: [PATCH] Adding Accept to the VPs

---
 ... Demographics Query-ValidationProfile.json | 26 +++++++++++++++++++
 ...mographics Retrieve-ValidationProfile.json | 26 +++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Query-ValidationProfile.json b/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Query-ValidationProfile.json
index eb9f2db..29dda31 100644
--- a/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Query-ValidationProfile.json	
+++ b/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Query-ValidationProfile.json	
@@ -114,6 +114,32 @@
           "regex": "^(?!f{2})([\\da-f]{2})-(?!0{32})([\\da-f]{32})-(?!0{16})([\\da-f]{16})-([\\da-f]{2})$"
         }
       ]
+    },{
+      "selector": "request.headers('Accept').values",
+      "id": "Accept_parameter_presence",
+      "description": "The Accept parameter is mandatory.",
+      "requirementPriority": "MANDATORY",
+      "checksComposition": "oneOf",
+      "checks": [
+        {
+          "type": "OCCURRENCE",
+          "minOccurrence": 1,
+          "maxOccurrence": 1
+        }
+      ]
+    },
+    {
+      "selector": "request.headers('Accept').values",
+      "id": "Accept_parameter_value",
+      "description": "Accept parameter's value SHALL be as defined in https://build.fhir.org/http.html#mime-type.",
+      "requirementPriority": "MANDATORY",
+      "checksComposition": "oneOf",
+      "checks": [
+        {
+          "type": "REGEX",
+          "regex": "^application\\/fhir\\+(xml|json|turtle)(;( )?fhirVersion=\\d\\.\\d)?$"
+        }
+      ]
     },
     {
       "selector": "request.uri.queryParams('_id').values",
diff --git a/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Retrieve-ValidationProfile.json b/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Retrieve-ValidationProfile.json
index 83cc9b3..2c7e381 100644
--- a/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Retrieve-ValidationProfile.json	
+++ b/EHS/CH-PDQm/CH-ITI-78-Patient-Mobile Patient Demographics Retrieve-ValidationProfile.json	
@@ -111,6 +111,32 @@
           "regex": "^(?!f{2})([\\da-f]{2})-(?!0{32})([\\da-f]{32})-(?!0{16})([\\da-f]{16})-([\\da-f]{2})$"
         }
       ]
+    },{
+      "selector": "request.headers('Accept').values",
+      "id": "Accept_parameter_presence",
+      "description": "The Accept parameter is mandatory.",
+      "requirementPriority": "MANDATORY",
+      "checksComposition": "oneOf",
+      "checks": [
+        {
+          "type": "OCCURRENCE",
+          "minOccurrence": 1,
+          "maxOccurrence": 1
+        }
+      ]
+    },
+    {
+      "selector": "request.headers('Accept').values",
+      "id": "Accept_parameter_value",
+      "description": "Accept parameter's value SHALL be as defined in https://build.fhir.org/http.html#mime-type.",
+      "requirementPriority": "MANDATORY",
+      "checksComposition": "oneOf",
+      "checks": [
+        {
+          "type": "REGEX",
+          "regex": "^application\\/fhir\\+(xml|json|turtle)(;( )?fhirVersion=\\d\\.\\d)?$"
+        }
+      ]
     }
   ]
 }
\ No newline at end of file
-- 
GitLab