From 957a13a1c9bd09a32f534ff4ef3d3e49e9c58435 Mon Sep 17 00:00:00 2001
From: VHofman <vincent.hofman@kereval.com>
Date: Wed, 26 Jun 2024 17:40:39 +0200
Subject: [PATCH] Add active parameter checking for the PractitionerRole

---
 ...onerRole-GetRequest-ValidationProfile.json | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/EHS/CH_mCSD/CH-ITI-90-PractitionerRole-GetRequest-ValidationProfile.json b/EHS/CH_mCSD/CH-ITI-90-PractitionerRole-GetRequest-ValidationProfile.json
index 1904475..8e03fb6 100644
--- a/EHS/CH_mCSD/CH-ITI-90-PractitionerRole-GetRequest-ValidationProfile.json
+++ b/EHS/CH_mCSD/CH-ITI-90-PractitionerRole-GetRequest-ValidationProfile.json
@@ -284,6 +284,37 @@
           }
         ]
       },
+      {
+        "selector": "request.uri.queryParams('active').values",
+        "id": "active_parameter_presence",
+        "description": "active parameter can be used only once.",
+        "requirementPriority": "MANDATORY",
+        "checksComposition": "oneOf",
+        "checks": [
+          {
+            "type": "OCCURRENCE",
+            "minOccurrence": 0,
+            "maxOccurrence": 1
+          }
+        ]
+      },
+      {
+        "selector": "request.uri.queryParams('active').values",
+        "id": "active_parameter_value",
+        "description": "active parameter is a boolean and accept true or false values.",
+        "requirementPriority": "MANDATORY",
+        "checksComposition": "oneOf",
+        "applyIf": "request.uri.queryParams('active').values.size() > 0",
+        "checks": [
+          {
+            "type": "CLOSEDLIST",
+            "values": [
+              "true",
+              "false"
+            ]
+          }
+        ]
+      },
       {
         "selector": "request.uri.queryParams('organization').values",
         "id": "organization_parameter_presence",
-- 
GitLab