diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml new file mode 100644 index 00000000..f3bf628c --- /dev/null +++ b/.github/workflows/pr-checks.yaml @@ -0,0 +1,49 @@ +name: Sandbox Check +on: pull_request +jobs: + test-sandbox-and-postman: + name: "Test Sandbox and Postman" + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + - name: Install poetry + run: pipx install poetry + - uses: actions/setup-python@v6 + with: + python-version: "3.13" + cache: "poetry" + - name: Install dependencies + run: make install + - name: Install Sandobx dependencies + run: make install + working-directory: sandbox + - name: Check Sandbox Formatting + run: make format + - name: Run Sandbox Linting + run: make lint + - name: Run Sandbox Unit Tests + run: make test + working-directory: sandbox + - name: Test Postman Collection agaist Sandbox + working-directory: sandbox + run: | + # 1. Run Flask in the background (using 'poetry run python -m flask') + # We use FLASK_DEBUG=1 to see the 500 errors in the console + cp -r $GITHUB_WORKSPACE/specification/examples/responses/. $GITHUB_WORKSPACE/sandbox/api/examples/ + FLASK_DEBUG=1 poetry run python -m flask --app api.app:app run -p 9000 & + FLASK_PID=$! + + # 2. Use npx to wait for the server to actually be ready + npx wait-on http://127.0.0.1:9000/health --timeout 30000 + + # 3. Run your tests + echo "Running Newman tests..." + npx newman run ../postman/validated_relationship_service.sandbox.postman_collection.json --env-var baseUrl=http://127.0.0.1:9000/FHIR/R4 + + # 4. Cleanup: Kill the Flask process using the PID we saved + echo "Shutting down Flask..." + kill $FLASK_PID diff --git a/.github/workflows/push-collection-to-postman.yml b/.github/workflows/push-collection-to-postman.yml index 36d9039d..49d2b0f5 100644 --- a/.github/workflows/push-collection-to-postman.yml +++ b/.github/workflows/push-collection-to-postman.yml @@ -7,10 +7,6 @@ name: Push Postman collection changes to public collection on: workflow_dispatch: inputs: - should_push_sandbox: - type: boolean - description: Push Sandbox collection - default: false should_push_integration: type: boolean description: Push Integration collection @@ -27,7 +23,6 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event_name == 'push' }} outputs: - sandbox: ${{ steps.filter.outputs.sandbox }} integration: ${{ steps.filter.outputs.integration }} steps: - name: Checkout @@ -38,34 +33,9 @@ jobs: id: filter with: filters: | - sandbox: - - './postman/validated_relationship_service.sandbox.postman_collection.json' integration: - './postman/validated_relationship_service.integration.postman_collection.json' - push-sandbox-postman: - name: Push Sandbox collection to Postman - runs-on: ubuntu-latest - needs: [detect-changes] - if: | - always () && ( - (github.event_name == 'push' && needs.detect-changes.outputs.sandbox == 'true') || - (github.event_name == 'workflow_dispatch' && github.event.inputs.should_push_sandbox == 'true') - ) - steps: - - name: Checkout - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - name: Push Sandbox Postman collection - id: push_sandbox_postman_collection - uses: gcatanese/push-to-postman-action@main - with: - goal: update - postman-key: ${{ secrets.POSTMAN_API_KEY }} - postman-file: './postman/validated_relationship_service.sandbox.postman_collection.json' - collection-id: ${{ secrets.POSTMAN_SANDBOX_COLLECTION_ID }} - push-integration-postman: name: Push Integration collection to Postman runs-on: ubuntu-latest diff --git a/.github/workflows/run-postman-collection.yml b/.github/workflows/run-postman-collection.yml index 6058ad61..5ea9445e 100644 --- a/.github/workflows/run-postman-collection.yml +++ b/.github/workflows/run-postman-collection.yml @@ -16,4 +16,4 @@ jobs: - name: Install Newman run: npm install -g newman - name: Run Postman Collection - run: newman run "./postman/Validated Relationship Service Sandbox.postman_collection.json" + run: newman run "./postman/validated_relationship_service.sandbox.postman_collection.json" diff --git a/.github/workflows/sandbox-checks.yaml b/.github/workflows/sandbox-checks.yaml deleted file mode 100644 index 7bfe0c72..00000000 --- a/.github/workflows/sandbox-checks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Sandbox Check -on: pull_request -jobs: - sandbox-check: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v5 - - name: Install poetry - run: pipx install poetry - - uses: actions/setup-python@v6 - with: - python-version: "3.13" - cache: "poetry" - - name: Install Sandbox dependencies - run: make install - working-directory: ./sandbox - - name: Install CI dependencies - run: poetry install --only ci --no-root - - name: Check Sandbox Formatting - run: make format - - name: Run Sandbox Linting - run: make lint - - name: Run Sandbox Unit Tests - run: make test - working-directory: ./sandbox diff --git a/Makefile b/Makefile index ba9d25fa..a8b8477e 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,16 @@ clean: rm -rf build rm -rf dist +# Generate Postman Collection +generate-postman-collection: + npx portman --cliOptionsFile scripts/portman/portman-cli.json + +# Test Postman Collection +test-postman-collection: +# Optional arguments: +# SANDBOX_BASE_URL: The base URL for the sandbox environment (default is https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4) + npx newman run postman/validated_relationship_service.sandbox.postman_collection.json --env-var baseUrl=$(SANDBOX_BASE_URL) + #Creates the fully expanded OAS spec in json publish: clean mkdir -p build diff --git a/package-lock.json b/package-lock.json index 0f7aaeb3..075c2468 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,229 @@ "version": "0.0.1", "license": "MIT", "devDependencies": { + "@apideck/portman": "~=1.33.0", "@openapitools/openapi-generator-cli": "^2.20.2", "apigeetool": "^0.16.4", "license-checker": "^25.0.1", - "minimist": "^1.2.2" + "minimist": "^1.2.2", + "newman": "~=6.2.1" + } + }, + "node_modules/@apideck/better-ajv-errors": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.6.tgz", + "integrity": "sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-schema": "^0.4.0", + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, + "node_modules/@apideck/portman": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/@apideck/portman/-/portman-1.33.0.tgz", + "integrity": "sha512-qqUZETrP8eXrOAa+f3PI2YRs0VwMvgy3Ct0ZmWfeICrGLXXqyz9JADfp0oDLkNBmPvVhEU5ptH6o/JOXnuQ0kA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@apideck/better-ajv-errors": "^0.3.6", + "@apidevtools/swagger-parser": "^10.1.1", + "@faker-js/faker": "5.5.3", + "ajv": "^8.17.1", + "axios": "^1.12.0", + "chalk": "^4.1.2", + "dot-object": "^2.1.5", + "dotenv": "^10.0.0", + "fp-ts": "^2.16.11", + "fs-extra": "^10.1.0", + "lodash": "^4.17.21", + "neotraverse": "^0.6.18", + "newman": "^6.2.1", + "node-emoji": "^1.11.0", + "openapi-format": "^1.28.0", + "openapi-to-postmanv2": "5.0.0", + "openapi-types": "9.1.0", + "ora": "^5.4.1", + "pluralize": "^8.0.0", + "postman-collection": "5.0.2", + "prompts": "^2.4.2", + "yargs": "^17.7.2" + }, + "bin": { + "portman": "bin/portman" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@apideck/portman/node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@apideck/portman/node_modules/axios": { + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/@apideck/portman/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@apideck/portman/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@apideck/portman/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@apideck/portman/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.7.2", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.2.tgz", + "integrity": "sha512-4gY54eEGEstClvEkGnwVkTkrx0sqwemEFG5OSRRn3tD91XH0+Q8XIkYIfo7IwEWPpJZwILb9GUXeShtplRc/eA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.1.1.tgz", + "integrity": "sha512-u/kozRnsPO/x8QtKYJOqoGtC4kH6yg1lfYkB9Au0WhYB0FNLpyFusttQtvhlwjtG3rOwiRz4D8DnnXa8iEpIKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "11.7.2", + "@apidevtools/openapi-schemas": "^2.1.0", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "ajv": "^8.17.1", + "ajv-draft-04": "^1.0.0", + "call-me-maybe": "^1.0.2" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, + "node_modules/@apidevtools/swagger-parser/node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/@babel/runtime": { @@ -27,6 +246,65 @@ "node": ">=6.9.0" } }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@faker-js/faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==", + "deprecated": "Please update to a newer version.", + "dev": true, + "license": "MIT" + }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, "node_modules/@lukeed/csprng": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", @@ -300,10 +578,11 @@ } }, "node_modules/@postman/tunnel-agent": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.3.tgz", - "integrity": "sha512-k57fzmAZ2PJGxfOA4SGR05ejorHbVAa/84Hxh/2nAztjNXc4ZjOm9NUIk6/Z6LCrBvJZqjRZbN8e/nROVUPVdg==", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.8.tgz", + "integrity": "sha512-2U42SmZW5G+suEcS++zB94sBWNO4qD4bvETGFRFDTqSpYl5ksfjcPqzYpgQgXgUmb6dfz+fAGbkcRamounGm0w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -311,6 +590,53 @@ "node": "*" } }, + "node_modules/@stoplight/ordered-object-literal": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@stoplight/ordered-object-literal/-/ordered-object-literal-1.0.5.tgz", + "integrity": "sha512-COTiuCU5bgMUtbIFBuyyh2/yVVzlr5Om0v5utQDgBCuQUOPgU1DwoffkTfg4UBQOvByi5foF4w4T+H9CoRe5wg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/types": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-14.1.1.tgz", + "integrity": "sha512-/kjtr+0t0tjKr+heVfviO9FrU/uGLc+QNX3fHJc19xsCNYqU7lVhaXxDmEID9BZTjG+/r9pK9xP/xU02XGg65g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/yaml": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@stoplight/yaml/-/yaml-4.3.0.tgz", + "integrity": "sha512-JZlVFE6/dYpP9tQmV0/ADfn32L9uFarHWxfcRhReKUnljz1ZiUM5zpX+PH8h5CJs6lao3TuFqnPm9IJJCEkE2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.5", + "@stoplight/types": "^14.1.1", + "@stoplight/yaml-ast-parser": "0.0.50", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=10.8" + } + }, + "node_modules/@stoplight/yaml-ast-parser": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@stoplight/yaml-ast-parser/-/yaml-ast-parser-0.0.50.tgz", + "integrity": "sha512-Pb6M8TDO9DtSVla9yXSTAxmo9GVEouq5P40DWXdOie69bXogZTkgvopCq+yEvTMA0F6PEvdJmbtTV3ccIp11VQ==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/@tokenizer/inflate": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.2.7.tgz", @@ -369,6 +695,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -386,14 +719,15 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -401,6 +735,39 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -440,6 +807,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/api-ref-bundler": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/api-ref-bundler/-/api-ref-bundler-0.4.3.tgz", + "integrity": "sha512-FHzgrNIg7CHw59tl0GVdc7jng+ORiDGgcm6+EDANKqfMjFQY570GJMT0/89/dYloPN3w7zBTKURnIEcA2sTCXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-crawl": "0.4.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/apigeetool": { "version": "0.16.4", "resolved": "https://registry.npmjs.org/apigeetool/-/apigeetool-0.16.4.tgz", @@ -467,6 +847,13 @@ "npm": ">= 8.3.0" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -487,6 +874,7 @@ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } @@ -496,6 +884,7 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8" } @@ -593,6 +982,7 @@ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } @@ -680,6 +1070,7 @@ "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz", "integrity": "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==", "dev": true, + "license": "MIT", "dependencies": { "base64-js": "^1.1.2" } @@ -726,17 +1117,29 @@ "node": ">= 0.8" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "dev": true, + "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -745,18 +1148,24 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-bind-apply-helpers": { + "node_modules/call-me-maybe": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/case-anything": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", + "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==", "dev": true, "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, "engines": { - "node": ">= 0.4" + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" } }, "node_modules/caseless": { @@ -799,6 +1208,16 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "node_modules/charset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", + "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", @@ -817,6 +1236,19 @@ "node": ">=8" } }, + "node_modules/cli-progress": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.12.0.tgz", + "integrity": "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.3" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/cli-spinners": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", @@ -841,6 +1273,22 @@ "node": ">= 0.2.0" } }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, "node_modules/cli-width": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", @@ -941,6 +1389,29 @@ "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", "dev": true }, + "node_modules/compute-gcd": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", + "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "node_modules/compute-lcm": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", + "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", + "dev": true, + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1039,11 +1510,19 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, + "node_modules/csv-parse": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.3.tgz", + "integrity": "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==", + "dev": true, + "license": "MIT" + }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -1108,23 +1587,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/degenerator": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", @@ -1158,6 +1620,17 @@ "node": ">= 0.8" } }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -1178,6 +1651,40 @@ "wrappy": "1" } }, + "node_modules/dot-object": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/dot-object/-/dot-object-2.1.5.tgz", + "integrity": "sha512-xHF8EP4XH/Ba9fvAF2LDd5O3IITVolerVV6xvkxoM8zlGEiCUrggpAnHyOoKJKCrhvPcGATFAUwIujj7bRG5UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^6.1.0", + "glob": "^7.1.6" + }, + "bin": { + "dot-object": "bin/dot-object" + } + }, + "node_modules/dot-object/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=10" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -1207,6 +1714,7 @@ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, + "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -1281,6 +1789,13 @@ "node": ">= 0.4" } }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", + "dev": true, + "license": "MIT" + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -1394,7 +1909,8 @@ "dev": true, "engines": [ "node >=0.6.0" - ] + ], + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -1406,7 +1922,8 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-safe-stringify": { "version": "2.1.1", @@ -1415,6 +1932,23 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fflate": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", @@ -1456,10 +1990,27 @@ "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, + "node_modules/filesize": { + "version": "10.1.4", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.1.4.tgz", + "integrity": "sha512-ryBwPIIeErmxgPnm6cbESAzXjuEFubs+yKYLBZvg3CaiNcmkJChoOGcBSrZ6IwkMwPABwPpVXE6IlNdGJJrvEg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 10.4.0" + } + }, + "node_modules/flatted": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", + "dev": true, + "license": "ISC" + }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "dev": true, "funding": [ { @@ -1477,6 +2028,13 @@ } } }, + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", + "dev": true, + "license": "MIT" + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1487,21 +2045,29 @@ } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { "node": ">= 6" } }, + "node_modules/fp-ts": { + "version": "2.16.11", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.16.11.tgz", + "integrity": "sha512-LaI+KaX2NFkfn1ZGHoKCmcfv7yrZsC3b8NtWsTVQeHkq4F27vI5igUuO53sxqDEa2gNQMHFPmpojDw/1zmUK7w==", + "dev": true, + "license": "MIT" + }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -1645,6 +2211,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } @@ -1688,11 +2255,44 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.15" + } + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "dev": true, + "license": "ISC", "engines": { "node": ">=4" } @@ -1703,6 +2303,7 @@ "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "deprecated": "this library is no longer supported", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -1711,6 +2312,30 @@ "node": ">=6" } }, + "node_modules/har-validator/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/har-validator/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1720,18 +2345,6 @@ "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -1834,20 +2447,70 @@ "dev": true, "license": "MIT" }, + "node_modules/http-reasons": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/http-reasons/-/http-reasons-0.1.0.tgz", + "integrity": "sha512-P6kYh0lKZ+y29T2Gqz+RlC9WBLhKe8kDmcJ+A+611jFfxdPsbMRQ5aNmFRM3lENqFkK+HTTL+tlQviAiv0AbLQ==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/http-signature": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", - "sshpk": "^1.14.1" + "sshpk": "^1.18.0" }, "engines": { "node": ">=0.10" } }, + "node_modules/http2-client": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==", + "dev": true, + "license": "MIT" + }, + "node_modules/httpntlm": { + "version": "1.8.13", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.8.13.tgz", + "integrity": "sha512-2F2FDPiWT4rewPzNMg3uPhNkP3NExENlUGADRUDPQvuftuUTGW98nLZtGemCIW3G40VhWZYgkIDcQFAwZ3mf2Q==", + "dev": true, + "funding": [ + { + "type": "paypal", + "url": "https://www.paypal.com/donate/?hosted_button_id=2CKNJLZJBW8ZC" + }, + { + "type": "buymeacoffee", + "url": "https://www.buymeacoffee.com/samdecrock" + } + ], + "dependencies": { + "des.js": "^1.0.1", + "httpreq": ">=0.4.22", + "js-md4": "^0.3.2", + "underscore": "~1.12.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/httpreq": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-1.1.1.tgz", + "integrity": "sha512-uhSZLPPD2VXXOSN8Cni3kIsoFHaU2pT/nySEU/fHr/ePbqHYr0jeiQRmUKLEirC09SFPsdMoA7LU7UXMd/w0Kw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.15.1" + } + }, "node_modules/https-proxy-agent": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", @@ -2058,11 +2721,69 @@ "node": ">=6" } }, + "node_modules/jose": { + "version": "4.14.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz", + "integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/js-md4": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", + "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-sha512": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/js-sha512/-/js-sha512-0.9.0.tgz", + "integrity": "sha512-mirki9WS/SUahm+1TbAPkqvbCiCfOAAsyXeHxK1UkullnJVVqoJG2pL9ObvT05CN+tM7fxhfYm0NbXn+1hWoZg==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/jsep": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/json-crawl": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/json-crawl/-/json-crawl-0.4.2.tgz", + "integrity": "sha512-MOKk9cjtpMrP4H1DmG+PtS7aFWg9OuSqxc/wpFcOE++yVnD5Bi5iKoXD6oqs+kltRwJRgZBYMozRNpQpxD/TJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -2070,17 +2791,53 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "foreach": "^2.0.4" + } + }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, + "node_modules/json-schema-compare": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", + "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.4" + } + }, + "node_modules/json-schema-merge-allof": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.8.1.tgz", + "integrity": "sha512-CTUKmIlPJbsWfzRRnOXz+0MjIqvnleIXwFTzz+t9T86HnYX/Rozria6ZVGLktAU9e+NygNljveP+yxqtQp/Q4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "compute-lcm": "^1.1.2", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.20" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", @@ -2100,14 +2857,44 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsprim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "node_modules/jsonpath-plus": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.4.0.tgz", + "integrity": "sha512-T92WWatJXmhBbKsgH/0hl+jxjdXrifi5IKeMY02DWggRxX0UElcbVzPlmgLTbvsPeW1PasQ6xE2Q75stkhGbsA==", "dev": true, - "engines": [ + "license": "MIT", + "dependencies": { + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" + }, + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -2127,6 +2914,26 @@ "setimmediate": "^1.0.5" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/license-checker": { "version": "25.0.1", "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz", @@ -2234,6 +3041,16 @@ "immediate": "~3.0.5" } }, + "node_modules/liquid-json": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/liquid-json/-/liquid-json-0.3.1.tgz", + "integrity": "sha512-wUayTU8MS827Dam6MxgD72Ui+KOSF+u/eIqpatOtjnvgJ0+mnDq33uC2M7J0tPK+upe/DpUAuK4JUU89iBoNKQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=4" + } + }, "node_modules/load-esm": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/load-esm/-/load-esm-1.0.2.tgz", @@ -2348,6 +3165,16 @@ "node": ">= 0.6" } }, + "node_modules/mime-format": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.2.tgz", + "integrity": "sha512-Y5ERWVcyh3sby9Fx2U5F1yatiTFjNsqF5NltihTWI9QgNtr5o3dbCZdcKa1l2wyfhnwwoP9HGNxga7LqZLA6gw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, "node_modules/mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", @@ -2369,6 +3196,13 @@ "node": ">=6" } }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2438,6 +3272,23 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neotraverse": { + "version": "0.6.18", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", + "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, "node_modules/netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", @@ -2454,6 +3305,206 @@ "integrity": "sha512-ye8AIYWQcP9MvoM1i0Z2jV0qed31Z8EWXYnyGNkiUAd+Fo8J+7uy90xTV8g/oAbhtjkY7iZbNTizQaXdKUuwpQ==", "dev": true }, + "node_modules/newman": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/newman/-/newman-6.2.2.tgz", + "integrity": "sha512-BmGzMz6f2FLtw/hHAbhEAVqXS+3APJGAWzlxVijSElFaxC37wpHEqsOB09d/2uHMvTyMXGArtbFa+z5m/a68Uw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@postman/tough-cookie": "4.1.3-postman.1", + "async": "3.2.5", + "chardet": "2.0.0", + "cli-progress": "3.12.0", + "cli-table3": "0.6.5", + "colors": "1.4.0", + "commander": "11.1.0", + "csv-parse": "4.16.3", + "filesize": "10.1.4", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mkdirp": "3.0.1", + "postman-collection": "4.4.0", + "postman-collection-transformer": "4.1.8", + "postman-request": "2.88.1-postman.48", + "postman-runtime": "7.39.1", + "pretty-ms": "7.0.1", + "semver": "7.6.3", + "serialised-error": "1.1.3", + "word-wrap": "1.2.5", + "xmlbuilder": "15.1.1" + }, + "bin": { + "newman": "bin/newman.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/newman/node_modules/chardet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.0.0.tgz", + "integrity": "sha512-xVgPpulCooDjY6zH4m9YW3jbkaBe3FKIAvF5sj5t7aBNsVl2ljIE+xwJ4iNgiDZHFQvNIpjdKdVOQvvk5ZfxbQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/newman/node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/newman/node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/newman/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/newman/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/newman/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman/node_modules/mime-format": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.1.tgz", + "integrity": "sha512-XxU3ngPbEnrYnNbIX+lYSaYg0M01v6p2ntd2YaFksTu0vayaw5OJvbdRyWs07EYRlLED5qadUZ+xo+XhOvFhwg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, + "node_modules/newman/node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/newman/node_modules/postman-collection": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.4.0.tgz", + "integrity": "sha512-2BGDFcUwlK08CqZFUlIC8kwRJueVzPjZnnokWPtJCd9f2J06HBQpGL7t2P1Ud1NEsK9NHq9wdipUhWLOPj5s/Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.35", + "postman-url-encoder": "3.0.5", + "semver": "7.5.4", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman/node_modules/postman-collection/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman/node_modules/postman-url-encoder": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.5.tgz", + "integrity": "sha512-jOrdVvzUXBC7C+9gkIkpDJ3HIxOHTIqjpQ4C1EMt1ZGeMvSEpbFCKq23DEfgsj46vMnDgyQf+1ZLp2Wm+bKSsA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21" + } + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -2475,6 +3526,46 @@ } } }, + "node_modules/node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "http2-client": "^1.2.5" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-oauth1": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/node-oauth1/-/node-oauth1-1.3.0.tgz", + "integrity": "sha512-0yggixNfrA1KcBwvh/Hy2xAS1Wfs9dcg6TdFf2zN7gilcAigMdrtZ4ybrBSXBgLvGDw9V1p2MRnGBMq7XjTWLg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/node-readfiles": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es6-promise": "^3.2.1" + } + }, "node_modules/node-unzip-2": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/node-unzip-2/-/node-unzip-2-0.2.8.tgz", @@ -2544,74 +3635,400 @@ "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", "dev": true }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "node_modules/oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", "dev": true, - "engines": { - "node": "*" + "license": "BSD-3-Clause", + "dependencies": { + "fast-safe-stringify": "^2.0.7" } }, - "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "node_modules/oas-linter": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", + "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", "dev": true, - "engines": { - "node": ">= 0.4" + "license": "BSD-3-Clause", + "dependencies": { + "@exodus/schemasafe": "^1.0.0-rc.2", + "should": "^13.2.1", + "yaml": "^1.10.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "node_modules/oas-resolver": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", + "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "ee-first": "1.1.1" + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" }, - "engines": { - "node": ">= 0.8" + "bin": { + "resolve": "resolve.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/oas-resolver-browser": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver-browser/-/oas-resolver-browser-2.5.6.tgz", + "integrity": "sha512-Jw5elT/kwUJrnGaVuRWe1D7hmnYWB8rfDDjBnpQ+RYY/dzAewGXeTexXzt4fGEo6PUE4eqKqPWF79MZxxvMppA==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "wrappy": "1" + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "path-browserify": "^1.0.1", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "resolve": "resolve.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "node_modules/oas-resolver-browser/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { - "mimic-fn": "^2.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "node_modules/oas-resolver-browser/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/oas-resolver-browser/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/oas-resolver-browser/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/oas-resolver/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/oas-resolver/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/oas-resolver/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/oas-resolver/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/oas-schema-walker": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", + "dev": true, + "license": "BSD-3-Clause", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", + "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "call-me-maybe": "^1.0.1", + "oas-kit-common": "^1.0.8", + "oas-linter": "^3.2.2", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "reftools": "^1.1.9", + "should": "^13.2.1", + "yaml": "^1.10.0" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/openapi-format": { + "version": "1.29.3", + "resolved": "https://registry.npmjs.org/openapi-format/-/openapi-format-1.29.3.tgz", + "integrity": "sha512-EinE5+DmnzhKopgZ21YfWpTHYJJrhsGm/9p7ZTSg2ye5NALRttKwntw5dFWW2YSMdpusjG1SnMH9fiT55Y8weA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@stoplight/yaml": "^4.3.0", + "api-ref-bundler": "^0.4.3", + "case-anything": "2.1.10", + "jsonpath-plus": "^10.3.0", + "neotraverse": "^0.6.18" + }, + "bin": { + "openapi-format": "bin/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/openapi-to-postmanv2": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/openapi-to-postmanv2/-/openapi-to-postmanv2-5.0.0.tgz", + "integrity": "sha512-ousMf9rXKen9tscJQ0H8BE+hfgOvFRb2SspYwGnQTmnjzkPNejHUQpNmRUIK/gZ6ZwiNWAnQCKWNogaZXUlFew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "ajv": "8.11.0", + "ajv-draft-04": "1.0.0", + "ajv-formats": "2.1.1", + "async": "3.2.4", + "commander": "2.20.3", + "graphlib": "2.1.8", + "js-yaml": "4.1.0", + "json-pointer": "0.6.2", + "json-schema-merge-allof": "0.8.1", + "lodash": "4.17.21", + "neotraverse": "0.6.15", + "oas-resolver-browser": "2.5.6", + "object-hash": "3.0.0", + "path-browserify": "1.0.1", + "postman-collection": "^5.0.0", + "swagger2openapi": "7.0.8", + "yaml": "1.10.2" + }, + "bin": { + "openapi2postmanv2": "bin/openapi2postmanv2.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/openapi-to-postmanv2/node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/openapi-to-postmanv2/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/openapi-to-postmanv2/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/openapi-to-postmanv2/node_modules/neotraverse": { + "version": "0.6.15", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.15.tgz", + "integrity": "sha512-HZpdkco+JeXq0G+WWpMJ4NsX3pqb5O7eR9uGz3FfoFt+LYzU8iRWp49nJtud6hsDoywM8tIrDo3gjgmOqJA8LA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/openapi-types": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-9.1.0.tgz", + "integrity": "sha512-mhXh8QN8sbErlxfxBeZ/pzgvmDn443p8CXlxwGSi2bWANZAFvjLPI0PoGjqHW+JdBbXg6uvmvM81WXaweh/SVA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", "is-unicode-supported": "^0.1.0", "log-symbols": "^4.1.0", "strip-ansi": "^6.0.0", @@ -2726,6 +4143,23 @@ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, + "node_modules/parse-ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", + "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -2800,13 +4234,296 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postman-collection": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-5.0.2.tgz", + "integrity": "sha512-6nq0D1n4TyCcw8XEQ57e/IiSDWhkFuwiSqNMxKCbRlVN2xRsJEkBtX2qtaNqlp+wFQW/2WsyYJA1R21HBAAllg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.2", + "mime-types": "2.1.35", + "postman-url-encoder": "3.0.7", + "semver": "7.7.1", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/postman-collection-transformer": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-4.1.8.tgz", + "integrity": "sha512-smJ6X7Z7kbg6hp7JZPFixrSN3J3WkQed7DrWCC5tF7IxOMpFLqhtTtGssY8nD1inP8+mJf+N72Pf2ttUAHgBKw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "commander": "8.3.0", + "inherits": "2.0.4", + "lodash": "4.17.21", + "semver": "7.5.4", + "strip-json-comments": "3.1.1" + }, + "bin": { + "postman-collection-transformer": "bin/transform-collection.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection-transformer/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection-transformer/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-collection/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-collection/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } }, "node_modules/postman-request": { - "version": "2.88.1-postman.33", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.33.tgz", - "integrity": "sha512-uL9sCML4gPH6Z4hreDWbeinKU0p0Ke261nU7OvII95NU22HN6Dk7T/SaVPaj6T4TsQqGKIFw6/woLZnH7ugFNA==", + "version": "2.88.1-postman.48", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.48.tgz", + "integrity": "sha512-E32FGh8ig2KDvzo4Byi7Ibr+wK2gNKPSqXoNsvjdCHgDBxSK4sCUwv+aa3zOBUwfiibPImHMy0WdlDSSCTqTuw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@postman/form-data": "~3.1.1", + "@postman/tough-cookie": "~4.1.3-postman.1", + "@postman/tunnel-agent": "^0.6.8", + "aws-sign2": "~0.7.0", + "aws4": "^1.12.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "http-signature": "~1.4.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "^2.1.35", + "oauth-sign": "~0.9.0", + "qs": "~6.14.1", + "safe-buffer": "^5.1.2", + "socks-proxy-agent": "^8.0.5", + "stream-length": "^1.0.2", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/postman-request/node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/postman-runtime": { + "version": "7.39.1", + "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.39.1.tgz", + "integrity": "sha512-IRNrBE0l1K3ZqQhQVYgF6MPuqOB9HqYncal+a7RpSS+sysKLhJMkC9SfUn1HVuOpokdPkK92ykvPzj8kCOLYAg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@postman/tough-cookie": "4.1.3-postman.1", + "async": "3.2.5", + "aws4": "1.12.0", + "handlebars": "4.7.8", + "httpntlm": "1.8.13", + "jose": "4.14.4", + "js-sha512": "0.9.0", + "lodash": "4.17.21", + "mime-types": "2.1.35", + "node-forge": "1.3.1", + "node-oauth1": "1.3.0", + "performance-now": "2.1.0", + "postman-collection": "4.4.0", + "postman-request": "2.88.1-postman.34", + "postman-sandbox": "4.7.1", + "postman-url-encoder": "3.0.5", + "serialised-error": "1.1.3", + "strip-json-comments": "3.1.1", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/postman-runtime/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-runtime/node_modules/http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/postman-runtime/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-runtime/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-runtime/node_modules/mime-format": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.1.tgz", + "integrity": "sha512-XxU3ngPbEnrYnNbIX+lYSaYg0M01v6p2ntd2YaFksTu0vayaw5OJvbdRyWs07EYRlLED5qadUZ+xo+XhOvFhwg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, + "node_modules/postman-runtime/node_modules/postman-collection": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.4.0.tgz", + "integrity": "sha512-2BGDFcUwlK08CqZFUlIC8kwRJueVzPjZnnokWPtJCd9f2J06HBQpGL7t2P1Ud1NEsK9NHq9wdipUhWLOPj5s/Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.35", + "postman-url-encoder": "3.0.5", + "semver": "7.5.4", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-runtime/node_modules/postman-request": { + "version": "2.88.1-postman.34", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.34.tgz", + "integrity": "sha512-GkolJ4cIzgamcwHRDkeZc/taFWO1u2HuGNML47K9ZAsFH2LdEkS5Yy8QanpzhjydzV3WWthl9v60J8E7SjKodQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@postman/form-data": "~3.1.1", "@postman/tough-cookie": "~4.1.3-postman.1", @@ -2835,21 +4552,208 @@ "node": ">= 6" } }, - "node_modules/postman-request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "node_modules/postman-runtime/node_modules/postman-url-encoder": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.5.tgz", + "integrity": "sha512-jOrdVvzUXBC7C+9gkIkpDJ3HIxOHTIqjpQ4C1EMt1ZGeMvSEpbFCKq23DEfgsj46vMnDgyQf+1ZLp2Wm+bKSsA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-runtime/node_modules/qs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.5.tgz", + "integrity": "sha512-mzR4sElr1bfCaPJe7m8ilJ6ZXdDaGoObcYR0ZHSsktM/Lt21MVHj5De30GQH2eiZ1qGRTO7LCAzQsUeXTNexWQ==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.6" } }, + "node_modules/postman-runtime/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-sandbox": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.7.1.tgz", + "integrity": "sha512-H2wYSLK0mB588IaxoLrLoPbpmxsIcwFtgaK2c8gAsAQ+TgYFePwb4qdeVcYDMqmwrLd77/ViXkjasP/sBMz1sQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lodash": "4.17.21", + "postman-collection": "4.4.0", + "teleport-javascript": "1.0.0", + "uvm": "2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-sandbox/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-sandbox/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-sandbox/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-sandbox/node_modules/mime-format": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.1.tgz", + "integrity": "sha512-XxU3ngPbEnrYnNbIX+lYSaYg0M01v6p2ntd2YaFksTu0vayaw5OJvbdRyWs07EYRlLED5qadUZ+xo+XhOvFhwg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "charset": "^1.0.0" + } + }, + "node_modules/postman-sandbox/node_modules/postman-collection": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.4.0.tgz", + "integrity": "sha512-2BGDFcUwlK08CqZFUlIC8kwRJueVzPjZnnokWPtJCd9f2J06HBQpGL7t2P1Ud1NEsK9NHq9wdipUhWLOPj5s/Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@faker-js/faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.35", + "postman-url-encoder": "3.0.5", + "semver": "7.5.4", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-sandbox/node_modules/postman-url-encoder": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.5.tgz", + "integrity": "sha512-jOrdVvzUXBC7C+9gkIkpDJ3HIxOHTIqjpQ4C1EMt1ZGeMvSEpbFCKq23DEfgsj46vMnDgyQf+1ZLp2Wm+bKSsA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-sandbox/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-url-encoder": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.7.tgz", + "integrity": "sha512-JlWT4yLtL01ogxL+PSzs89++2sKdxsJrk5QrWken/VzKx5b+UMQ646/glZA3MbqfL3KtsUqanLhL0PQtkmcUyg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pretty-ms": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", + "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-ms": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/proxy-agent": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", @@ -3081,6 +4985,16 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/reftools": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", + "dev": true, + "license": "BSD-3-Clause", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", @@ -3096,6 +5010,16 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -3181,7 +5105,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -3198,21 +5123,37 @@ "semver": "bin/semver" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "node_modules/serialised-error": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/serialised-error/-/serialised-error-1.1.3.tgz", + "integrity": "sha512-vybp3GItaR1ZtO2nxZZo8eOo7fnVaNtP3XE2vJKgzkKR2bagCkdJ1EpYYhEMd3qu/80DwQk9KjsNSxE3fXWq0g==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, + "object-hash": "^1.1.2", + "stack-trace": "0.0.9", + "uuid": "^3.0.0" + } + }, + "node_modules/serialised-error/node_modules/object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">= 0.10.0" + } + }, + "node_modules/serialised-error/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "bin/uuid" } }, "node_modules/setimmediate": { @@ -3227,16 +5168,134 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", + "dev": true, + "license": "MIT" + }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "dev": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bound": "^1.0.2", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -3251,6 +5310,13 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, "node_modules/slice-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slice-stream/-/slice-stream-1.0.0.tgz", @@ -3365,7 +5431,6 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "license": "BSD-3-Clause", - "optional": true, "engines": { "node": ">=0.10.0" } @@ -3448,6 +5513,7 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, + "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -3468,6 +5534,15 @@ "node": ">=0.10.0" } }, + "node_modules/stack-trace": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", + "integrity": "sha512-vjUc6sfgtgY0dxCdnc40mK6Oftjo9+2K8H/NG81TMhgL392FtiPA9tn9RLyTxXmTLPJPjF3VyzFp6bsWFLisMQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -3527,6 +5602,19 @@ "node": ">=8" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strtok3": { "version": "10.2.2", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.2.2.tgz", @@ -3569,6 +5657,96 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swagger2openapi": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", + "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "call-me-maybe": "^1.0.1", + "node-fetch": "^2.6.1", + "node-fetch-h2": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-kit-common": "^1.0.8", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "oas-validator": "^5.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "boast": "boast.js", + "oas-validate": "oas-validate.js", + "swagger2openapi": "swagger2openapi.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/swagger2openapi/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/swagger2openapi/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/swagger2openapi/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/swagger2openapi/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/tar-fs": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", @@ -3612,6 +5790,13 @@ "node": ">= 6" } }, + "node_modules/teleport-javascript": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/teleport-javascript/-/teleport-javascript-1.0.0.tgz", + "integrity": "sha512-j1llvWVFyEn/6XIFDfX5LAU43DXe0GCt3NfXDwJ8XpRRMkS+i50SAkonAONBy+vxwPFBd50MFU8a2uj8R/ccLg==", + "dev": true, + "license": "ISC" + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -3702,7 +5887,8 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true + "dev": true, + "license": "Unlicense" }, "node_modules/type-fest": { "version": "0.21.3", @@ -3729,6 +5915,20 @@ "node": ">= 0.6" } }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/uid": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", @@ -3755,6 +5955,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", + "dev": true, + "license": "MIT" + }, "node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", @@ -3778,6 +5985,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -3804,6 +6012,16 @@ "integrity": "sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", "dev": true }, + "node_modules/utility-types": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", + "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -3813,6 +6031,19 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/uvm": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.1.1.tgz", + "integrity": "sha512-BZ5w8adTpNNr+zczOBRpaX/hH8UPKAf7fmCnidrcsqt3bn8KT9bDIfuS7hgRU9RXgiN01su2pwysBONY6w8W5w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "flatted": "3.2.6" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -3823,6 +6054,44 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/validate.io-array": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate.io-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==", + "dev": true + }, + "node_modules/validate.io-integer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", + "integrity": "sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ==", + "dev": true, + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "node_modules/validate.io-integer-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", + "integrity": "sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA==", + "dev": true, + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "node_modules/validate.io-number": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", + "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==", + "dev": true + }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -3831,6 +6100,7 @@ "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -3841,7 +6111,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wcwidth": { "version": "1.0.1", @@ -3870,6 +6141,23 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -3890,6 +6178,16 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -3899,6 +6197,23 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index 9fa80afe..393ee9c8 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,10 @@ "homepage": "https://github.com/NHSDigital/validated-relationships-service-api", "devDependencies": { "@openapitools/openapi-generator-cli": "^2.20.2", + "@apideck/portman": "~=1.33.0", "apigeetool": "^0.16.4", "license-checker": "^25.0.1", - "minimist": "^1.2.2" + "minimist": "^1.2.2", + "newman": "~=6.2.1" } } diff --git a/postman/README.md b/postman/README.md index a69cf66d..1f5bfed0 100644 --- a/postman/README.md +++ b/postman/README.md @@ -5,9 +5,21 @@ This folder contains the Sandbox and Integration Postman collections for the VRS > [!WARNING] > Documentation and links in this file are specific to the maintainers of this repository and are only available to NHS England staff. -## Updating the collections +## Sandbox collection -To update the Postman collections follow the steps on the [How to update Postman Collection Confluence page](https://nhsd-confluence.digital.nhs.uk/pages/viewpage.action?pageId=874694621) +The 'sandbox' postman collection includes request to be used by the VRS team, consumers, and external parties to test against our sandbox environment. + +The collection is auto generated by portman as part of pr checks in github actions. + +Use following command to generate sandbox postman collection: +``` +make generate-postman-collection +``` + +Use the following commadn to test sandbox postman collection: +``` +make test-postman-collection +``` ## Integration collection @@ -16,3 +28,7 @@ parties to test against our INT environment. For details on the environment variables and authorization methods required for this environment, please see the Getting Started section within the Postman collection itself. + +### Updating the collections + +To update the Postman collections follow the steps on the [How to update Postman Collection Confluence page](https://nhsd-confluence.digital.nhs.uk/pages/viewpage.action?pageId=874694621) diff --git a/postman/validated_relationship_service.sandbox.postman_collection.json b/postman/validated_relationship_service.sandbox.postman_collection.json index 825dd3c4..e110d8bb 100644 --- a/postman/validated_relationship_service.sandbox.postman_collection.json +++ b/postman/validated_relationship_service.sandbox.postman_collection.json @@ -1,12943 +1,702 @@ { - "info": { - "_postman_id": "1cda64af-6449-45ca-a17e-e6a9bf00598f", - "name": "Validated Relationship Service - Sandbox - 20/02/26", - "description": "This Postman collection includes example scenarios for each of the Validated Relationship Service (VRS) API endpoints, covering both valid and invalid request scenarios.\n\nThe collection is pointed towards the VRS sandbox environment, which will return a specific example response based on the request sent. All data shown in the requests or responses is test data.\n\nOur sandbox environment only covers the scenarios listed in the Postman collection and is open access. It does not allow you to test authorisation or any scenarios beyond the ones documented.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "48873809", - "_collection_link": "https://christopher-bacon1-3957569.postman.co/workspace/4fecd6eb-42d0-49f8-8d9c-6e7f9e5db805/collection/48873809-1cda64af-6449-45ca-a17e-e6a9bf00598f?action=share&source=collection_link&creator=48873809" - }, - "item": [ - { - "name": "Get a proxy access request (Questionnaire Response)", - "item": [ - { - "name": "Adult to adult with capacity", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"QuestionnaireResponse\",", - " \"status\": \"completed\",", - " \"authored\": \"2024-07-15T09:43:03.280Z\",", - " \"id\": \"156e1560-e532-4e2a-85ad-5aeff03dc43e\",", - " \"identifier\": {", - " \"value\": \"19318ZGLAB\"", - " },", - " \"source\": {", - " \"type\": \"RelatedPerson\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"subject\": {", - " \"type\": \"Patient\",", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson\",", - " \"text\": \"Proxy details\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson_identifier\",", - " \"text\": \"NHS number\",", - " \"answer\": [", - " {", - " \"valueString\": \"9000000005\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_name\",", - " \"text\": \"Name\",", - " \"item\": [", - " {", - " \"linkId\": \"relatedPerson_name_first\",", - " \"text\": \"First name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jack\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_name_family\",", - " \"text\": \"Last name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jones\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_birthDate\",", - " \"text\": \"Date of birth\",", - " \"answer\": [", - " {", - " \"valueDate\": \"1970-02-15\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_basisForAccess\",", - " \"text\": \"Basis for Access\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"PRN\",", - " \"display\": \"Parent\"", - " }", - " }", - " ]", - " },", - " {", - " \"linkId\": \"relatedPerson_relationship\",", - " \"text\": \"Relationship\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"Parent\"", - " }", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient\",", - " \"text\": \"Patient details\",", - " \"item\": [", - " {", - " \"linkId\": \"patient_identifier\",", - " \"text\": \"NHS number\",", - " \"answer\": [", - " {", - " \"valueString\": \"9000000006\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_name\",", - " \"text\": \"Name\",", - " \"item\": [", - " {", - " \"linkId\": \"patient_name_first\",", - " \"text\": \"First name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jill\"", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_name_family\",", - " \"text\": \"Last name\",", - " \"answer\": [", - " {", - " \"valueString\": \"Jones\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"patient_birthDate\",", - " \"text\": \"Date of birth\",", - " \"answer\": [", - " {", - " \"valueDate\": \"1965-01-01\"", - " }", - " ]", - " }", - " ]", - " },", - " {", - " \"linkId\": \"requestedAccess\",", - " \"text\": \"Requested access\",", - " \"item\": [", - " {", - " \"linkId\": \"requestedAccess_accessLevel\",", - " \"text\": \"Requested access level\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", - " \"code\": \"APPT\",", - " \"display\": \"Appointment Booking\"", - " }", - " },", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",", - " \"code\": \"VACC\",", - " \"display\": \"Vaccination Records\"", - " }", - " }", - " ]", - " },", - " {", - " \"linkId\": \"requestedAccess_reasonsForAccess\",", - " \"text\": \"Reason for access\",", - " \"answer\": [", - " {", - " \"valueCoding\": {", - " \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",", - " \"code\": \"PRAC\",", - " \"display\": \"Practical Reasons\"", - " }", - " }", - " ]", - " }", - " ]", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/156e1560-e532-4e2a-85ad-5aeff03dc43e", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "156e1560-e532-4e2a-85ad-5aeff03dc43e" - ] - }, - "description": "Example of Questionnaire Response that will be returned" - }, - "response": [] - }, - { - "name": "Missing Access Request UUID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"code\": \"not-supported\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"METHOD_NOT_ALLOWED\",", - " \"display\": \"The method is not allowed.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The method is not allowed for the requested resource.\",", - " \"severity\": \"error\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 405\", function () {", - " pm.response.to.have.status(405);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "" - ] - }, - "description": "Example of an error response when reference code is missing from request" - }, - "response": [] - }, - { - "name": "Invalid Access Request UUID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"error\",", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Invalid identifier value\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The specified access request ID is invalid. Access request IDs must be a valid UUID.\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/INVALID", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "INVALID" - ] - }, - "description": "Example of an error response when reference code is invalid" - }, - "response": [] - }, - { - "name": "Access Request UUID Not Found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"error\",", - " \"code\": \"not-found\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/Spine-ErrorOrWarningCode-1\",", - " \"code\": \"QUESTIONNAIRE_RESPONSE_NOT_FOUND\",", - " \"display\": \"Questionnaire response not found\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The Questionnaire response could not be found using the provided access request ID.\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse/60d09b82-f4bb-41f9-b41e-767999b4ac9b", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse", - "60d09b82-f4bb-41f9-b41e-767999b4ac9b" - ] - }, - "description": "Example of an error response when reference code is not found in database" - }, - "response": [] - } - ], - "description": "The GET Questionnaire Response endpoint is used to retrieve a Questionnaire Response using its unique reference code. This endpoint returns the full Questionnaire Response document that was previously submitted.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/QuestionnaireResponse)" - }, - { - "name": "New access request (Questionnaire Response)", - "item": [ - { - "name": "Adult to child access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json", - "type": "text" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"relatedPerson\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"relatedPerson_name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Sharon\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"1994-03-21\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis For Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"parentalApplicationSupplementaryDetails\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibilityMoreinfo\",\n \"text\": \"Evidence of responsibility - Further Information\",\n \"answer\": [\n {\n \"valueString\": \"Birth Certificate is original\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"text\": \"parentalApplicationSupplementaryDetails_newAddress\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line1\",\n \"text\": \"Address Line 1\",\n \"answer\": [\n {\n \"valueString\": \"24 Hoves Edge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line2\",\n \"text\": \"Address Line 2\",\n \"answer\": [\n {\n \"valueString\": \"Remington\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_line3\",\n \"text\": \"Address Line 3\",\n \"answer\": [\n {\n \"valueString\": \"Boroughbridge\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_city\",\n \"text\": \"Town / City\",\n \"answer\": [\n {\n \"valueString\": \"Leeds\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_district\",\n \"text\": \"County\",\n \"answer\": [\n {\n \"valueString\": \"West Yorkshire\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_postalCode\",\n \"text\": \"Postcode\",\n \"answer\": [\n {\n \"valueString\": \"LS1 1DW\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do the adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueString\": \"Yes\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_canChildConsent\",\n \"text\": \"Can the child consent?\",\n \"answer\": [\n {\n \"valueString\": \"No\"\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_reasonNoChildConsent\",\n \"text\": \"Reason the child cannot consent\",\n \"answer\": [\n {\n \"valueString\": \"Child is too young\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"patient\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS Number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"patient_name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name.\",\n \"answer\": [\n {\n \"valueString\": \"Jane\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Family name (often called Surname).\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of Birth\",\n \"answer\": [\n {\n \"valueDate\": \"2020-10-22\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"requestedAccess\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"COMB\",\n \"display\": \"Communication Barriers\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccessMoreinfo\",\n \"text\": \"Reason for access - further information\",\n \"answer\": [\n {\n \"valueString\": \"No internet connection\"\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to child access request with the reference code returned" - }, - "response": [] - }, - { - "name": "Adult to adult with ability to consent access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000005\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient can consent with the reference code returned" - }, - "response": [] - }, - { - "name": "Duplicate relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role already exists.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"DUPLICATE_RELATIONSHIP\",", - " \"display\": \"Request must be for a new proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 409\", function () {", - " pm.response.to.have.status(409);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000006\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000049\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000006\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Jill\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1965-01-01\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - } - }, - "response": [] - }, - { - "name": "Adult to adult without ability to consent access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ProxyRole-1\",\n \"code\": \"002\",\n \"display\": \"Best interest decision made on behalf of the patient (Mental Capacity Act 2005)\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"CHILD\",\n \"display\": \"Child\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Florence\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Smith\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1935-01-02\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"TECH\",\n \"display\": \"Technical Barriers\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient cannot consent with the reference code returned" - }, - "response": [] - }, - { - "name": "Adult nominates adult access request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"19318ZGLAB\",", - " \"display\": \"19318ZGLAB\"", - " }", - " ]", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has the correct body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/QuestionnaireResponse?ID=156e1560-e532-4e2a-85ad-5aeff03dc43e\")", - "})" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/fhir+json" - }, - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Tom\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Jones\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"1970-07-12\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",\n \"code\": \"Personal\",\n \"display\": \"Personal relationship with the patient\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"SPS\",\n \"display\": \"Spouse\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000009\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/QuestionnaireResponse", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "QuestionnaireResponse" - ] - }, - "description": "Example of an adult to adult access request where the patient is the applicant with the reference code returned" - }, - "response": [] - } - ], - "description": "The POST Questionnaire Response endpoint is used to submit a proxy access request for a given performer and patient.\n\nIt is indended to be used by user facing service e.g. Proxy Access Service, who will collect the necessary information from the user and submit it to VRS as a QuestionnaireResponse.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [POST Questionnaire Response OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/QuestionnaireResponse)", - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ] - }, - { - "name": "Get verified candidate relationship (Related Person)", - "item": [ - { - "name": "List relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", - " \"resource\": {", - " \"id\": \"A3CC67E2\",", - " \"birthDate\": \"2018-04-27\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017\"", - " }", - " ],", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\"", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - } - ] - }, - "description": "Retrieves a list of validated relationships for a given NHS number." - }, - "response": [] - }, - { - "name": "List relationship and include patient's details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", - " \"resource\": {", - " \"birthDate\": \"2017-09-23\",", - " \"id\": \"9000000009\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000025\",", - " \"resource\": {", - " \"birthDate\": \"2018-04-27\",", - " \"id\": \"9000000025\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/A3CC67E2\",", - " \"resource\": {", - " \"id\": \"A3CC67E2\",", - " \"birthDate\": \"2018-04-27\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000025\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"FEARON\",", - " \"given\": [", - " \"Daren\"", - " ],", - " \"period\": {", - " \"start\": \"2018-09-21\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient\"", - " }", - " ],", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\"", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - }, - "description": "Retrieves a list of validated relationships for a given NHS number with additional patient information." - }, - "response": [] - }, - { - "name": "List Relationship and no relationships returned", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 0,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4/RelatedPerson?identifier=9000000033\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000033", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000033" - } - ] - }, - "description": "Example of a response where the given NHS numbers do not have a relationship." - }, - "response": [] - }, - { - "name": "Verify relationship between proxy and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ],", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "patient:identifier", - "value": "9000000009" - } - ] - }, - "description": "Retrieves information about the relationship between the given NHS numbers" - }, - "response": [] - }, - { - "name": "Verify relationship between proxy and patient and include patient's details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2024-01-01T00:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson?patient:identifier=9000000009&identifier=9000000017&_include=RelatedPerson:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/9000000009\",", - " \"resource\": {", - " \"birthDate\": \"2017-09-23\",", - " \"id\": \"9000000009\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"resourceType\": \"Patient\"", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"id\": \"BE974742\",", - " \"birthDate\": \"2017-09-23\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"name\": [", - " {", - " \"family\": \"MOGAJI\",", - " \"given\": [", - " \"GADIL\"", - " ],", - " \"period\": {", - " \"start\": \"2021-07-08\"", - " },", - " \"prefix\": [", - " \"MR\"", - " ],", - " \"use\": \"usual\"", - " }", - " ],", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"code\": \"MTH\",", - " \"display\": \"mother\",", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"", - " }", - " ]", - " }", - " ],", - " \"resourceType\": \"RelatedPerson\"", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000017&patient:identifier=9000000009&_include=RelatedPerson:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000017" - }, - { - "key": "patient:identifier", - "value": "9000000009" - }, - { - "key": "_include", - "value": "RelatedPerson:patient" - } - ] - }, - "description": "Retrieves information about the relationship between the given NHS numbers including the patient details" - }, - "response": [] - }, - { - "name": "Missing identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_IDENTIFIER_VALUE\",", - " \"display\": \"Missing RelatedPerson NHS number.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The 'identifier' parameter is required\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ] - }, - "description": "Example of an error response when the NHS number is missing" - }, - "response": [] - }, - { - "name": "Invalid identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Provided value is invalid\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",", - " \"expression\": [", - " \"RelatedPerson.identifier\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=900000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "900000000" - } - ] - }, - "description": "Example of an error raised when the specified NHS number is not valid." - }, - "response": [] - }, - { - "name": "Invalid identifier system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "var expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", - " \"display\": \"Invalid identifier system.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"The identifier system is not valid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=https://fhir.nhs.uk/Id/nhs-number|A730675929", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number|A730675929" - } - ] - }, - "description": "Example of an error response when the given NHS number uses a different identifier system" - }, - "response": [] - }, - { - "name": "Identifier not supported", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=1000000001", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "1000000001" - } - ] - }, - "description": "Example of an error response when the given NHS number is not supported by the sandbox" - }, - "response": [] - }, - { - "name": "No matching record", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "X-Request-ID", - "value": "d967f4c9-8e83-4930-97ab-ae4e122d8ca5", - "type": "text" - }, - { - "key": "X-Correlation-ID", - "value": "8717c840-c222-4f84-a880-45bc129f8382", - "type": "text" - } - ], - "url": { - "raw": "{{api_base_url}}/RelatedPerson?identifier=9000000041", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "RelatedPerson" - ], - "query": [ - { - "key": "identifier", - "value": "9000000041" - } - ] - }, - "description": "Example of a response where the given NHS number does not have any validated relationships." - }, - "response": [] - } - ], - "description": "The GET Related Person endpoint retrieves candidate proxy relationships for a user with a given NHS Number.\n\nThis endpoint should NOT be used to retrieve proxy relationships; these should be queried from the `/Consent` endpoint.\n\nThis folder contains requests covering different scenarios of valid and invalid requests.\n\nFor more details, please refer to the [GET Related Person OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/RelatedPerson)" - }, - { - "name": "Get proxy roles (Consent)", - "item": [ - { - "name": "Filtered proxy relationships by 'active' status include details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=active&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974746\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974746\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Lisa\"", - " ],", - " \"family\": \"Thompson\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1990-07-18\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"role\": {", - " \"coding\": [", - " {", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\",", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\"", - " }", - " ]", - " },", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=active&_include=Consent:grantee&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:grantee" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Filtered proxy relationships by 'inactive' status", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 2,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=inactive\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/ABCD12B3\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"ABCD12B3\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000007\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",", - " \"code\": \"OTHER\",", - " \"display\": \"Other reason\"", - " }", - " ],", - " \"text\": \"Patient would not respond to phone calls\"", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=inactive", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "inactive" - } - ] - } - }, - "response": [] - }, - { - "name": "Filtered proxy relationships by 'proposed' and 'active' status", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 4,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBGY55L2\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBGY55L2\",", - " \"status\": \"proposed\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"APPLICATION_SUBMITTED\",", - " \"display\": \"Application submitted online\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/EFGH12C5\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"EFGH12C5\",", - " \"status\": \"proposed\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"APPLICATION_SUBMITTED\",", - " \"display\": \"Application submitted online\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000017\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=proposed&status=active&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "proposed" - }, - { - "key": "status", - "value": "active" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"ZPTT32T3\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include performer", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:grantee\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974743\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974743\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"David\"", - " ],", - " \"family\": \"Brown\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1975-06-10\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"best-interest\",", - " \"display\": \"Best interest\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"AATD11A1\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"best-interest\",", - " \"display\": \"Best interest\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:grantee", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:grantee" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-18T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000022&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974743\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974743\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"David\"", - " ],", - " \"family\": \"Brown\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1975-06-10\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mrs\"", - " ],", - " \"suffix\": [", - " \"MBE\",", - " \"PhD\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"best-interest\",", - " \"display\": \"Best Interest\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"AATD11A1\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/ZPTT32T3\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"ZPTT32T3\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Michael\"", - " ],", - " \"family\": \"Percy\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1991-1-13\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000006\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"best-interest\",", - " \"display\": \"Best Interest\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000022&_include=Consent:grantee&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000022" - }, - { - "key": "_include", - "value": "Consent:grantee" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974744\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974744\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Emma\"", - " ],", - " \"family\": \"Wilson\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1978-04-12\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974745\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974745\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Mark\"", - " ],", - " \"family\": \"Taylor\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1982-08-30\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974743\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974743\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"David\"", - " ],", - " \"family\": \"Brown\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1975-06-10\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:grantee&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:grantee" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include performer", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:grantee\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974744\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974744\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Emma\"", - " ],", - " \"family\": \"Wilson\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1978-04-12\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974745\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974745\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Mark\"", - " ],", - " \"family\": \"Taylor\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1982-08-30\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974743\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974743\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"David\"", - " ],", - " \"family\": \"Brown\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1975-06-10\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:grantee", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:grantee" - } - ] - } - }, - "response": [] - }, - { - "name": "Multiple proxy relationships single patient include patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 3,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?patient:identifier=9000000100&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2021-12-31\"", - " },", - " \"given\": [", - " \"Samantha\"", - " ],", - " \"family\": \"Adams\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1963-11-02\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000020\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000021\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AATD11A1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AATD11A1\",", - " \"status\": \"inactive\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000100\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_DEACTIVATED_END_DATE_REACHED\",", - " \"display\": \"End date reached\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000022\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?patient:identifier=9000000100&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "patient:identifier", - "value": "9000000100" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "No relationships", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 0,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000025&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": []", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000025", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000025" - } - ] - } - }, - "response": [] - }, - { - "name": "Single consenting adult proxy relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000010" - } - ] - } - }, - "response": [] - }, - { - "name": "Single consenting adult proxy relationship include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974720\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974720\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"John\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1980-01-15\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2025-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000010&_include=Consent:grantee&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000010" - }, - { - "key": "_include", - "value": "Consent:grantee" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship include performer and patient", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974742\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974742\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Sarah\"", - " ],", - " \"family\": \"Jones\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1985-03-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2025-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=Consent:grantee&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - }, - { - "key": "_include", - "value": "Consent:grantee" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid status parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - status parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000017&status=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000017" - }, - { - "key": "status", - "value": "test" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid include parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_PARAMETER\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000019&_include=test", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000019" - }, - { - "key": "_include", - "value": "test" - } - ] - } - }, - "response": [] - }, - { - "name": "Single mother-child relationship unknown legal basis", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000111\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/AF974742\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"AF974742\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000119\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\",", - " \"code\": \"unknown\",", - " \"display\": \"Unknown legal basis\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000111\"", - " },", - " \"type\": \"RelatedPerson\"", - " }", - " }", - " ],", - " \"period\": {", - " \"start\": \"2025-02-11\",", - " \"end\": \"2026-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"UNK\",", - " \"display\": \"Unknown\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000111\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000111", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000111" - } - ] - } - }, - "response": [] - }, - { - "name": "No performer record found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALIDATED_RESOURCE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000999", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000999" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_VALUE\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=90000009990", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "90000009990" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid performer identifier system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_IDENTIFIER_SYSTEM\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier system parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_IDENTIFIER_SYSTEM\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=https://fhir.nhs.uk/Id/nhs-number|1234567890", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "https://fhir.nhs.uk/Id/nhs-number|1234567890" - } - ] - } - }, - "response": [] - }, - { - "name": "Missing performer identifier value", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_IDENTIFIER_VALUE\",", - " \"display\": \"Required parameter(s) are missing.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - performer:identifier or patient:identifier parameter not found.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"MISSING_IDENTIFIER_VALUE\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "GP Practice not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"GP_PRACTICE_NOT_FOUND\",", - " \"display\": \"GP Practice could not be found - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"GP Practice could not be found\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct error response\", () => {", - " pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"GP_PRACTICE_NOT_FOUND\");", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent?performer:identifier=9000000012", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ], - "query": [ - { - "key": "performer:identifier", - "value": "9000000012" - } - ] - } - }, - "response": [] - } - ], - "description": "The GET /Consent is for retrieving confirmed proxy relationships via the Validated Relationship Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [GET Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent)" - }, - { - "name": "Create a proxy role (Consent)", - "item": [ - { - "name": "Parent-child proxy creation", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", - "})" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000012\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Missing grantor", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_GRANTOR\",", - " \"display\": \"Grantor required for active status\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Grantor extension is required when creating/updating an active proxy role\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n\t\"resourceType\": \"Consent\",\n\t\"status\": \"active\",\n\t\"scope\": {\n\t\t\"coding\": [\n\t\t\t{\n\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n\t\t\t\t\"code\": \"patient-privacy\",\n\t\t\t\t\"display\": \"Privacy Consent\"\n\t\t\t}\n\t\t]\n\t},\n\t\"category\": [\n\t\t{\n\t\t\t\"coding\": [\n\t\t\t\t{\n\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n\t\t\t\t\t\"code\": \"INFA\",\n\t\t\t\t\t\"display\": \"information access\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"patient\": {\n\t\t\"type\": \"Patient\",\n\t\t\"identifier\": {\n\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\"value\": \"9000000054\"\n\t\t}\n\t},\n\t\"dateTime\": \"2025-02-11T14:30:00Z\",\n\t\"provision\": {\n\t\t\"type\": \"permit\",\n\t\t\"period\": {\n\t\t\t\"start\": \"2025-02-11\",\n\t\t\t\"end\": \"2026-02-11\"\n\t\t},\n\t\t\"actor\": [\n\t\t\t{\n\t\t\t\t\"role\": {\n\t\t\t\t\t\"coding\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n\t\t\t\t\t\t\t\"code\": \"PRN\",\n\t\t\t\t\t\t\t\"display\": \"Parent\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"reference\": {\n\t\t\t\t\t\"type\": \"RelatedPerson\",\n\t\t\t\t\t\"identifier\": {\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\t\"value\": \"9000000054\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t\"extension\": [\n\t\t{\n\t\t\t\"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n\t\t\t\t\t\t\"code\": \"TBC\",\n\t\t\t\t\t\t\"display\": \"TBC\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n\t\t\t\"valueReference\": {\n\t\t\t\t\"identifier\": {\n\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n\t\t\t\t\t\"value\": \"9000000054\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n\t\t\t\"valueCodeableConcept\": {\n\t\t\t\t\"coding\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n\t\t\t\t\t\t\"code\": \"parental-responsibility\",\n\t\t\t\t\t\t\"display\": \"Parental responsibility\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Missing grantor identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_GRANTOR_IDENTIFIER\",", - " \"display\": \"Missing grantor identifier\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Grantor extension must contain a valueIdentifier\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000058\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {}\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Invalid grantor system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_GRANTOR_SYSTEM\",", - " \"display\": \"Invalid grantor identifier system\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Valid grantor extension identifier system is required when creating/updating a consent with status 'active'\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000056\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"BAD\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Invalid grantor value", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_GRANTOR_VALUE\",", - " \"display\": \"Invalid grantor identifier value\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Valid grantor extension identifier value is required when creating/updating a consent with status 'active'\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000055\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Missing grantor reference", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_GRANTOR_REFERENCE\",", - " \"display\": \"Missing grantor reference\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Grantor extension must contain a valueReference\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\",\n \"end\": \"2026-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000057\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Adult-adult proxy creation", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "", - "pm.test(\"Location header is returned\", () => {", - " pm.response.to.have.header(\"Location\", \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/90b9863e-e33c-4895-a333-fd0ea0e23205\")", - "})" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000012\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"best-interest-decision\",\n \"display\": \"Best interest decision\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - }, - { - "name": "Duplicate relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role already exists.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"DUPLICATE_RELATIONSHIP\",", - " \"display\": \"Request must be for a new proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 409\", function () {", - " pm.response.to.have.status(409);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});", - "" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000000\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11\"\n },\n \"actor\": [\n {\n \"role\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"GUARD\",\n \"display\": \"Guardian\"\n }\n ]\n },\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-statusReason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consent-reason\",\n \"code\": \"TBC\",\n \"display\": \"TBC\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000049\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"best-interest-decision\",\n \"display\": \"Best interest decision\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent" - ] - } - }, - "response": [] - } - ], - "description": "The POST /Consent is for storing confirmed proxy relationships via the Validated Relationships Service.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationship. Also includes error scenarios.\n\nFor more details, please refer to the [POST Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#post-/Consent)" - }, - { - "name": "Get proxy role (Consent)", - "item": [ - { - "name": "Retrieve consenting adult relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2026-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"court-appointed-personal-welfare-deputy\",", - " \"display\": \"Court appointed personal welfare deputy\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2024-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with grantee details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:grantee\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974720\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974720\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"John\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1980-01-15\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:grantee", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:grantee" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve consenting adult relationship with performer and patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000010&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974720\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974720\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"John\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Mr\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1980-01-15\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/RP974720\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"RP974720\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole\",", - " \"code\": \"Personal\",", - " \"display\": \"Personal relationship with the patient\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/DFCC67F5\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"DFCC67F5\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2025-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Sally\"", - " ],", - " \"family\": \"Evans\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1995-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/WWCC67T1\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"WWCC67T1\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000005\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000010\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:grantee&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_include", - "value": "Consent:grantee" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2025-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " }", - " ]", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with grantee details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:grantee\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974742\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974742\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Sarah\"", - " ],", - " \"family\": \"Jones\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1985-03-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:grantee", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:grantee" - } - ] - } - }, - "response": [] - }, - { - "name": "Retrieve mother-child relationship with performer and patient details", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"Bundle\",", - " \"timestamp\": \"2026-01-16T14:00:00+00:00\",", - " \"total\": 1,", - " \"type\": \"searchset\",", - " \"link\": [", - " {", - " \"relation\": \"self\",", - " \"url\": \"https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/Consent?performer:identifier=9000000019&_include=Consent:grantee&_include=Consent:patient\"", - " }", - " ],", - " \"entry\": [", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/PR974742\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"PR974742\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2020-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Sarah\"", - " ],", - " \"family\": \"Jones\",", - " \"prefix\": [", - " \"Mrs\"", - " ]", - " }", - " ],", - " \"birthDate\": \"1985-03-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/RelatedPerson/BE974742\",", - " \"resource\": {", - " \"resourceType\": \"RelatedPerson\",", - " \"id\": \"BE974742\",", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"relationship\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"PRN\",", - " \"display\": \"parent\"", - " }", - " ]", - " },", - " {", - " \"coding\": [", - " {", - " \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",", - " \"code\": \"MTH\",", - " \"display\": \"mother\"", - " }", - " ]", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Patient/A3CC67E2\",", - " \"resource\": {", - " \"resourceType\": \"Patient\",", - " \"id\": \"A3CC67E2\",", - " \"meta\": {", - " \"security\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSIdentityProofingLevel\",", - " \"code\": \"P9\",", - " \"display\": \"High level verification (P9)\"", - " }", - " ]", - " },", - " \"identifier\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " ],", - " \"name\": [", - " {", - " \"use\": \"usual\",", - " \"period\": {", - " \"start\": \"2025-01-01\",", - " \"end\": \"2029-12-31\"", - " },", - " \"given\": [", - " \"Jane Marie Anne\"", - " ],", - " \"family\": \"Smith\",", - " \"prefix\": [", - " \"Miss\"", - " ]", - " }", - " ],", - " \"birthDate\": \"2022-10-22\",", - " \"generalPractitioner\": [", - " {", - " \"identifier\": {", - " \"value\": \"ODS12345\",", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\"", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"include\"", - " }", - " },", - " {", - " \"fullUrl\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Consent/BBCC67E9\",", - " \"resource\": {", - " \"resourceType\": \"Consent\",", - " \"id\": \"BBCC67E9\",", - " \"status\": \"active\",", - " \"scope\": {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",", - " \"code\": \"patient-privacy\",", - " \"display\": \"Privacy Consent\"", - " }", - " ]", - " },", - " \"category\": [", - " {", - " \"coding\": [", - " {", - " \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",", - " \"code\": \"INFA\",", - " \"display\": \"information access\"", - " }", - " ]", - " }", - " ],", - " \"patient\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000009\"", - " }", - " },", - " \"dateTime\": \"2024-07-21T17:32:28Z\",", - " \"policy\": [", - " {", - " \"authority\": \"https://www.england.nhs.uk\",", - " \"uri\": \"REPLACE_WITH_LINK_TO_PUBLISHED_NATIONAL_PROXY_STANDARD\"", - " }", - " ],", - " \"provision\": {", - " \"type\": \"permit\",", - " \"actor\": [", - " {", - " \"reference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " }", - " ],", - " \"period\": {", - " \"end\": \"2029-02-11\",", - " \"start\": \"2025-02-11\"", - " }", - " },", - " \"extension\": [", - " {", - " \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",", - " \"code\": \"ROLE_CREATED\",", - " \"display\": \"Role created\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",", - " \"valueCodeableConcept\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",", - " \"code\": \"parental-responsibility\",", - " \"display\": \"Parental responsibility\"", - " }", - " ]", - " }", - " },", - " {", - " \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",", - " \"value\": \"9000000019\"", - " }", - " }", - " },", - " {", - " \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",", - " \"valueReference\": {", - " \"identifier\": {", - " \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",", - " \"value\": \"G8101234\"", - " }", - " }", - " }", - " ]", - " },", - " \"search\": {", - " \"mode\": \"match\"", - " }", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:grantee&_include=Consent:patient", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:grantee" - }, - { - "key": "_include", - "value": "Consent:patient" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid consent ID", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_ID_VALUE\",", - " \"display\": \"Required parameter(s) are invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - ID must be a valid UUID.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/invalid-identifier", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "invalid-identifier" - ] - } - }, - "response": [] - }, - { - "name": "Invalid include parameter", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:invalid", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "39df03a2-1b14-4d19-b1dc-d5d8cbf96948" - ], - "query": [ - { - "key": "_include", - "value": "Consent:invalid" - } - ] - } - }, - "response": [] - }, - { - "name": "Invalid parameters", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALID_PARAMETER\",", - " \"display\": \"Required parameter(s) are invalid.\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Invalid request with error - _include parameter is invalid.\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_unknown=true", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ], - "query": [ - { - "key": "_unknown", - "value": "true" - } - ] - } - }, - "response": [] - }, - { - "name": "Proxy role not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"processing\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\",", - " \"code\": \"INVALIDATED_RESOURCE\",", - " \"display\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Resource that has been marked as invalid was requested - invalid resources cannot be retrieved\",", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "const responseJson = pm.response.json();", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{api_base_url}}/Consent/a0922245-1072-40c3-8f4e-a7490c10d365", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "a0922245-1072-40c3-8f4e-a7490c10d365" - ] - } - }, - "response": [] - } - ], - "description": "The GET /Consent/{ID} is for retrieving the details of a single proxy relationship, including current status, based on a provided id.\n\nThis folder contains requests covering different scenarios for users with different types of proxy relationships. It also includes error scenarios.\n\nFor more details, please refer to the [GET Consent by ID OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#get-/Consent/%7Bid%7D)" - }, - { - "name": "Update a proxy role (Consent)", - "item": [ - { - "name": "Status update", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"inactive\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/74eed847-ca25-4e76-8cf2-f2c2d7842a7a", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "74eed847-ca25-4e76-8cf2-f2c2d7842a7a" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Missing free text for Other", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Free text is required when reason code is OTHER.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_FREE_TEXT_FOR_OTHER\",", - " \"display\": \"Free text must be provided for OTHER reason codes.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"inactive\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Missing Grantor", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_GRANTOR\",", - " \"display\": \"Grantor required for active status\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Grantor extension is required when creating/updating an active proxy role\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor')\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/90957744-b971-496e-b7c3-ab971868ce14", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "90957744-b971-496e-b7c3-ab971868ce14" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Missing Grantor identifier", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_GRANTOR_IDENTIFIER\",", - " \"display\": \"Missing grantor identifier\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Grantor extension must contain a valueIdentifier\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/faefd8c5-5e24-4415-8252-96e9241c7e78", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "faefd8c5-5e24-4415-8252-96e9241c7e78" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Missing Grantor reference", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"MISSING_GRANTOR_REFERENCE\",", - " \"display\": \"Missing grantor reference\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Grantor extension must contain a valueReference\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {}\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/7e764160-38b6-41eb-9012-a3e476cbc517", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "7e764160-38b6-41eb-9012-a3e476cbc517" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Invalid grantor identifier system", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_GRANTOR_SYSTEM\",", - " \"display\": \"Invalid grantor identifier system\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Valid grantor extension identifier system is required when creating/updating a consent with status 'active'\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.system\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_ACTIVATED\",\n \"display\": \"Role activated\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://wrong-system.com\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/fd189522-68e5-42dc-b44c-989be0eaa2bf", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "fd189522-68e5-42dc-b44c-989be0eaa2bf" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Invalid grantor identifier value", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_GRANTOR_VALUE\",", - " \"display\": \"Invalid grantor identifier value\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"diagnostics\": \"Valid grantor extension identifier value is required when creating/updating a consent with status 'active'\",", - " \"expression\": [", - " \"extension.where(url = 'http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor').valueReference.identifier.value\"", - " ],", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_ACTIVATED\",\n \"display\": \"Role activated\"\n }\n ]\n }\n },\n {\n \"url\": \"https://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9736898148\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"BAD\"\n }\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/b68cbfc8-ccc2-48ad-b97b-b7410d773dc1", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "b68cbfc8-ccc2-48ad-b97b-b7410d773dc1" - ] - }, - "description": "Valid patch changing status to 'active'" - }, - "response": [] - }, - { - "name": "Access level update", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/6b71ac92-baa3-4b76-b0f5-a601257e2722", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "6b71ac92-baa3-4b76-b0f5-a601257e2722" - ] - }, - "description": "Valid patch modifying the role end date" - }, - "response": [] - }, - { - "name": "Multiple valid changes", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"resourceType\": \"OperationOutcome\",", - " \"issue\": [", - " {", - " \"severity\": \"information\",", - " \"code\": \"informational\"", - " }", - " ]", - "}", - "", - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n }\n ]\n },\n {\n \"op\": \"replace\",\n \"path\": \"/provision/period/end\",\n \"value\": \"2026-12-31T23:59:59Z\"\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/43003db8-ffcd-4bd6-ab2f-b49b9656f9e5", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "43003db8-ffcd-4bd6-ab2f-b49b9656f9e5" - ] - }, - "description": "Valid patch modifying the role end date" - }, - "response": [] - }, - { - "name": "Invalid status code", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Invalid status code.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATUS_CODE\",", - " \"display\": \"Status code is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/78c35330-fa2f-4934-a5dd-fff847f38de5", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "78c35330-fa2f-4934-a5dd-fff847f38de5" - ] - }, - "description": "Patch with invalid status value" - }, - "response": [] - }, - { - "name": "Invalid path", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Patch targeting non-existent element.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_PATCH_PATH\",", - " \"display\": \"Patch target is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/someotherpath\",\n \"value\": \"active\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/01abb0c5-b1ac-499d-9655-9cd0b8d3588f", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "01abb0c5-b1ac-499d-9655-9cd0b8d3588f" - ] - }, - "description": "Patch targeting non-existent element" - }, - "response": [] - }, - { - "name": "Resource not found", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Proxy role not found.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"RESOURCE_NOT_FOUND\",", - " \"display\": \"Request must be for a existing proxy role.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"inactive\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/0000000", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "0000000" - ] - }, - "description": "Patch for non-existent Consent" - }, - "response": [] - }, - { - "name": "Invalid patch format", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Malformed JSON patch document.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_PATCH_FORMAT\",", - " \"display\": \"Request format is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 400\", function () {", - " pm.response.to.have.status(400);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"active\"\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/849ea584-2318-471b-a24c-cee1b5ad0137", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "849ea584-2318-471b-a24c-cee1b5ad0137" - ] - }, - "description": "Malformed JSON patch document" - }, - "response": [] - }, - { - "name": "Invalid state transition", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Patch attempting invalid status change.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATE_TRANSITION\",", - " \"display\": \"Status change is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/7b7f47b8-96e5-43eb-b733-283bf1449f2c", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "7b7f47b8-96e5-43eb-b733-283bf1449f2c" - ] - } - }, - "response": [] - }, - { - "name": "Invalid Status Reason", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "const expectedResponseBody = {", - " \"issue\": [", - " {", - " \"code\": \"invalid\",", - " \"diagnostics\": \"Invalid status reason.\",", - " \"details\": {", - " \"coding\": [", - " {", - " \"code\": \"INVALID_STATUS_REASON\",", - " \"display\": \"Status reason is invalid.\",", - " \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",", - " \"version\": \"1\"", - " }", - " ]", - " },", - " \"severity\": \"error\"", - " }", - " ],", - " \"resourceType\": \"OperationOutcome\"", - "}", - "", - "pm.test(\"Status code is 422\", function () {", - " pm.response.to.have.status(422);", - "});", - "", - "pm.test(\"Should have correct response body\", () => {", - " var responseJson = pm.response.json();", - " pm.expect(responseJson).to.eql(expectedResponseBody);", - "});" - ], - "type": "text/javascript", - "packages": {}, - "requests": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [], - "body": { - "mode": "raw", - "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"someinvalidcode\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_DEACTIVATED_PATIENT_REQUEST\",\n \"display\": \"At patient request\"\n }\n ]\n }\n }\n ]\n }\n]", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{api_base_url}}/Consent/51fb4df5-815a-45cd-8427-04d6558336b7", - "host": [ - "{{api_base_url}}" - ], - "path": [ - "Consent", - "51fb4df5-815a-45cd-8427-04d6558336b7" - ] - } - }, - "response": [] - } - ], - "description": "Use this endpoint to update an existing proxy role.\n\nCommon update scenarios include:\n\n- Revocation of the role (status change from \"active\" to \"inactive\")\n- Changing the legal basis of the role (TBC)\n- Updating the end date for time-bound access\n \n\nThis folder contains requests covering different scenarios for various valid and invalid update requests.\n\nFor more details, please refer to the [PATCH Consent OAS page for the Validated Relationship Service on the NHS England website.](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service#patch-/Consent/-id-)" - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "requests": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "requests": {}, - "exec": [ - "pm.test(\"Response has FHIR content type\", () => {", - " pm.expect(pm.response.headers.get('Content-Type')).to.include('application/fhir+json');", - "});" - ] - } - } - ], - "variable": [ - { - "key": "api_base_url", - "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4" - } - ] + "_": { + "postman_id": "614b5082-b38a-4cdd-941c-f75e9524cdbb" + }, + "item": [ + { + "id": "91a7588c-30a3-4ebf-89b2-5e6b81829d1e", + "name": "QuestionnaireResponse", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ + { + "id": "60cf64e4-19d4-4da2-8033-505056daaa0e", + "name": "New Access request", + "request": { + "name": "New Access request", + "description": { + "content": "## Overview\nFor any new access request, the necessary details should be collected from a user facing service e.g.\nProxy Access Service and submitted as a QuestionnaireResponse.\n\n## Access modes\n\nThis endpoint supports the following access modes:\n\n- Patient access\n\n## Sandbox test scenarios:\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request | Response |\n| ---------------------- | ------------------------------------------------------------------------------------------- | -----------------------------------------------|\n| Successful request | Valid request with performer identifier value of `9000000009` or `9000000017` | HTTP Status 200 Success response |\n| Duplicate proxy role | Request for proxy role that already exists, with performer identifier value of `9000000049` | HTTP Status 409 and DUPLICATE error response |\n\n\n### Sandbox constraints\n\nThe sandbox environment has the following constraints for this endpoint:\n\n- QuestionnaireResponse is not validated.\n- Request headers are not tested. `X-Request-ID` and `X-Correlation-ID` are disregarded.\n- No access request is created.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "QuestionnaireResponse" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) A globally unique identifier (GUID) for the request, which we use to correlate logs through different components.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Request-ID", + "value": "60E0B220-8136-4CA5-AE46-1D97EF59D068" + }, + { + "disabled": false, + "description": { + "content": "An optional ID which you can use to track transactions across multiple systems.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Accept", + "value": "application/fhir+json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"QuestionnaireResponse\",\n \"status\": \"completed\",\n \"authored\": \"2024-07-15T09:43:03.280Z\",\n \"source\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000017\"\n }\n },\n \"subject\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000002\"\n }\n },\n \"questionnaire\": \"https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson\",\n \"text\": \"Proxy details\",\n \"item\": [\n {\n \"linkId\": \"relatedPerson_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000017\"\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_basisForAccess\",\n \"text\": \"Basis for Access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n },\n {\n \"linkId\": \"relatedPerson_relationship\",\n \"text\": \"Relationship\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n \"code\": \"PRN\",\n \"display\": \"Parent\"\n }\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails\",\n \"text\": \"Parental Application Supplementary Details\",\n \"item\": [\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_evidenceOfResponsibility\",\n \"text\": \"Evidence of parental responsibility\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-EvidenceOfResponsibility\",\n \"code\": \"BRTH\",\n \"display\": \"Birth certificate\"\n }\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_isCurrentAddressConfirmed\",\n \"text\": \"Is current address confirmed?\",\n \"answer\": [\n {\n \"valueBoolean\": true\n }\n ]\n },\n {\n \"linkId\": \"parentalApplicationSupplementaryDetails_liveAtSameAddress\",\n \"text\": \"Do adult and child live at the same address?\",\n \"answer\": [\n {\n \"valueBoolean\": true\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient\",\n \"text\": \"Patient details\",\n \"item\": [\n {\n \"linkId\": \"patient_identifier\",\n \"text\": \"NHS number\",\n \"answer\": [\n {\n \"valueString\": \"9000000002\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name\",\n \"text\": \"Name\",\n \"item\": [\n {\n \"linkId\": \"patient_name_first\",\n \"text\": \"First name\",\n \"answer\": [\n {\n \"valueString\": \"Timothy\"\n }\n ]\n },\n {\n \"linkId\": \"patient_name_family\",\n \"text\": \"Last name\",\n \"answer\": [\n {\n \"valueString\": \"Tenenbaum\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"patient_birthDate\",\n \"text\": \"Date of birth\",\n \"answer\": [\n {\n \"valueDate\": \"2020-10-22\"\n }\n ]\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess\",\n \"text\": \"Requested access\",\n \"item\": [\n {\n \"linkId\": \"requestedAccess_accessLevel\",\n \"text\": \"Requested access level\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"PRESCR\",\n \"display\": \"Request and manage repeat prescriptions\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"APPT\",\n \"display\": \"Appointment Booking\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"RECRD\",\n \"display\": \"GP Health Records Access\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"TEST\",\n \"display\": \"Test Results\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"VACC\",\n \"display\": \"Vaccination Records\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"COND\",\n \"display\": \"Health Conditions\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"CONSULT\",\n \"display\": \"Consultations and Events\"\n }\n },\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess\",\n \"code\": \"DOCS\",\n \"display\": \"Documents\"\n }\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_accessLevelMoreinfo\",\n \"text\": \"Requested access level - further information\",\n \"answer\": [\n {\n \"valueString\": \"My child cannot access their own record\"\n }\n ]\n },\n {\n \"linkId\": \"requestedAccess_reasonsForAccess\",\n \"text\": \"Reason for access\",\n \"answer\": [\n {\n \"valueCoding\": {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess\",\n \"code\": \"PRAC\",\n \"display\": \"Practical Reasons\"\n }\n }\n ]\n }\n ]\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "f73a14d7-b392-44be-852a-0bfd940e1237", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[POST]::/QuestionnaireResponse - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[POST]::/QuestionnaireResponse - Content-Type is application/fhir+json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/fhir+json\");\n});\n", + "// Validate if response has JSON Body \npm.test(\"[POST]::/QuestionnaireResponse - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "6f29f381-b6fc-48f5-a2ec-34b1b9831782", + "name": "{id}", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ + { + "id": "4b5e52d5-6591-423a-95ea-2c04984de500", + "name": "Get a proxy access request", + "request": { + "name": "Get a proxy access request", + "description": { + "content": "## Overview\nRetrieve a QuestionnaireResponse using its unique access request ID. This endpoint returns the full\nQuestionnaireResponse document that was previously submitted.\n\n## Request Requirements\nA valid access request ID must be provided as a path parameter.\n\n## Access modes\n\nThis endpoint supports the following access modes:\n- Patient access\n- Healthcare worker access\n- Application-restricted access\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request | Response |\n| -------------------------------- | ------------------------------------------------ | ------------------------------------------------------------- |\n| Valid access request ID | ID value: `156e1560-e532-4e2a-85ad-5aeff03dc43e` | HTTP Status 200 with QuestionnaireResponse |\n| Invalid access request ID | ID value: `INVALID` | HTTP Status 400 with INVALID_IDENTIFIER_VALUE message |\n| Missing access request ID | No ID path parameter | HTTP Status 405 with METHOD_NOT_ALLOWED message |\n| Non-existent access request ID | ID value: `60d09b82-f4bb-41f9-b41e-767999b4ac9b` | HTTP Status 404 with QUESTIONNAIRE_RESPONSE_NOT_FOUND message |\n\n### Sandbox constraints\n\nThe sandbox environment has the following constraints for this endpoint:\n\n - Request headers are not tested. For example, `X-Request-ID` and `X-Correlation-ID` are disregarded.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "QuestionnaireResponse", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The unique access request ID of the QuestionnaireResponse to retrieve", + "type": "text/plain" + }, + "type": "any", + "value": "156e1560-e532-4e2a-85ad-5aeff03dc43e", + "key": "id" + } + ] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) A globally unique identifier (GUID) for the request, which we use to correlate logs through different components.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Request-ID", + "value": "60E0B220-8136-4CA5-AE46-1D97EF59D068" + }, + { + "disabled": false, + "description": { + "content": "An optional ID which you can use to track transactions across multiple systems.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + }, + { + "key": "Accept", + "value": "application/fhir+json" + } + ], + "method": "GET", + "body": {} + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "25cb817b-74a1-456f-927f-681a676a76a8", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[GET]::/QuestionnaireResponse/:id - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/QuestionnaireResponse/:id - Content-Type is application/fhir+json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/fhir+json\");\n});\n", + "// Validate if response has JSON Body \npm.test(\"[GET]::/QuestionnaireResponse/:id - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + } + ], + "event": [] + }, + { + "id": "a2786a23-ac4e-4f04-9b4a-6b33d6c2ef2e", + "name": "RelatedPerson", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ + { + "id": "bfa1d5bd-77d5-452d-9248-0e55ea6b7352", + "name": "Get verified candidate relationships", + "request": { + "name": "Get verified candidate relationships", + "description": { + "content": "## Overview\nUse this endpoint to get verified relationship information for a user with a given NHS Number. This endpoint should NOT be used to retrieve established proxy roles; these should be queried from the GET /Consent endpoints.\n\nYou can query for RelatedPerson's in the following ways:\n\n| Outcome | Query string value |\n| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |\n| Search for patient relationships for a candidate proxy | `identifier={proxy identifier}` |\n| Search for candidate proxy relationships for a patient | `patient:identifier={patient identifier}` |\n| Search for a specific verified candidate relationship for a given proxy and patient | `identifier={proxy identifier}&patient:identifier={patient identifier}` |\n\nYou must provide either the `identifier={identifier}` or `patient:identifier={identifier}` query string, or both, in your request.\n\n## Access modes\n\nThis endpoint supports the following access modes:\n- Patient access\n- Healthcare worker access\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request | Response |\n| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |\n| List Relationship | `identifier=9000000017` | HTTP Status 200 List of relationships for the proxy |\n| List Relationship and include patient's details | `identifier=9000000017&_include=RelatedPerson:patient` | HTTP Status 200 List of relationships for the proxy and includes patient data |\n| List Patient Relationship | `patient:identifier=9000000042` | HTTP Status 200 List of relationships for the patient |\n| List Patient Relationship and include patient's details | `patient:identifier=9000000042&_include=RelatedPerson:patient` | HTTP Status 200 List of relationships for the patient and includes proxy data |\n| List Relationship and no relationships returned | `identifier=9000000033` | HTTP Status 200 Empty bundle |\n| Verify Relationship between proxy and patient | `identifier=9000000017&patient:identifier=9000000009` | HTTP Status 200 Verified relationship between patient and proxy |\n| Verify Relationship between proxy and patient and include patient's details | `identifier=9000000017&patient:identifier=9000000009&_include=RelatedPerson:patient` | HTTP Status 200 Verified relationship between patient and proxy and includes patient's details |\n| Missing identifier | `` | HTTP Status 400 and MISSING_IDENTIFIER_VALUE error response |\n| Invalid identifier | `identifier=900000000` Note: This identifier is 9 characters long, too short to be NHS Number | HTTP Status 400 and INVALID_IDENTIFIER_VALUE error response |\n| Malformed identifier & system | `identifier=https://fhir.nhs.uk/Id/nhs-number/9730675929` | HTTP Status 400 and INVALID_IDENTIFIER_SYSTEM error response |\n\n### Sandbox constraints\n\nThe sandbox environment has the following constraints for this endpoint:\n\n - Request headers are not tested. For example, `X-Request-ID` and `X-Correlation-ID` are disregarded.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "RelatedPerson" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "The proxy's NHS number. For more information on FHIR tokens in general, [see here](https://build.fhir.org/search.html#token).\n", + "type": "text/plain" + }, + "key": "identifier", + "value": "9000000017" + }, + { + "disabled": false, + "description": { + "content": "The patient's NHS number. For more information on FHIR tokens in general, [see here](https://build.fhir.org/search.html#token).\n", + "type": "text/plain" + }, + "key": "patient:identifier", + "value": "9000000009" + }, + { + "disabled": false, + "description": { + "content": "Include referenced resources in the bundle response by specifying one or more `_include` parameters. Further info [here](https://www.hl7.org/fhir/search.html#_include).\n", + "type": "text/plain" + }, + "key": "_include", + "value": "RelatedPerson:patient" + } + ], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) A globally unique identifier (GUID) for the request, which we use to correlate logs through different components.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Request-ID", + "value": "60E0B220-8136-4CA5-AE46-1D97EF59D068" + }, + { + "disabled": false, + "description": { + "content": "An optional ID which you can use to track transactions across multiple systems.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + }, + { + "key": "Accept", + "value": "application/fhir+json" + } + ], + "method": "GET", + "body": {} + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "c57e1509-078e-442b-bccb-e143a1185b5b", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[GET]::/RelatedPerson - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/RelatedPerson - Content-Type is application/fhir+json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/fhir+json\");\n});\n", + "// Validate if response has JSON Body \npm.test(\"[GET]::/RelatedPerson - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + }, + { + "id": "8e5528ef-a4f4-42ce-97ee-e39128f7c0df", + "name": "Consent", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ + { + "id": "ea5df181-f1d6-4339-b71a-7deb23eaf113", + "name": "Get proxy roles", + "request": { + "name": "Get proxy roles", + "description": { + "content": "## Overview\nUse this endpoint to get the details about proxy roles, including current status, based on a provided NHS Number.\n\nEither `performer:identifier` or `patient:identifier` request parameters must be provided. `performer:identifier` and `patient:identifier` can be used together.\n\nYou can (optionally) include a `status={status}` query string parameter to filter the response to records with a given status bound to the http://hl7.org/fhir/consent-state-codes CodeSystem e.g. `status=active` or `status=proposed,active`.\n\nYou can (optionally) include the `_include=Consent:grantee` request parameter to include the proxy's details in the response.\n\nYou can (optionally) include the `_include=Consent:patient` request parameter to include the patient's details in the response.\n\n## Access modes\n\nThis endpoint supports the following access modes:\n- Patient access\n- Healthcare worker access\n- Application-restricted access\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request | Response |\n| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |\n| Multiple proxy relationships filtered by 'active' status including details | `performer:identifier=9000000017&_include=Consent:patient&_include=Consent:grantee&status=active` | HTTP Status 200 Bundle containing a multiple active proxy relationships including grantee and patient details |\n| Multiple proxy relationships filtered by 'inactive' status | `performer:identifier=9000000017&status=inactive` | HTTP Status 200 Bundle containing a multiple inactive proxy relationships |\n| Multiple proxy relationships filtered by 'proposed' and 'active' status | `performer:identifier=9000000017&status=proposed,active` | HTTP Status 200 Bundle containing a multiple proposed and active proxy relationships |\n| Multiple proxy relationships without filtering and details | `performer:identifier=9000000022` | HTTP Status 200 Bundle containing a multiple proxy relationships without details |\n| Multiple proxy relationships including grantee details | `performer:identifier=9000000022&_include=Consent:grantee` | HTTP Status 200 Bundle containing a multiple proxy relationships including grantee details |\n| Multiple proxy relationships including patient details | `performer:identifier=9000000022&_include=Consent:patient` | HTTP Status 200 Bundle containing a multiple proxy relationships including patient details |\n| Multiple proxy relationships including grantee and patient details | `performer:identifier=9000000022&_include=Consent:patient&_include=Consent:grantee` | HTTP Status 200 Bundle containing a multiple proxy relationships including grantee and patient details |\n| Multiple proxy relationships, single patient | `patient:identifier=9000000100` | HTTP Status 200 Bundle containing a multiple proxy relationships including grantee and patient details |\n| Multiple proxy relationships, single patient, including proxy details | `patient:identifier=9000000100&_include=Consent:grantee` | HTTP Status 200 Bundle containing a multiple proxy relationships including proxy details |\n| Multiple proxy relationships, single patient, including patient details | `patient:identifier=9000000100&_include=Consent:patient` | HTTP Status 200 Bundle containing a multiple proxy relationships including patient details |\n| Multiple proxy relationships, single patient, including proxy and patient details | `patient:identifier=9000000100&_include=Consent:patient&_include=Consent:grantee` | HTTP Status 200 Bundle containing a multiple proxy relationships including proxy and patient details |\n| No proxy relationships | `performer:identifier=9000000025&_include=Consent:patient&_include=Consent:grantee&status=active` | HTTP Status 200 empty bundle |\n| A single proxy relationship between consenting adults | `performer:identifier=9000000010` and/or `patient:identifier=9000000005` | HTTP Status 200 Bundle containing a single proxy relationship |\n| A single proxy relationship between consenting adults including details | `performer:identifier=9000000010` and/or `patient:identifier=9000000005&_include=Consent:patient&_include=Consent:grantee` | HTTP Status 200 Bundle containing a single proxy relationship including grantee and patient details |\n| A single proxy relationship between a mother and child | `performer:identifier=9000000019` and/or `patient:identifier=9000000009` | HTTP Status 200 Bundle containing a single proxy relationship |\n| A single proxy relationship between a mother and child including details | `performer:identifier=9000000019` and/or `patient:identifier=9000000009&_include=Consent:patient&_include=Consent:grantee` | HTTP Status 200 Bundle containing a single proxy relationship including grantee and patient details |\n| A single proxy relationship between a mother and child with legal basis unknown | `performer:identifier=9000000111` and/or `patient:identifier=9000000119` | HTTP Status 200 Bundle containing a single proxy relationship with legal basis unknown |\n| Invalid status parameter | `performer:identifier=9000000019` and/or `patient:identifier=9000000009&status=test` | HTTP Status 422 and INVALID_PARAMETER error response |\n| Invalid include parameter | `performer:identifier=9000000019` and/or `patient:identifier=9000000009&_include=test` | HTTP Status 422 and INVALID_PARAMETER error response |\n| Missing identifier | `patient:identifier=9000000009` | HTTP Status 400 and MISSING_IDENTIFIER_VALUE error response |\n| Invalid identifier | `identifier=900000000` Note: This identifier is 9 characters long, too short to be NHS Number | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response |\n| Invalid identifier system | `identifier=https://fhir.nhs.uk/Id/nhs-number/9730675929` | HTTP Status 422 and INVALID_IDENTIFIER_SYSTEM error response |\n| No performer record found | `identifier=9000000999` | HTTP Status 404 and INVALIDATED_RESOURCE error response |\n| GP Practice not found | `identifier=9000000012` | HTTP Status 404 and GP_PRACTICE_NOT_FOUND error response |\n\n### Sandbox constraints\n\nThe sandbox environment has the following constraints for this endpoint:\n\n - Request headers are not tested. `X-IM1-Connection-Params`, `X-Request-ID` and `X-Correlation-ID` are disregarded.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "Consent" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "The performer's (Proxy) NHS number. For more information on FHIR tokens in general, [see here](https://build.fhir.org/search.html#token).\n", + "type": "text/plain" + }, + "key": "performer:identifier", + "value": "9000000017" + }, + { + "disabled": false, + "description": { + "content": "The patient's NHS number. For more information on FHIR tokens in general, [see here](https://build.fhir.org/search.html#token).\n", + "type": "text/plain" + }, + "key": "patient:identifier", + "value": "9000000017" + }, + { + "disabled": false, + "description": { + "content": "Specify one or more `status` to filter the records returned in the bundle. For example you can filter to only `active` or `proposed` proxy relationships.", + "type": "text/plain" + }, + "key": "status", + "value": "active" + }, + { + "disabled": false, + "description": { + "content": "Include referenced resources in the bundle response by specifying one or more `_include` parameters. Further info [here](https://www.hl7.org/fhir/search.html#_include).", + "type": "text/plain" + }, + "key": "_include", + "value": "Consent:grantee" + }, + { + "disabled": false, + "description": { + "content": "Include referenced resources in the bundle response by specifying one or more `_include` parameters. Further info [here](https://www.hl7.org/fhir/search.html#_include).", + "type": "text/plain" + }, + "key": "_include", + "value": "Consent:patient" + } + ], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) A globally unique identifier (GUID) for the request, which we use to correlate logs through different components.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Request-ID", + "value": "60E0B220-8136-4CA5-AE46-1D97EF59D068" + }, + { + "disabled": false, + "description": { + "content": "An optional ID which you can use to track transactions across multiple systems.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + }, + { + "disabled": false, + "description": { + "content": "An optional `;` delimited string containing parameters required to refresh proxy relationships from GPIT supplier systems. Parameters that comprise this string are:\n\n- IM1 User Connection token\n- ODS Code\n", + "type": "text/plain" + }, + "key": "X-IM1-Connection-Params", + "value": "NiV3CyMJH3xYV26ghlVpbbjT7pDVEA8HpFczAjRLTs1VezC4CYzupZ3XxXAWM7ELuseqrV8r0Ill7EL7G2tXUaVHCPWgg4q10+MxFjnRPrjDvckBRSZazqZcp0K2VBdUV0rZ7RUYJNJsjVAeefWhiK/Y4R+GFO86QDpt41JS9xA=;G123456" + }, + { + "key": "Accept", + "value": "application/fhir+json" + } + ], + "method": "GET", + "body": {} + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "df30547e-861b-4e28-aaff-b79639bd9cd1", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[GET]::/Consent - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/Consent - Content-Type is application/fhir+json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/fhir+json\");\n});\n", + "// Validate if response has JSON Body \npm.test(\"[GET]::/Consent - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "1a74de43-34f6-4656-8441-2f29e1067f21", + "name": "Create a proxy role", + "request": { + "name": "Create a proxy role", + "description": { + "content": "## Overview\nUse this endpoint to create a new proxy role between a patient and a related person (proxy).\n\n## Access modes\n\nThis endpoint supports the following access modes:\n- Healthcare worker access\n- Application-restricted access\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request | Response |\n| --------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |\n| Successful parent-child proxy creation | Valid request with a legal basis of parental responsibility, with performer identifier value of `9000000009`| HTTP Status 201 and OperationOutcome response |\n| Successful adult-adult proxy creation | Valid request with legal basis of consent, with performer identifier value of `9000000017` | HTTP Status 201 and OperationOutcome response |\n| Valid OTHER reason code with free text | Request with reason code 'OTHER' and free text provided, performer identifier `9000000051` | HTTP Status 201 and OperationOutcome response |\n| Non-OTHER reason code without free text | Request with a reason code other than 'OTHER', no free text, performer identifier `9000000052` | HTTP Status 201 and OperationOutcome response |\n| Non-OTHER reason code with free text | Request with a reason code other than 'OTHER', with free text, performer identifier `9000000053` | HTTP Status 201 and OperationOutcome response |\n| Missing free text for OTHER reason code | Request with reason code 'OTHER' but missing free text, performer identifier `9000000050` | HTTP Status 400 and MISSING_FREE_TEXT_FOR_OTHER error response |\n| Missing grantor | Valid request with status 'active' but no grantor extension, performer identifier `9000000054` | HTTP Status 400 and MISSING_GRANTOR error response |\n| Missing grantor valueReference | Request with grantor extension but missing valueReference, performer identifier `9000000057` | HTTP Status 400 and MISSING_GRANTOR_REFERENCE error response |\n| Missing grantor valueIdentifier | Request with grantor extension but missing valueIdentifier, performer identifier `9000000058` | HTTP Status 400 and MISSING_GRANTOR_IDENTIFIER error response |\n| Invalid grantor ODS code value | Request with grantor extension but missing/empty/invalid ODS code, performer identifier `9000000055` | HTTP Status 422 and INVALID_GRANTOR_VALUE error response |\n| Invalid grantor identifier system | Request with grantor extension but wrong/missing identifier system, performer identifier `9000000056` | HTTP Status 422 and INVALID_GRANTOR_SYSTEM error response |\n| Duplicate relationship | Request for relationship that already exists, with performer identifier value of `9000000049` | HTTP Status 409 and DUPLICATE_RELATIONSHIP error response |\n\n### Sandbox constraints\n\nThe sandbox environment has the following constraints for this endpoint:\n\n- `patient.identifier.value` is disregarded. The returned response is based on the `performer.identifier.value` only.\n- Request body is not validated.\n- Request headers are not tested. `X-Request-ID` and `X-Correlation-ID` are disregarded.\n- No proxy role is created.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "Consent" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) A globally unique identifier (GUID) for the request, which we use to correlate logs through different components.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Request-ID", + "value": "60E0B220-8136-4CA5-AE46-1D97EF59D068" + }, + { + "disabled": false, + "description": { + "content": "An optional ID which you can use to track transactions across multiple systems.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + }, + { + "key": "Content-Type", + "value": "application/fhir+json" + }, + { + "key": "Accept", + "value": "application/fhir+json" + } + ], + "method": "POST", + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Consent\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\",\n \"display\": \"Privacy Consent\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://terminology.hl7.org/CodeSystem/v3-ActCode\",\n \"code\": \"INFA\",\n \"display\": \"information access\"\n }\n ]\n }\n ],\n \"patient\": {\n \"type\": \"Patient\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000012\"\n }\n },\n \"dateTime\": \"2025-02-11T14:30:00Z\",\n \"provision\": {\n \"type\": \"permit\",\n \"period\": {\n \"start\": \"2025-02-11T14:30:00Z\",\n \"end\": \"2029-02-11T14:30:00Z\"\n },\n \"actor\": [\n {\n \"reference\": {\n \"type\": \"RelatedPerson\",\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\"\n }\n }\n }\n ]\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created from scratch by GP\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantee\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9000000009\",\n \"display\": \"Role created\"\n }\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.regulatoryBasis\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-NHSProxyLegalBasis\",\n \"code\": \"parental-responsibility\",\n \"display\": \"Parental responsibility\"\n }\n ]\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/5.0/StructureDefinition/extension-Consent.grantor\",\n \"valueReference\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"G8101234\"\n }\n }\n }\n ]\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "c7e7255e-216e-4466-99c3-bc0a6aebb3d2", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[POST]::/Consent - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[POST]::/Consent - Content-Type is application/fhir+json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/fhir+json\");\n});\n", + "// Validate if response has JSON Body \npm.test(\"[POST]::/Consent - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "080aed9c-b82f-4ef1-9b98-8b610310d0ef", + "name": "{id}", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ + { + "id": "ae09a18a-b34b-4e53-9ca6-5931ea0ed360", + "name": "Get proxy role", + "request": { + "name": "Get proxy role", + "description": { + "content": "## Overview\nUse this endpoint to get the details of a proxy role, including current status, based on a provided id.\n\nYou can (optionally) include the `_include=Consent:grantee` request parameter to include the proxy's details in the response.\n\nYou can (optionally) include the `_include=Consent:patient` request parameter to include the patient's details in the response.\n\n## Access modes\n\nThis endpoint supports the following access modes:\n- Healthcare worker access\n- Application-restricted access\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request | Response |\n| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| Retrieve single consenting adult relationship | Valid request with ID `74eed847-ca25-4e76-8cf2-f2c2d7842a7a` | HTTP Status 200 Bundle containing a single active proxy relationship |\n| Retrieve single consenting adult relationship with patient details | Valid request with ID `74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:patient` | HTTP Status 200 Bundle containing a single active proxy relationship with patient details |\n| Retrieve single consenting adult relationship with grantee details | Valid request with ID `74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:grantee` | HTTP Status 200 Bundle containing a single active proxy relationship with grantee details |\n| Retrieve single consenting adult relationship with grantee and patient details | Valid request with ID `74eed847-ca25-4e76-8cf2-f2c2d7842a7a?_include=Consent:grantee&_include=Consent:patient` | HTTP Status 200 Bundle containing a single active proxy relationship with grantee and patient details |\n| Retrieve single mother-child relationship | Valid request with ID `39df03a2-1b14-4d19-b1dc-d5d8cbf96948` | HTTP Status 200 Bundle containing a single active proxy relationship |\n| Retrieve single mother-child relationship with patient details | Valid request with ID `39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:patient` | HTTP Status 200 Bundle containing a single active proxy relationship with patient details |\n| Retrieve single mother-child relationship with grantee details | Valid request with ID `39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:grantee` | HTTP Status 200 Bundle containing a single active proxy relationship with grantee details |\n| Retrieve single mother-child relationship with grantee and patient details | Valid request with ID `39df03a2-1b14-4d19-b1dc-d5d8cbf96948?_include=Consent:grantee&_include=Consent:patient` | HTTP Status 200 Bundle containing a single active proxy relationship with grantee and patient details |\n\n### Sandbox constraints\n\nThe sandbox environment has the following constraints for this endpoint:\n\n- Request headers are not tested. `X-Request-ID` and `X-Correlation-ID` are disregarded.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "Consent", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "Include referenced resources in the bundle response by specifying one or more `_include` parameters. Further info [here](https://www.hl7.org/fhir/search.html#_include).", + "type": "text/plain" + }, + "key": "_include", + "value": "Consent:grantee" + }, + { + "disabled": false, + "description": { + "content": "Include referenced resources in the bundle response by specifying one or more `_include` parameters. Further info [here](https://www.hl7.org/fhir/search.html#_include).", + "type": "text/plain" + }, + "key": "_include", + "value": "Consent:patient" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The logical id of the Consent resource", + "type": "text/plain" + }, + "type": "any", + "value": "74eed847-ca25-4e76-8cf2-f2c2d7842a7a", + "key": "id" + } + ] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) A globally unique identifier (GUID) for the request, which we use to correlate logs through different components.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Request-ID", + "value": "60E0B220-8136-4CA5-AE46-1D97EF59D068" + }, + { + "disabled": false, + "description": { + "content": "An optional ID which you can use to track transactions across multiple systems.\nMust be a universally unique identifier (UUID) (ideally version 4).\nMirrored back in a response header.\n", + "type": "text/plain" + }, + "key": "X-Correlation-ID", + "value": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + }, + { + "key": "Accept", + "value": "application/fhir+json" + } + ], + "method": "GET", + "body": {} + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "f25b8bde-c9ad-491f-b659-07361909e97a", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[GET]::/Consent/:id - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/Consent/:id - Content-Type is application/fhir+json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/fhir+json\");\n});\n", + "// Validate if response has JSON Body \npm.test(\"[GET]::/Consent/:id - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "54679606-dd1e-4d13-aa73-20407a03431c", + "name": "Update a proxy role", + "request": { + "name": "Update a proxy role", + "description": { + "content": "## Overview\nUse this endpoint to update an existing proxy role.\n\nSupported update scenarios include:\n\n* Update the status and status reason, (optionally) providing an additional free text description\n* Update the regulatory basis\n* Update the end date, for time-bound access\n\n## Request Requirements\n* The proxy role must exist and be identified by a valid ID\n* JSON Patch operations must be valid according to RFC 6902\n* Status changes must use valid status codes from \n\n### IMPORTANT: Business Rule Enforcement for `/status` updates\n\nIf you update the `/status` of a role, you **MUST** also provide a corresponding update to the `/extension` path in the same patch array to provide the `statusReason`. An error will be returned if a request for a change of `/status` does not include a status reason.\n\nThe values for `/status` and `statusReason` are validated against a proxy role lifecycle to ensure that the transition between the existing and requested status is valid. An error will be returned if the requested transition is not valid.\n\n## Access modes\n\nThis endpoint supports the following access modes:\n- Patient access\n- Healthcare worker access\n- Application-restricted access\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request | Response |\n| ------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |\n| Successful status update | Valid patch changing status to 'active', request with id '74eed847-ca25-4e76-8cf2-f2c2d7842a7a' | HTTP Status 200 and OperationOutcome |\n| Successful access level update | Valid patch modifying the role end date, request with id '6b71ac92-baa3-4b76-b0f5-a601257e2722' | HTTP Status 200 and OperationOutcome |\n| Multiple valid changes | Valid patch with multiple operations, request with id '43003db8-ffcd-4bd6-ab2f-b49b9656f9e5' | HTTP Status 200 and OperationOutcome |\n| Valid OTHER reason code with free text | Patch with reason code 'OTHER' and free text, id='a1b2c3d4-e5f6-4789-a0b1-c2d3e4f5a6b7'| HTTP Status 200 and OperationOutcome |\n| Non-OTHER reason code without free text | Patch with a reason code other than 'OTHER', no free text, id='b2c3d4e5-f6a7-4890-b1c2-d3e4f5a6b7c8' | HTTP Status 200 and OperationOutcome |\n| Non-OTHER reason code with free text | Patch with a reason code other than 'OTHER', with free text, id='c3d4e5f6-a7b8-4901-c2d3-e4f5a6b7c8d9' | HTTP Status 200 and OperationOutcome |\n| Invalid patch format | Malformed JSON patch document, request with id '849ea584-2318-471b-a24c-cee1b5ad0137' | HTTP Status 400 and INVALID_PATCH_FORMAT error response |\n| Invalid path | Patch targeting non-existent element, request with id '01abb0c5-b1ac-499d-9655-9cd0b8d3588f' | HTTP Status 400 and INVALID_PATCH_PATH error response |\n| Invalid status code | Patch with invalid status value, request with id '78c35330-fa2f-4934-a5dd-fff847f38de5' | HTTP Status 422 and INVALID_STATUS_CODE error response |\n| Invalid status reason | Patch with invalid status reason value, request with id '51fb4df5-815a-45cd-8427-04d6558336b7' | HTTP Status 422 and INVALID_STATUS_REASON error response |\n| Resource not found | Patch for non-existent Consent, request with an id not listed here | HTTP Status 404 and RESOURCE_NOT_FOUND error response |\n| Invalid state transition | Patch attempting invalid status change, request with id '7b7f47b8-96e5-43eb-b733-283bf1449f2c' | HTTP Status 422 and INVALID_STATE_TRANSITION error response |\n| Missing free text for OTHER reason code | Patch with reason code 'OTHER' but missing free text, id='d4e8a6f2-1c3b-4a7e-9d2f-8b5c7e9f1a3d' | HTTP Status 400 and MISSING_FREE_TEXT_FOR_OTHER error response |\n| Missing grantor | Patch attempting to set status to 'active' without grantor extension, id='90957744-b971-496e-b7c3-ab971868ce14' | HTTP Status 400 and MISSING_GRANTOR error response |\n| Missing grantor valueReference | Request with grantor extension but missing valueReference, id='7e764160-38b6-41eb-9012-a3e476cbc517' | HTTP Status 400 and MISSING_GRANTOR_REFERENCE error response |\n| Missing grantor valueIdentifier | Request with grantor extension but missing valueIdentifier, id='faefd8c5-5e24-4415-8252-96e9241c7e78' | HTTP Status 400 and MISSING_GRANTOR_IDENTIFIER error response |\n| Invalid grantor ODS code value | Request with grantor extension but missing/empty/invalid ODS code, id='b68cbfc8-ccc2-48ad-b97b-b7410d773dc1' | HTTP Status 422 and INVALID_GRANTOR_VALUE error response |\n| Invalid grantor identifier system | Request with grantor extension but wrong/missing identifier system, id='fd189522-68e5-42dc-b44c-989be0eaa2bf' | HTTP Status 422 and INVALID_GRANTOR_SYSTEM error response |\n\n### Sandbox constraints\n\nThe sandbox environment has the following constraints for this endpoint:\n\n- Request body is not validated.\n- Request headers are not tested.\n- No proxy role is updated.\n", + "type": "text/plain" + }, + "url": { + "path": [ + "Consent", + ":id" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) The logical id of the Consent resource", + "type": "text/plain" + }, + "type": "any", + "value": "74eed847-ca25-4e76-8cf2-f2c2d7842a7a", + "key": "id" + } + ] + }, + "header": [ + { + "key": "Content-Type", + "value": "application/json-patch+json" + }, + { + "key": "Accept", + "value": "application/fhir+json" + } + ], + "method": "PATCH", + "body": { + "mode": "raw", + "raw": "[\n {\n \"op\": \"replace\",\n \"path\": \"/status\",\n \"value\": \"inactive\"\n },\n {\n \"op\": \"add\",\n \"path\": \"/extension/-\",\n \"value\": [\n {\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-England-Consent-Status-Reason\",\n \"valueCodeableConcept\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/England-ConsentStatusReason\",\n \"code\": \"ROLE_CREATED\",\n \"display\": \"Role created\"\n }\n ]\n }\n }\n ]\n }\n]", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "response": [], + "event": [ + { + "listen": "test", + "script": { + "id": "2fff21b8-e010-4b64-aeb6-8bb8a7dd4049", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[PATCH]::/Consent/:id - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[PATCH]::/Consent/:id - Content-Type is application/fhir+json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/fhir+json\");\n});\n", + "// Validate if response has JSON Body \npm.test(\"[PATCH]::/Consent/:id - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] + } + ], + "event": [] + } + ], + "event": [], + "variable": [ + { + "type": "any", + "value": "https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4", + "key": "baseUrl" + } + ], + "info": { + "_postman_id": "614b5082-b38a-4cdd-941c-f75e9524cdbb", + "name": "Validated Relationships Service API", + "version": { + "raw": "1.16.0", + "major": 1, + "minor": 16, + "patch": 0, + "prerelease": [], + "build": [], + "string": "1.16.0" + }, + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "description": { + "content": "## Overview\nThis service underpins the National Proxy Programme whose core objective is to allow Patients to be supported with\ntheir healthcare by someone they trust (a Proxy) as part of a digitally-enabled journey. The service has two core\nuses. Firstly, it surfaces verified candidate relationships (i.e. indicates suitable Proxies for a Patient such as\nBirth Mothers) to support GP’s decision-making when granting Proxy access. Secondly, it supports the subsequent\ncreation, use and management of Proxy roles which are stored in a central, national database. The Proxy roles held\nby the database are strictly for the purpose of enabling access to healthcare services, initially in Primary Care.\n\nWith this service you can:\n\n- Create a new Proxy access request (Submit an online application via NHS App)\n- View Pending Proxy access requests\n- Get verified candidate relationships (to support decision making when granting proxy access)\n- Create a Proxy role\n- Get Proxy roles\n- Get a Proxy role by ID\n- Update (or revoke) a Proxy role\n\n## Who can use this API\nThis API can only be used where there is a legal basis to do so. Make sure you have this and a valid use case before\nyou go too far with your development by [contacting us](https://digital.nhs.uk/developer/help-and-support).\n\nYou must do this before you can go live (see the 'Onboarding' section below).\n\n## Related APIs\nThe following APIs are related to this API:\n\n- [Personal Demographics Service - FHIR API](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir) - we use the data held in PDS as a source of data to verify relationships.\n\n## API status and roadmap\nThis API is [in production, beta](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses), meaning:\n- we might make breaking changes, but only if we cannot avoid it, and we will give advance notice\n\n## Service level\nThis API is a bronze service, meaning it is operational and supported only during business hours (8am to 6pm), Monday to Friday excluding bank holidays.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\nThis API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest).\n\nIt conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#fhir) global standard for health care data exchange, specifically to [FHIR R4 (v4.0.1)](https://hl7.org/fhir/r4/), except that it does not support the [capabilities](http://hl7.org/fhir/R4/http.html#capabilities) interaction.\n\nIt includes some country-specific FHIR extensions, which are built against [FHIR UK Core](https://digital.nhs.uk/services/fhir-uk-core), specifically [UK.core.r4 1.0.0](https://simplifier.net/packages/uk.core.r4/1.0.0).\n\nYou do not need to know much about FHIR to use this API - FHIR APIs are just RESTful APIs that follow specific rules.\nIn particular:\n- resource names are capitalised and singular, for example `/RelatedPerson` not `/relatedpersons`\n- array names are singular, for example `name` not `names` for the recorded names of a patient\n\nThere are [libraries and SDKs available](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) to help with FHIR API integration.\n\n## Guidance for developers\n\nSupplementary documentation and guidance for developers:\n\n- National Proxy Service developer documentation (link to be added)\n\n## Network access\nThis API is available on the internet.\n\nFor more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n## Security and authorisation\n\nThis API supports both [user-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis) and [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis) access types with the following access modes:\n\n| Access mode | Access type |\n|-------------------------------|------------------------|\n| Patient access | User-restricted |\n| Healthcare worker access | User-restricted |\n| Application-restricted access | Application-restricted |\n\nFor more information on access modes and how to use them, see the developer [security and authorisation guide](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation).\n\nEach API operation section of this documentation indicates the access modes that the endpoint supports.\n\n### User-restricted access\n\nUser-restricted access meaning an end user must be present, authenticated and authorised.\n\n#### Patient access mode\nIf the end user is a patient then you must use this access mode.\n\n[Review all patient access modes](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#patient-access-mode)\n\nAll API endpoints that support this access mode require that the user has proven their identity to a high level\nand authenticated using strong authentication credentials. The combination of these forms a [Vector of Trust](https://nhsconnect.github.io/nhslogin/vectors-of-trust/) profile.\n\nAllowed vectors of trust are:\n- `P9.Cp.Cd`\n- `P9.Cp.Ck`\n- `P9.Cm`\n\n#### Healthcare worker access mode\nIf the end user is a healthcare worker then you must use this access mode. All API endpoints that support this\naccess mode require that the user has been authenticated with a \"very high confidence\" authenticator ([AAL3](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication/integrate/design-and-build/authenticator-guidance-for-developers)).\n\n[Review all CIS2 healthcare worker access modes](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#healthcare-worker-access-mode)\n\n### Application-restricted access\n\nThis API is application-restricted, meaning we authenticate the calling application but not the end user. This\nshould only be utilised where user-restrcited access modes are not feasible or practical.\n\n[Review all application-restricted access modes](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis)\n\n## Headers\nThis API is case-insensitive when processing request headers, meaning it will accept headers regardless of the letter casing used. (e.g. X-Request-Id, x-request-id are treated the same). When sending headers back in the response, we preserve the exact casing as received in the original request.\n\n## Errors\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:\n\n* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nErrors specific to each API are shown in the Operations section. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more information on errors.\n\n## Open source\nYou might find the following [open source](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#open-source) resources useful:\n\n| Resource | Description | Links |\n| -------------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Validated Relationships FHIR API | Source code for the API proxy, sandbox and specification. | [GitHub repo](https://github.com/NHSDigital/validated-relationships-service-api) |\n| FHIR libraries and SDKs | Various open source libraries for integrating with FHIR APIs. | [FHIR libraries and SDKs](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) |\n| nhs-number | Python package containing utilities for NHS numbers including validity checks, normalisation and generation. | [GitHub repo](https://github.com/uk-fci/nhs-number) \\| [Python Package index](https://pypi.org/project/nhs-number/) \\| [Docs](https://nhs-number.uk-fci.tech/) |\n\nWe currently don't have any open source client libraries or sample code for this API and the source code for the Validated Relationship Service FHIR application is not currently in the open. If you think this would be useful, [contact us](https://digital.nhs.uk/developer/help-and-support).\n\n## Environments and testing\n| Environment | Base URL |\n| ----------------- | ------------------------------------------------------------------------------------ |\n| Sandbox | `https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/` |\n| Integration test | `https://int.api.service.nhs.uk/validated-relationships/FHIR/R4/` |\n| Production | `https://api.service.nhs.uk/validated-relationships/FHIR/R4/` |\n\n### Sandbox testing\nOur [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing)\n\n* is for early developer testing\n* only covers a limited set of scenarios\n* is open access, so does not allow you to test authorisation\n\n[![Import Postman Collection](https://img.shields.io/badge/Import-Postman%20Collection-orange?logo=postman)](https://raw.githubusercontent.com/NHSDigital/validated-relationships-service-api/master/postman/validated_relationship_service.sandbox.postman_collection.json)\n\nImport the postman collection to run requests against sandbox.\n\n### Integration testing\n\nOur [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing)\n\n* is for formal integration testing\n* requires authorisation using a supported access mode\n\n[\"Run](https://app.getpostman.com/run-collection/50544839-b6783b4e-de59-42c6-a80e-72cf64fa5ec9?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D50544839-b6783b4e-de59-42c6-a80e-72cf64fa5ec9%26entityType%3Dcollection%26workspaceId%3D082e43b8-9a51-4a16-af66-0d2b233cd69c#?env%5BINT%5D=W3sia2V5IjoiY2lzMl90b2tlbiIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6InNlY3JldCIsInNlc3Npb25WYWx1ZSI6InFNQnZnNVVId0kxc3k3UWx4WUtQc1VxekZoQXIiLCJjb21wbGV0ZVNlc3Npb25WYWx1ZSI6InFNQnZnNVVId0kxc3k3UWx4WUtQc1VxekZoQXIiLCJzZXNzaW9uSW5kZXgiOjB9LHsia2V5IjoibG9naW5fdG9rZW4iLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJzZWNyZXQiLCJzZXNzaW9uVmFsdWUiOiJqOXcxNUxMa1VjbWtzOU15c0FHbGpmTW9LMGdGIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiJqOXcxNUxMa1VjbWtzOU15c0FHbGpmTW9LMGdGIiwic2Vzc2lvbkluZGV4IjoxfSx7ImtleSI6ImFwaV9iYXNlX3VybCIsInZhbHVlIjoiaHR0cHM6Ly9pbnQuYXBpLnNlcnZpY2UubmhzLnVrL3ZhbGlkYXRlZC1yZWxhdGlvbnNoaXBzL0ZISVIvUjQiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoiZGVmYXVsdCIsInNlc3Npb25WYWx1ZSI6Imh0dHBzOi8vaW50LmFwaS5zZXJ2aWNlLm5ocy51ay92YWxpZGF0ZWQtcmVsYXRpb25zaGlwcy9GSElSL1I0IiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiJodHRwczovL2ludC5hcGkuc2VydmljZS5uaHMudWsvdmFsaWRhdGVkLXJlbGF0aW9uc2hpcHMvRkhJUi9SNCIsInNlc3Npb25JbmRleCI6Mn0seyJrZXkiOiJ2cnNfYXBpX3ByaXZhdGVfa2V5IiwidmFsdWUiOiIiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoic2VjcmV0Iiwic2Vzc2lvblZhbHVlIjoiLS0tLS1CRUdJTiBQUklWQVRFLi4uIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiItLS0tLUJFR0lOIFBSSVZBVEUgS0VZLS0tLS1cXG5NSUlKUVFJQkFEQU5CZ2txaGtpRzl3MEJBUUVGQUFTQ0NTc3dnZ2tuQWdFQUFvSUNBUURVMDhhUGJWckxRR0R3XFxuTGE2NlNYeVNzc1hTZ0VWa3V5cW9XVGJGbWVlV0ZVaWx5d0xLMGp1aTRpcjI5V1VadWpqNmt0NWg5MFdaMER5Slxcbml3SU9lOWJQdVlnbXR2am9RY2lWZ1J2UUJ4UlZYYzhJUnlveUVnV0pYZVgxUXVPVFVVWEZwT2VzZUFyOXJXeXhcXG5iVTUwek1NTFo3REtId1llUGlNZG1zaExoUGI2bWdScEdQaXpseFJDUXF6RGJxVzh0REM1YWhaYUN5UG1xYWhKXFxuYXFpSzgyQWNpbW5PL1FnZTFjd1JKMGtMU2d0ZG5tS3hGVFpvbm5WOWJJc2wwNUhrczM3R096S3B6ZEt0cFBZdlxcbmFCaGhZVUZzY24yR3grUmxocGo2UWdSS2VwNUpDUXN1UzExbUJKM2E2ZVZDRXlZa3VOdHl0WVh4aVB2YXJYVk5cXG5VZFpIQ0tNb3pjcUpNTHpXZlVKQW9UWGtwMVJ3RURkbDVzTHlPOWxuZlhOdHZKYkx2OGhBalNJT08vY0VCOGJLXFxuVmVyV2I5bnBLMTl4cXhSRjNEdTJiOFdweW5HMEVpZ21NK0lVbkVYQjZMVUNxWWpiVjl0ejMzVDBSM1BkaHg0WFxcbkY4dktzWHY2V0NYVXlVWktNSi9BVTAyc3ZvYlltV3JwOTFEdEdidy9YZ0pFZjBhSVUySzNaTGRUNzV5RWRPWHpcXG4rK2FZNW03VjIzbEpBQjgzU3o4T1R1QW1iMkdkY3IvV2xYRUh6NG5xdms0bVBSU3pzcWFVenBXOEpyS1dBR0JMXFxuU1J0bVU4dWFIZ1kweWFoRnpINWtNNy9oa1NTQTZoeURpaDFxeTkwSjJRN0s0Q1crbE9LbmROYTZaQTh0ZVNBY1xcbm53dHB5aDBWSS9yd3A3TURuZVZ5L0x1Q1dRU0dOd0lEQVFBQkFvSUNBRTc3SElmam5Ec3JkQTROMWZiNkNJbmtcXG5ZRGVETkwxeUhCMkhwaVRrdmFYYjFpNzR6TnQ1ODNtNkZ4bTQ3Y0VEYzl2Qm4xZVp6VEdNcnJxWVpMWDlUVFdmXFxuYzZCeWJLSzhydlNVaWo3RU1jNlFWcUdLejJUdmZUQ0NNVEc0bGYzNHZqemZ1cjR0ZWw2eitrOUo4a0MwTUhuT1xcbkREU21HTDRtYngrd2JqNWdaTXVSVnF1dUFiV2NEbitjZ01LeUVEMmNYU3loNnhPVmFNaFVFOGpURlNNanVIbytcXG4vNDg2SmNaVHJ6eDZhTWdRdlhFTHN6Sm1YZCtyVm95cU9HVmNRNXNzNVpJcEs5OEtLL0lXOHVtYTV0bFVuMVBnXFxubFNic2paMER1MGU4TWgxMXJjSUs0aVJYQVowM2YyRmJSYUlrdXhZTHFCekVzcVYxSVlvQXJ6UjNkMTY3SE5qOVxcbmJCYmF4SVdPcDRBUmpzU1ByM3JDMmVNSXR2bzh4OGVjVG5pZ2llS2ViSXJVcy9xMS9BNGFiZVl6Yk9Ob1JZWGRcXG5wWUc4QTB5RVNHWGpDeUd2bXZDL1krQ0hpSmJVNXB2SkNDUU8vVHNlR21Ed0N6Nk1JTldOK3NKWlpHaU5idTJ6XFxuejJGM0ZUVlJ4VTlTOFdRV3NiZmxFMjgyWmJ5VDNYNzV1TVMzZG5ZTjNta3A1NmsvRkJkWXZmUzhTN0VtLzNOWlxcbk5kbUtuMi83QnB5ZEVaSk9RYitISHVSbWFua09YVEVmUU9aUE5SbXhFU1NWUHJEaWZMaVhLOFMyK1lvb0F2RERcXG4vandvOG1rcU5lVWNEOTlhWWthTk52NHJLaDZpRitSZmhvSm85aHFIOVFCR2swUGZ6TW5yN0w0QWFNcHRkS1duXFxuK0NLLzJuR1VXcWZtZUhZamF2TmhBb0lCQVFEc0JBSFNPaFdDQnlFQU9ZNGdub3hPZ29yeDJCOUdGT1J0TmpRK1xcbnhtMXV4Z3B5ams1RGFUKzRBQ1daRVMvdXNrYkhTV0NuVStlMXlNWjFTdFE5ZlpHcGNyVmpuZ0ZJOXRMVG13VmdcXG5zcmxwUGpWQ2lHS1QzR3MyQ0NodjZwenlidGN3U0RCVjVYbEVkTXJ2ZkVBRFBEaURCZ2Q1ck5QVUZhQjNJVDJjXFxuaVJHMlN6VDFGRWNmME1UNHg3MmQvMVFIbWhoVFowT2tMREkyc0hOODlXcjRrQ1MrUXhOWGY2WHpzUXlDWnBqK1xcbk93ZElnM3V5aVJEaHgvR213UDBVdGJzdXJSZ3dLcVVaZitpa3R3WnRHYmp6QytZWmphTU9zWDdkWTNhSFUyNDdcXG52Q29GZzltZG1nZ1d0Mzd0d1JZMGxjSnpzemIwL1c2bjAzTXBqeXJ1SE50bCtIS1JBb0lCQVFEbTJTQUhEc2xwXFxuSnZMSEJ5aEgvektmcGY1MFJSTFFCWWxvM2NGcGZsd1Bob0lyK25wbjNoRmdoY2x5MU15N214U3Q0Ulh2YjZaVVxcbm9IM2MyV2wrb2NGUWxsNStncGhyaU1ibC9RclJ4bS8wK2lmM3BRK0RjK1M1ZW1OSDdaN3hmSDA5TGdsRFFkMmpcXG5WU1V5SU56OVA2d1cwbm9vOWZna0Nucy9tQVo1QnRyWklHZE92QjhBejdZMm1oWWlSOEZNMTFqZGxLRHlvMWZVXFxuZFc0L0NXdjhLTmxnU1ZFemlMMVBNcHRPUloyYUFybTZZMTl3ZnVwa0crR1o4VEswQ0FTME5QNUFROGwyZUVaMFxcbmZhUEFvNU5RMUZzSWYxamdJVk9wY00xd1ZQVE1xSEk4Q0FRRm5uVEhFL0N1ZW9KSWFSa1drc0tCS0ZITk5jOE5cXG4wcThvSkNWQU1NQkhBb0lCQUhSd2dhbURLSXRQRXhQMlVVMThpMEpNbTFvM3d5NGpMcE5HODcyb3plS2g2Qk9lXFxuYTdSTVg3aGFzakh6VGMrWXV0eWxNZjg3b1F5SmNvZjVrLzZHVGUvb2ZOOFozQTV3WDVFd1lSWFU5eTZhRjFLc1xcbjBOMmNHSFMrejV4dmhtRUJHRDlremh3Q3E3Si9ZSU9JckZnc1JNRTNuMGFEWXJxMnRNVXhiQ0VuYXNxaURnMS9cXG5wSnRvdDFUNXptMzl3eXBBOXhGbTEvTk9MclBXbUJPbFROSTI0em5QQStMZVFqU1pPOCsxNkhNOUVoblBiSjZuXFxuaXVHcGNHcFJ1a3FXWWpQa0NCUHpaaUxQZlNxT2RhZ3IwWmh2WFdWc0FHOUdXSTNHL1hwRVNoVkVmd0xiaXVoN1xcblR0Uk9VVnZoTUNCZlptRUlvT3Q3Z1RWaFYrYkFFSEVMWVo3TVZWRUNnZ0VBZkgvakx3dEJnczEzcC9GclB4RWFcXG5LMUhwM3FrV0VVeTdJK3hkRUZrT3EyemVyWHRFSXRwNFFyZEV3d0tUZkNhU1M0aVdQUERaSXREL3NHa3M1UmUxXFxuMjVHTld1dHg2cVQwcURzRlo4ZCt2LzllS01oRGlxQ3BYWUx0SW5DOEJQOGZ5Q3dZNE1ZWUU2dXJDTk1DZkM2blxcbjBCTXB3UWVQRVZqNXlYMWpHRWlqSlBDOTVvKzhwTUpoUWlkdUFvVHljays5NUpyeEJvc2pwampEQVlwQ1M5ZDRcXG5ETjdkeFU1YzB1YTNMY3FMeWZEb1crYVdKV1M5WXNwS3JLeVJyTmlhT05wUHVUY1Y0eWZRejZpbTlSRUROVmVoXFxuMVA1aFgxZDUrR3NXMFJ0d2Z5UGxvQXl1cHAwajIrNGNJdTE5Y0RJR1RzOU55VHlHaVljWXFSclVUbkRZQ2p1QVxcbnB3S0NBUUFXeFF4V0J6TnZ4L1pNZFlQK0o3eTd3VDlTY1JYZHR5MlRpbFJ0dWxTTGpGZmx1bnRCcUF1ZTVlWTZcXG41Y0hNRGp3N09lajhmaFFXdDN2Yi9xUHBEeXdoOXRTS0hCR0JxWXRJK3NCRXY3bktqNUcvTnVWWUhYOEVuOHBvXFxuc1pTUnphL3FxeHdSTDZtaHppNDlGOEo5ZGdZWHJLUzl6OUpDaTFZRUlCVzA1Y0xpVFk5ZFZiOGZFbTByMllNOFxcbkJOZjQ1NExlNG1TWnJSTjRoMG5ETDdMZzdMTFp5eW85S1Zjc1lDSG5rQ2FGVTNNS0NlTnp5ZEY4YXpyZ2FkU29cXG5xQzMybkxiSDFZMFN5UmhFM1EzOVlDVWVGek5Zbzl3d3luemVmakZ1cHNyckNxaEFPZTFnQytRMTEyNHRGTVp1XFxuS0VIdzJBQkJFT1crTU4ydkZXcEZ5WnBlVHg5Tlxcbi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0iLCJzZXNzaW9uSW5kZXgiOjN9LHsia2V5IjoibmhzX2RldmVsb3Blcl9hY2NvdW50X2FwaV9rZXkiLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJzZWNyZXQiLCJzZXNzaW9uVmFsdWUiOiI0aHdpdnBKQVpJcXZwSmxBV09jdFJYQ1NnVU1sd1p1SyIsImNvbXBsZXRlU2Vzc2lvblZhbHVlIjoiNGh3aXZwSkFaSXF2cEpsQVdPY3RSWENTZ1VNbHdadUsiLCJzZXNzaW9uSW5kZXgiOjR9LHsia2V5IjoiY29uc2VudF9hcHBfYXV0aF9oZWFkZXJfdmFsdWUiLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJzZWNyZXQiLCJzZXNzaW9uVmFsdWUiOiJDU1ZjYm90QVFHYmhMcUdabjFWVEZHY1FudEFFIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiJDU1ZjYm90QVFHYmhMcUdabjFWVEZHY1FudEFFIiwic2Vzc2lvbkluZGV4Ijo1fSx7ImtleSI6InRwcF85Njc0OTk4NTM1X2FjY2Vzc190b2tlbiIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6InNlY3JldCIsInNlc3Npb25WYWx1ZSI6IntcIkFjY291bnRJZFwiOlwiNTUyODY5ODM0XCIsXCJQYXNzcGhyYXNlXCI6XCJ2UkpxdTEzOWQ3ZHZlclpnKzhlVzd2V0ZTQ2FTbndBV0ZSNlk0dFlYalA3L3VGU2d0djdrMklPd0E0NzhPV3A3WkRxNE1CWUM2aGNUSVRFcm5Od2dieFZtN1ZaOGYzUVVuTC4uLiIsImNvbXBsZXRlU2Vzc2lvblZhbHVlIjoie1wiQWNjb3VudElkXCI6XCI1NTI4Njk4MzRcIixcIlBhc3NwaHJhc2VcIjpcInZSSnF1MTM5ZDdkdmVyWmcrOGVXN3ZXRlNDYVNud0FXRlI2WTR0WVhqUDcvdUZTZ3R2N2sySU93QTQ3OE9XcDdaRHE0TUJZQzZoY1RJVEVybk53Z2J4Vm03Vlo4ZjNRVW5MUFdoKzRLN0VQNWkvNEswQWRHWjBJSzBVdzcrQzdYWmM3RkhnOFJTY0lqaCsyTXFGN3Z1WjQ0dW1lUHZnOGVTTTQ4V1I4SzRYRT1cIixcIlByb3ZpZGVySWRcIjpcImI4OTFmYzNiNTFkNWU3YzFcIixcIkltMUNhY2hlS2V5XCI6XCJ6OEVsQ0RJM2Uxc2xXTGJac0lSVXdpaHk4V1pGc2NyMmRQbVRmVXVpK2dBcVE3WmgwV1BWSVhvL005RHVFVnpPM1hhRk9wYkIzd2M5eWhBVWhBWmhVZz09XCJ9Iiwic2Vzc2lvbkluZGV4Ijo2fSx7ImtleSI6InRwcF85Njc0OTk4NDU0X2FjY2Vzc190b2tlbiIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6InNlY3JldCIsInNlc3Npb25WYWx1ZSI6IntcIkFjY291bnRJZFwiOlwiODU4ODAzMjAzXCIsXCJQYXNzcGhyYXNlXCI6XCJKVzRIc3JXTWw0SEhNamx4OUJJVW5zUzV1QkpmcUFsWnk0L2VZbUt3a3U5VUZRL0xBQ21PR21tWGJkOG95VUZiMHY3NE14bkVmKzl6UVdPQTQ0QUtPSXQ3bEtFdlJJbzVNYy4uLiIsImNvbXBsZXRlU2Vzc2lvblZhbHVlIjoie1wiQWNjb3VudElkXCI6XCI4NTg4MDMyMDNcIixcIlBhc3NwaHJhc2VcIjpcIkpXNEhzcldNbDRISE1qbHg5QklVbnNTNXVCSmZxQWxaeTQvZVltS3drdTlVRlEvTEFDbU9HbW1YYmQ4b3lVRmIwdjc0TXhuRWYrOXpRV09BNDRBS09JdDdsS0V2UklvNU1jQjVOanZaTkJCaWhMTE82N09xNm9KY0x5bHpDRzFaZUhqTEl4MTJrUnQwblZEc3ZqQ2IyMTZuRm5EYk9mNWkxQWFYbXBTdFVIY1xcdTAwM2RcIixcIlByb3ZpZGVySWRcIjpcImI4OTFmYzNiNTFkNWU3YzFcIixcIkltMUNhY2hlS2V5XCI6XCJrMFlPWVdzVHRteGdrVlpTWXA1YXkraEd6eUYyWUhTcEE2YnpxQTZHODdiOWtxbitHTy9XQ3E0RFRiQ2RISGhkUmZCRVhhZThUU2hHa2lpOEt1Qnd3QVxcdTAwM2RcXHUwMDNkXCJ9Iiwic2Vzc2lvbkluZGV4Ijo3fSx7ImtleSI6ImVtaXNfOTY5MjExMzY5OF9hY2Nlc3NfdG9rZW4iLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJzZWNyZXQiLCJzZXNzaW9uVmFsdWUiOiJ7XCJJbTFDYWNoZUtleVwiOlwiV3VqUGxITDNGK0p4SUpReDdGUER3aWNvKzZWamVEYXp3Zjd2eW91a1M0b2c2RnllZXFxSUlVSkVVdS8zRHZZRkljQUVBenFEdk5hMXk2UGY3Rlg5Q3c9PVwiLFwiQWNjZXNzSWRlbnRpdHlHdWlkXCI6XCI3OWU4MzkyOS0uLi4iLCJjb21wbGV0ZVNlc3Npb25WYWx1ZSI6IntcIkltMUNhY2hlS2V5XCI6XCJXdWpQbEhMM0YrSnhJSlF4N0ZQRHdpY28rNlZqZURhendmN3Z5b3VrUzRvZzZGeWVlcXFJSVVKRVV1LzNEdllGSWNBRUF6cUR2TmExeTZQZjdGWDlDdz09XCIsXCJBY2Nlc3NJZGVudGl0eUd1aWRcIjpcIjc5ZTgzOTI5LWFiNzctNDI2Ni1iMWI5LWZjN2I4MjNjMTUyNVwifSIsInNlc3Npb25JbmRleCI6OH0seyJrZXkiOiJlbWlzXzk2OTIxMTM2MTJfYWNjZXNzX3Rva2VuIiwidmFsdWUiOiIiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoic2VjcmV0Iiwic2Vzc2lvblZhbHVlIjoie1wiSW0xQ2FjaGVLZXlcIjpcIkM4QXZheEp0YjZaMlFlemNSelEzWUprbFRlSVVtU2N6Y0F6Mno1a2tDazlPNjQ0dlVqV20veUJzRWF6c0htZmxPT0V1MDBlc3IvbGxDT2g4RzQzbWNBPT1cIixcIkFjY2Vzc0lkZW50aXR5R3VpZFwiOlwiMjE3ZWY2ZjEtLi4uIiwiY29tcGxldGVTZXNzaW9uVmFsdWUiOiJ7XCJJbTFDYWNoZUtleVwiOlwiQzhBdmF4SnRiNloyUWV6Y1J6UTNZSmtsVGVJVW1TY3pjQXoyejVra0NrOU82NDR2VWpXbS95QnNFYXpzSG1mbE9PRXUwMGVzci9sbENPaDhHNDNtY0E9PVwiLFwiQWNjZXNzSWRlbnRpdHlHdWlkXCI6XCIyMTdlZjZmMS0xZDcwLTRhOGUtYjcyOC02NjQzMTZjNzU2NTRcIn0iLCJzZXNzaW9uSW5kZXgiOjl9XQ==)\n## Onboarding\n\nYou need to get your software approved by us before it can go live with this API. We call this onboarding. The onboarding process can sometimes be quite long, so it's worth planning well ahead.\n\nAs part of this process, you need to demonstrate your technical conformance to the requirements for this API.\n\nYou also need to demonstrate that you can manage risks. This might impact the design of your software.\n\nTo understand how our online digital onboarding process works, see [digital onboarding](https://digital.nhs.uk/developer/guides-and-documentation/digital-onboarding).\n\n## Contact us\n\nFor help and support connecting to our APIs and to join our developer community, see [Help and support building healthcare software](https://digital.nhs.uk/developer/help-and-support).\n\n\nContact Support:\n Name: Validated Relationships Service API Support\n Email: api.management@nhs.net", + "type": "text/plain" + } + } } \ No newline at end of file diff --git a/sandbox/Makefile b/sandbox/Makefile index a40e1cde..a1b251cd 100644 --- a/sandbox/Makefile +++ b/sandbox/Makefile @@ -20,7 +20,7 @@ format: # Formats the code using black poetry run black . --line-length 120 start: load-examples # Starts the Flask app (Don't use this in production) - poetry run flask --app api.app:app run -p 9000 + poetry run flask --app api.app:app run -p 9000 --debug start-dev: clear-examples load-examples # Starts the Flask app in development mode poetry run flask --app api.app:app run -p 9000 --reload --debug diff --git a/scripts/portman/portman-cli.json b/scripts/portman/portman-cli.json new file mode 100644 index 00000000..0c70911c --- /dev/null +++ b/scripts/portman/portman-cli.json @@ -0,0 +1,7 @@ +{ + "local": "specification/validated-relationships-service-api.yaml", + "output": "postman/validated_relationship_service.sandbox.postman_collection.json", + "portmanConfigFile": "scripts/portman/portman-config.json", + "postmanConfigFile": "scripts/portman/postman-config.json", + "includeTests": true +} diff --git a/scripts/portman/portman-config.json b/scripts/portman/portman-config.json new file mode 100644 index 00000000..4e86dfbd --- /dev/null +++ b/scripts/portman/portman-config.json @@ -0,0 +1,27 @@ +{ + "tests": { + "contractTests": [ + { + "openApiOperation": "*::/*", + "statusSuccess": { + "enabled": true + }, + "contentType": { + "enabled": true + }, + "jsonBody": { + "enabled": true + }, + "schemaValidation": { + "enabled": false + }, + "headersPresent": { + "enabled": true + } + } + ] + }, + "globals": { + "stripResponseExamples": true + } +} diff --git a/scripts/portman/postman-config.json b/scripts/portman/postman-config.json new file mode 100644 index 00000000..d41153a4 --- /dev/null +++ b/scripts/portman/postman-config.json @@ -0,0 +1,12 @@ +{ + "folderStrategy": "No folders", + "parametersResolution": "Example", + "exampleParametersResolution": "Pick", + "preferredRequestBodyType": "application/fhir+json", + "includeOptionalParameters": true, + "optimizeConversion": true, + "schemaFakerOptions": { + "alwaysFakeOptionals": false, + "optionalsProbability": 0 + } +} diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index deb55a60..e3d4f5f4 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -149,7 +149,10 @@ info: * only covers a limited set of scenarios * is open access, so does not allow you to test authorisation - [Run In Postman](https://app.getpostman.com/run-collection/18067099-9c2224fd-e560-4a7c-847c-389d1a950ab7?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D18067099-9c2224fd-e560-4a7c-847c-389d1a950ab7%26entityType%3Dcollection%26workspaceId%3D082e43b8-9a51-4a16-af66-0d2b233cd69c) + [![Import Postman Collection](https://img.shields.io/badge/Import-Postman%20Collection-orange?logo=postman)](https://raw.githubusercontent.com/NHSDigital/validated-relationships-service-api/master/postman/validated_relationship_service.sandbox.postman_collection.json) + + Import the postman collection to run requests against sandbox. + ### Integration testing Our [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing) @@ -241,17 +244,6 @@ paths: application/fhir+json; charset=utf-8: schema: $ref: "#/components/schemas/QuestionnaireResponse" - examples: - questionnaireResponseMotherChildRequest: - $ref: "./examples/requests/POST_QuestionnaireResponse/mother-child.yaml#/QuestionnaireResponseMotherChildRequest" - questionnaireResponseAdultToAdultWithoutCapacityRequest: - $ref: "./examples/requests/POST_QuestionnaireResponse/adult-to-adult-without-capacity.yaml#/QuestionnaireResponseAdultToAdultWithoutCapacityRequest" - questionnaireResponseAdultToAdultWithCapacityRequest: - $ref: "./examples/requests/POST_QuestionnaireResponse/adult-to-adult-with-capacity.yaml#/QuestionnaireResponseAdultToAdultWithCapacityRequest" - questionnaireResponseAdultNominatesAdultRequest: - $ref: "./examples/requests/POST_QuestionnaireResponse/adult-nominates-adult.yaml#/QuestionnaireResponseAdultNominatesAdultRequest" - questionnaireResponseDuplicateRelationship: - $ref: "./examples/requests/POST_QuestionnaireResponse/duplicate_relationship.yaml#/QuestionnaireResponseDuplicateRelationship" responses: "200": description: Request was received successfully for processing @@ -2834,17 +2826,17 @@ components: - "Consent:grantee" - "Consent:patient" examples: + FullInclude: + summary: Include the grantee (proxy) and patient in the bundle + value: + - "Consent:grantee" + - "Consent:patient" IncludeGrantee: summary: Include the grantee (proxy) in the bundle value: Consent:grantee IncludePatient: summary: Include the patient in the bundle value: Consent:patient - FullInclude: - summary: Include the grantee (Proxy) and patient in the bundle - value: - - "Consent:grantee" - - "Consent:patient" ConsentStatus: in: query