From fddf2dd407e7ad40dec5024e5cbf4a117f357fb3 Mon Sep 17 00:00:00 2001 From: EdwardWills-nhs Date: Mon, 30 Mar 2026 13:59:12 +0000 Subject: [PATCH 1/2] [RAA-6512]-[GC]-[Bumped Redocly (major) and override handlebars dep for dependabot]-[EW] --- package-lock.json | 2914 +- package.json | 5 +- redocly.yaml | 1 - .../a020-upload-file-to-document-store.yaml | 44 +- .../file/FileContentTypeSchemaDownload.yaml | 46 - .../file/FileContentTypeSchemaUpload.yaml | 43 - .../retrieveAttachment/200Response.yaml | 47 +- test-output.json | 100528 +++++++++++++++ 8 files changed, 101509 insertions(+), 2119 deletions(-) delete mode 100644 specification/components/stu3/schemas/file/FileContentTypeSchemaDownload.yaml delete mode 100644 specification/components/stu3/schemas/file/FileContentTypeSchemaUpload.yaml create mode 100644 test-output.json diff --git a/package-lock.json b/package-lock.json index 3a3becc57..236052a33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "@redocly/cli": "^1.34.5" + "@redocly/cli": "^2.25.3" }, "devDependencies": { "license-checker": "^25.0.1", @@ -40,9 +40,10 @@ } }, "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz", + "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -93,278 +94,209 @@ "node": ">=10.10.0" } }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "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==", - "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==", + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", "license": "MIT", "engines": { - "node": ">= 10.16.0" + "node": "^14.21.3 || >=16" }, - "peerDependencies": { - "jsep": "^0.4.0||^1.0.0" + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz", + "integrity": "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==", "license": "Apache-2.0", "engines": { "node": ">=8.0.0" } }, "node_modules/@opentelemetry/api-logs": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", - "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.202.0.tgz", + "integrity": "sha512-fTBjMqKCfotFWfLzaKyhjLvyEyq5vDKTTFfBmx21btv3gvy8Lq6N5Dh2OzqeuN4DjtpSvNT1uNVfg08eD2Rfxw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": "^1.3.0" }, "engines": { - "node": ">=14" + "node": ">=8.0.0" } }, "node_modules/@opentelemetry/context-async-hooks": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.26.0.tgz", - "integrity": "sha512-HedpXXYzzbaoutw6DFLWLDket2FwLkLpil4hGCZ1xYEIMTcivdfwEOISgdbLEWyG3HW52gTq2V9mOVJrONgiwg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz", + "integrity": "sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw==", "license": "Apache-2.0", "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "node_modules/@opentelemetry/core": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.26.0.tgz", - "integrity": "sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", + "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/semantic-conventions": "1.27.0" + "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.53.0.tgz", - "integrity": "sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.202.0.tgz", + "integrity": "sha512-/hKE8DaFCJuaQqE1IxpgkcjOolUIwgi3TgHElPVKGdGRBSmJMTmN/cr6vWa55pCJIXPyhKvcMrbrya7DZ3VmzA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.53.0.tgz", - "integrity": "sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.202.0.tgz", + "integrity": "sha512-nMEOzel+pUFYuBJg2znGmHJWbmvMbdX5/RhoKNKowguMbURhz0fwik5tUKplLcUtl8wKPL1y9zPnPxeBn65N0Q==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-transformer": "0.53.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-transformer": "0.202.0" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.53.0.tgz", - "integrity": "sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.202.0.tgz", + "integrity": "sha512-5XO77QFzs9WkexvJQL9ksxL8oVFb/dfi9NWQSq7Sv0Efr9x3N+nb1iklP1TeVgxqJ7m1xWiC/Uv3wupiQGevMw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-logs": "0.202.0", + "@opentelemetry/sdk-metrics": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1", "protobufjs": "^7.3.0" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/propagator-b3": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.26.0.tgz", - "integrity": "sha512-vvVkQLQ/lGGyEy9GT8uFnI047pajSOVnZI2poJqVGD3nJ+B9sFGdlHNnQKophE3lHfnIH0pw2ubrCTjZCgIj+Q==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.26.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.26.0.tgz", - "integrity": "sha512-DelFGkCdaxA1C/QA0Xilszfr0t4YbGd3DjxiCDPh34lfnFr+VkkrjV9S8ZTJvAzfdKERXhfOxIKBoGPJwoSz7Q==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "1.26.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, "node_modules/@opentelemetry/resources": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.26.0.tgz", - "integrity": "sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/semantic-conventions": "1.27.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "node_modules/@opentelemetry/sdk-logs": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.53.0.tgz", - "integrity": "sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.202.0.tgz", + "integrity": "sha512-pv8QiQLQzk4X909YKm0lnW4hpuQg4zHwJ4XBd5bZiXcd9urvrJNoNVKnxGHPiDVX/GiLFvr5DMYsDBQbZCypRQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.4.0 <1.10.0" } }, "node_modules/@opentelemetry/sdk-metrics": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.26.0.tgz", - "integrity": "sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", + "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" + "@opentelemetry/api": ">=1.9.0 <1.10.0" } }, "node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.26.0.tgz", - "integrity": "sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", + "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/semantic-conventions": "1.27.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "node_modules/@opentelemetry/sdk-trace-node": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.26.0.tgz", - "integrity": "sha512-Fj5IVKrj0yeUwlewCRwzOVcr5avTuNnMHWf7GPc1t6WaT78J6CJyF3saZ/0RkZfdeNO8IcBl/bNcWMVZBMRW8Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.0.1.tgz", + "integrity": "sha512-UhdbPF19pMpBtCWYP5lHbTogLWx9N0EBxtdagvkn5YtsAnCBZzL7SjktG+ZmupRgifsHMjwUaCCaVmqGfSADmA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "semver": "^7.5.2" + "@opentelemetry/context-async-hooks": "2.0.1", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" }, "engines": { - "node": ">=14" + "node": "^18.19.0 || >=20.6.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@opentelemetry/sdk-trace-node/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", + "version": "1.34.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.34.0.tgz", + "integrity": "sha512-aKcOkyrorBGlajjRdVoJWHTxfxO1vCNHLJVlSDaRHDIdjU+pX8IYQPvPDkYiujKLbRnWU+1TBwEt0QRgSm4SGA==", "license": "Apache-2.0", "engines": { "node": ">=14" @@ -435,15 +367,15 @@ "license": "BSD-3-Clause" }, "node_modules/@redocly/ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.18.1.tgz", + "integrity": "sha512-Ifm/pP/tul1qmAecpbVxCBluVE32rKfjf8gYXH4xI2gCv9mRWFhJMHzkPDM4TXlxwPQYIFegymlsy8lXz7optA==", "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js-replace": "^1.0.1" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -451,36 +383,39 @@ } }, "node_modules/@redocly/cli": { - "version": "1.34.11", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.11.tgz", - "integrity": "sha512-NTFegt2uQ0A4xewDPcTadsZYSlmEUzF7wnvRgmFI8Ftvjpq/coIdr9EQPmCF6wjrh9UBKdz2rMNckxLo/jhViA==", - "license": "MIT", - "dependencies": { - "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", - "@opentelemetry/semantic-conventions": "1.27.0", - "@redocly/config": "0.22.0", - "@redocly/openapi-core": "1.34.11", - "@redocly/respect-core": "1.34.11", - "abort-controller": "3.0.0", - "chokidar": "3.5.3", - "colorette": "1.4.0", - "core-js": "3.32.1", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-2.25.3.tgz", + "integrity": "sha512-02wjApwJwGD+kGWRoiFVY0Hq960ydMAMHrK3AJH2LMiYNYcrzAr1FSbA3OSylvg2gx3w/r1r710B+iMz3KJKbw==", + "license": "MIT", + "dependencies": { + "@opentelemetry/exporter-trace-otlp-http": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-node": "2.0.1", + "@opentelemetry/semantic-conventions": "1.34.0", + "@redocly/cli-otel": "0.1.2", + "@redocly/openapi-core": "2.25.3", + "@redocly/respect-core": "2.25.3", + "abort-controller": "^3.0.0", + "ajv": "npm:@redocly/ajv@8.18.0", + "ajv-formats": "^3.0.1", + "colorette": "^1.2.0", + "cookie": "^0.7.2", "dotenv": "16.4.7", - "form-data": "4.0.4", - "get-port-please": "3.0.1", - "glob": "7.2.3", - "handlebars": "4.7.8", - "mobx": "6.12.3", - "pluralize": "8.0.0", + "glob": "^13.0.5", + "handlebars": "^4.7.6", + "https-proxy-agent": "^7.0.5", + "mobx": "^6.0.4", + "picomatch": "^4.0.4", + "pluralize": "^8.0.0", "react": "^17.0.0 || ^18.2.0 || ^19.2.1", "react-dom": "^17.0.0 || ^18.2.0 || ^19.2.1", - "redoc": "2.5.0", - "semver": "7.7.4", - "simple-websocket": "9.1.0", + "redoc": "2.5.1", + "semver": "^7.5.2", + "set-cookie-parser": "^2.3.5", + "simple-websocket": "^9.0.0", "styled-components": "6.3.9", + "ulid": "^3.0.1", + "undici": "6.24.0", "yargs": "17.0.1" }, "bin": { @@ -488,29 +423,79 @@ "redocly": "bin/cli.js" }, "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" + "node": ">=22.12.0 || >=20.19.0 <21.0.0", + "npm": ">=10" } }, - "node_modules/@redocly/cli/node_modules/core-js": { - "version": "3.32.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.1.tgz", - "integrity": "sha512-lqufgNn9NLnESg5mQeYsxQP5w7wrViSj0jr/kv6ECQiByzQkrn1MKvV0L3acttpDqfQrHLwr2KCMgX5b8X+lyQ==", - "hasInstallScript": true, + "node_modules/@redocly/cli-otel": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@redocly/cli-otel/-/cli-otel-0.1.2.tgz", + "integrity": "sha512-Bg7BoO5t1x3lVK+KhA5aGPmeXpQmdf6WtTYHhelKJCsQ+tRMiJoFAQoKHoBHAoNxXrhlS3K9lKFLHGmtxsFQfA==", "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" + "dependencies": { + "ulid": "^2.3.0" + } + }, + "node_modules/@redocly/cli-otel/node_modules/ulid": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-2.4.0.tgz", + "integrity": "sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg==", + "license": "MIT", + "bin": { + "ulid": "bin/cli.js" + } + }, + "node_modules/@redocly/cli/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" } }, - "node_modules/@redocly/cli/node_modules/mobx": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.12.3.tgz", - "integrity": "sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw==", + "node_modules/@redocly/cli/node_modules/brace-expansion": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@redocly/cli/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mobx" + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@redocly/cli/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@redocly/cli/node_modules/semver": { @@ -526,82 +511,58 @@ } }, "node_modules/@redocly/config": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.0.tgz", - "integrity": "sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==", - "license": "MIT" - }, - "node_modules/@redocly/openapi-core": { - "version": "1.34.11", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.11.tgz", - "integrity": "sha512-V09ayfnb5GyysmvARbt+voFZAjGcf7hSYxOYxSkCc4fbH/DTfq5YWoec8cflvmHHqyIFbqvmGKmYFzqhr9zxDg==", - "license": "MIT", - "dependencies": { - "@redocly/ajv": "8.11.2", - "@redocly/config": "0.22.0", - "colorette": "1.4.0", - "https-proxy-agent": "7.0.6", - "js-levenshtein": "1.1.6", - "js-yaml": "4.1.1", - "minimatch": "5.1.9", - "pluralize": "8.0.0", - "yaml-ast-parser": "0.0.43" - }, - "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" - } - }, - "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", - "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.45.0.tgz", + "integrity": "sha512-V+wNusPQUaYV1c5s9iptfKQ2Ggno4bMeiyXdNILxqZS87gttwPfqlqHKHKFyz006voS3JsR295cbpx3GlsIxKg==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "json-schema-to-ts": "2.7.2" } }, - "node_modules/@redocly/openapi-core/node_modules/minimatch": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", - "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" + "node_modules/@redocly/openapi-core": { + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-2.25.3.tgz", + "integrity": "sha512-GIu3Mdym5IDIPCvXTzMZ6TQw/+7sKd52PdysxNVe7zBk22ExSGnVE9UAk9BaLOzXT77PJWDUwaimBdJoPpxHMA==", + "license": "MIT", + "dependencies": { + "@redocly/ajv": "^8.18.0", + "@redocly/config": "^0.45.0", + "ajv": "npm:@redocly/ajv@8.18.0", + "ajv-formats": "^3.0.1", + "colorette": "^1.2.0", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "picomatch": "^4.0.4", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" }, "engines": { - "node": ">=10" + "node": ">=22.12.0 || >=20.19.0 <21.0.0", + "npm": ">=10" } }, "node_modules/@redocly/respect-core": { - "version": "1.34.11", - "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.11.tgz", - "integrity": "sha512-0USZA1iRkyCZN/o5ZmgJ9vFVfWe5dE6m2IabF4g7s8EWJErbRFc8LoJ20hfoR75yGUfde+0vTPNOG5T9dlqq1g==", - "license": "MIT", - "dependencies": { - "@faker-js/faker": "7.6.0", - "@redocly/ajv": "8.11.2", - "@redocly/openapi-core": "1.34.11", - "better-ajv-errors": "1.2.0", - "colorette": "2.0.20", - "concat-stream": "2.0.0", - "cookie": "0.7.2", - "dotenv": "16.4.7", - "form-data": "4.0.4", - "jest-diff": "29.7.0", - "jest-matcher-utils": "29.7.0", - "js-yaml": "4.1.0", - "json-pointer": "0.6.2", - "jsonpath-plus": "10.3.0", - "open": "10.1.0", - "openapi-sampler": "1.7.0", - "outdent": "0.8.0", - "set-cookie-parser": "2.7.1", - "undici": "6.24.1" + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-2.25.3.tgz", + "integrity": "sha512-07m80JYdp7J7kH4D1Vqdpa2ZBFCv3QAwCoh2w9H3OjuT/rXQkBSkJQm1n70fzO/HuUf4azzULdp2XnsIpxP2qw==", + "license": "MIT", + "dependencies": { + "@faker-js/faker": "^7.6.0", + "@noble/hashes": "^1.8.0", + "@redocly/ajv": "^8.18.0", + "@redocly/openapi-core": "2.25.3", + "ajv": "npm:@redocly/ajv@8.18.0", + "better-ajv-errors": "^1.2.0", + "colorette": "^2.0.20", + "json-pointer": "^0.6.2", + "jsonpath-rfc9535": "1.3.0", + "openapi-sampler": "^1.7.1", + "outdent": "^0.8.0", + "picomatch": "^4.0.4" }, "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" + "node": ">=22.12.0 || >=20.19.0 <21.0.0", + "npm": ">=10" } }, "node_modules/@redocly/respect-core/node_modules/colorette": { @@ -610,35 +571,6 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "license": "MIT" }, - "node_modules/@redocly/respect-core/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==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@redocly/respect-core/node_modules/openapi-sampler": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.7.0.tgz", - "integrity": "sha512-fWq32F5vqGpgRJYIarC/9Y1wC9tKnRDcCOjsDJ7MIcSv2HsE7kNifcXIZ8FVtNStBUWxYrEk/MKqVF0SwZ5gog==", - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.7", - "fast-xml-parser": "^5.3.4", - "json-pointer": "0.6.2" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.10", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", - "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", - "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", @@ -646,9 +578,10 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.4.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.4.0.tgz", - "integrity": "sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", + "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", + "license": "MIT", "dependencies": { "undici-types": "~7.18.0" } @@ -687,16 +620,17 @@ "version": "7.1.4", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", "engines": { "node": ">= 14" } }, "node_modules/ajv": { + "name": "@redocly/ajv", "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", - "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-F+LMD2IDIXuHxgpLJh3nkLj9+tSaEzoUWd+7fONGq5pe2169FUDjpEkOfEpoGLz1sbZni/69p07OsecNfAOpqA==", "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -708,6 +642,23 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -729,19 +680,6 @@ "node": ">=4" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -763,12 +701,6 @@ "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", "dev": true }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -863,74 +795,17 @@ "node": ">=8" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "license": "MIT" - }, - "node_modules/bundle-name": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", - "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", - "license": "MIT", - "dependencies": { - "run-applescript": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", @@ -960,33 +835,6 @@ "node": ">=4" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", @@ -1034,37 +882,11 @@ "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "license": "MIT" }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", - "engines": [ - "node >= 6.0" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - } + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "node_modules/cookie": { "version": "0.7.2", @@ -1076,10 +898,11 @@ } }, "node_modules/core-js": { - "version": "3.48.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.48.0.tgz", - "integrity": "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz", + "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==", "hasInstallScript": true, + "license": "MIT", "peer": true, "funding": { "type": "opencollective", @@ -1142,55 +965,6 @@ "resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz", "integrity": "sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==" }, - "node_modules/default-browser": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", - "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==", - "license": "MIT", - "dependencies": { - "bundle-name": "^4.1.0", - "default-browser-id": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", - "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/dezalgo": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", @@ -1201,22 +975,11 @@ "wrappy": "1" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/dompurify": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.2.tgz", - "integrity": "sha512-6obghkliLdmKa56xdbLOpUZ43pAR6xFy1uOrxBaIDjT+yaRuuybLjGS9eVBoSR/UPU5fq3OXClEHLJNGvbxKpQ==", - "engines": { - "node": ">=20" - }, + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.3.tgz", + "integrity": "sha512-Oj6pzI2+RqBfFG+qOaOLbFXLQ90ARpcGG6UePL82bJLtdsa6CYJD7nmiU8MW9nQNOtCHV3lZ/Bzq1X0QYbBZCA==", + "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" } @@ -1233,71 +996,12 @@ "url": "https://dotenvx.com" } }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es6-promise": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", @@ -1331,9 +1035,9 @@ } }, "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", "license": "MIT" }, "node_modules/fast-deep-equal": { @@ -1362,8 +1066,7 @@ "url": "https://opencollective.com/fastify" } ], - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/fast-xml-builder": { "version": "1.1.4", @@ -1400,63 +1103,23 @@ "fxparser": "src/cli/cli.js" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/foreach": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", "license": "MIT" }, - "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "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/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1470,493 +1133,134 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-port-please": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.0.1.tgz", - "integrity": "sha512-R5pcVO8Z1+pVDu8Ml3xaJCEkBiiy1VQN9za0YqH8GIi1nIqD4IzQhzY6dDzMRtdS1lyiGlucRzm8IN8wtLIXng==", - "license": "MIT" - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "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/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "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==", - "license": "MIT" - }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "license": "MIT", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-wsl": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", - "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", - "license": "MIT", - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-diff/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "*" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jest-diff/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/handlebars": { + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" }, "engines": { - "node": ">=7.0.0" + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/jest-diff/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/jest-diff/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/jest-diff/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=8" + "node": ">= 0.4" } }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "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==", + "license": "MIT" }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "agent-base": "^7.1.2", + "debug": "4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 14" } }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/jest-matcher-utils/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "hasown": "^2.0.2" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-matcher-utils/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/jest-matcher-utils/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jest-matcher-utils/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { "node": ">=8" } @@ -1988,15 +1292,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "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==", - "license": "MIT", - "engines": { - "node": ">= 10.16.0" - } - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -2012,28 +1307,33 @@ "foreach": "^2.0.4" } }, + "node_modules/json-schema-to-ts": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.7.2.tgz", + "integrity": "sha512-R1JfqKqbBR4qE8UyBR56Ms30LL62/nlhoz+1UkfI/VE7p54Awu919FZ6ZUPG8zIa3XB65usPJgr1ONVncUGSaQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@types/json-schema": "^7.0.9", + "ts-algebra": "^1.2.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "license": "MIT" }, - "node_modules/jsonpath-plus": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", - "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", - "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" - }, + "node_modules/jsonpath-rfc9535": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-rfc9535/-/jsonpath-rfc9535-1.3.0.tgz", + "integrity": "sha512-3jFHya7oZ45aDxIIdx+/zQARahHXxFSMWBkcBUldfXpLS9VCXDJyTKt35kQfEXLqh0K3Ixw/9xFnvcDStaxh7Q==", + "license": "Apache-2.0", "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, "node_modules/jsonpointer": { @@ -2102,6 +1402,15 @@ "loose-envify": "cli.js" } }, + "node_modules/lru-cache": { + "version": "11.2.7", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz", + "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", @@ -2126,40 +1435,11 @@ "node": ">= 12" } }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/minimatch": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.4.tgz", "integrity": "sha512-twmL+S8+7yIsE9wsqgzU3E8/LumN3M3QELrBZ20OdmQ9jB2JvW5oZtBEmft84k/Gs5CG9mqtWc6Y9vW+JEzGxw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2175,6 +1455,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -2191,18 +1480,19 @@ "version": "6.15.0", "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.15.0.tgz", "integrity": "sha512-UczzB+0nnwGotYSgllfARAqWCJ5e/skuV2K/l+Zyck/H6pJIhLXuBnz+6vn2i211o7DtbE78HQtsYEKICHGI+g==", - "peer": true, + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/mobx" } }, "node_modules/mobx-react": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.1.tgz", - "integrity": "sha512-WJNNm0FB2n0Z0u+jS1QHmmWyV8l2WiAj8V8I/96kbUEN2YbYCoKW+hbbqKKRUBqElu0llxM7nWKehvRIkhBVJw==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.0.tgz", + "integrity": "sha512-dkGWCx+S0/1mfiuFfHRH8D9cplmwhxOV5CkXMp38u6rQGG2Pv3FWYztS0M7ncR6TyPRQKaTG/pnitInoYE9Vrw==", + "license": "MIT", "dependencies": { - "mobx-react-lite": "^4.1.1" + "mobx-react-lite": "^4.1.0" }, "funding": { "type": "opencollective", @@ -2225,6 +1515,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-4.1.1.tgz", "integrity": "sha512-iUxiMpsvNraCKXU+yPotsOncNNmyeS2B5DKL+TL6Tar/xm+wwNJAubJmtRSeAoYawdZqwv8Z/+5nPRHeQxTiXg==", + "license": "MIT", "dependencies": { "use-sync-external-store": "^1.4.0" }, @@ -2339,15 +1630,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-normalize-package-bin": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", @@ -2437,32 +1719,16 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "dependencies": { "wrappy": "1" } }, - "node_modules/open": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", - "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", - "license": "MIT", - "dependencies": { - "default-browser": "^5.2.1", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/openapi-sampler": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.7.2.tgz", "integrity": "sha512-OKytvqB5XIaTgA9xtw8W8UTar+uymW2xPVpFN0NihMtuHPdPTGxBEhGnfFnJW5g/gOSIvkP+H0Xh3XhVI9/n7g==", + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.7", "fast-xml-parser": "^5.5.1", @@ -2528,6 +1794,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -2538,6 +1805,22 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/perfect-scrollbar": { "version": "1.5.6", "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.6.tgz", @@ -2551,12 +1834,12 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -2617,32 +1900,6 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "license": "MIT" }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/prismjs": { "version": "1.30.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", @@ -2658,22 +1915,17 @@ "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "license": "MIT", "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "license": "MIT" + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } }, "node_modules/protobufjs": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -2723,6 +1975,7 @@ "version": "19.2.4", "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2731,6 +1984,7 @@ "version": "19.2.4", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", + "license": "MIT", "dependencies": { "scheduler": "^0.27.0" }, @@ -2739,15 +1993,15 @@ } }, "node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "license": "MIT" }, "node_modules/react-tabs": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-6.1.0.tgz", - "integrity": "sha512-6QtbTRDKM+jA/MZTTefvigNxo0zz+gnBTVFw2CFVvq+f2BuH0nF0vDLNClL045nuTAdOoK/IL1vTP0ZLX0DAyQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-6.1.1.tgz", + "integrity": "sha512-CPiuKoMFf89B7QlbFfdBD9XmUWiE3qudQputMVZB8GQvPJZRX/gqjDaDWOPDwGinEfpJKEuBCkGt83Tt4efeyA==", "license": "MIT", "dependencies": { "clsx": "^2.0.0", @@ -2813,22 +2067,10 @@ "once": "^1.3.0" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/redoc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.0.tgz", - "integrity": "sha512-NpYsOZ1PD9qFdjbLVBZJWptqE+4Y6TkUuvEOqPUmoH7AKOmPcE+hYjotLxQNTqVoWL4z0T2uxILmcc8JGDci+Q==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.1.tgz", + "integrity": "sha512-LmqA+4A3CmhTllGG197F0arUpmChukAj9klfSdxNRemT9Hr07xXr7OGKu4PHzBs359sgrJ+4JwmOlM7nxLPGMg==", "license": "MIT", "dependencies": { "@redocly/openapi-core": "^1.4.0", @@ -2840,7 +2082,7 @@ "lunr": "^2.3.9", "mark.js": "^8.11.1", "marked": "^4.3.0", - "mobx-react": "^9.1.1", + "mobx-react": "9.2.0", "openapi-sampler": "^1.5.0", "path-browserify": "^1.0.1", "perfect-scrollbar": "^1.5.5", @@ -2865,6 +2107,70 @@ "styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5" } }, + "node_modules/redoc/node_modules/@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/redoc/node_modules/@redocly/config": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.0.tgz", + "integrity": "sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==", + "license": "MIT" + }, + "node_modules/redoc/node_modules/@redocly/openapi-core": { + "version": "1.34.11", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.11.tgz", + "integrity": "sha512-V09ayfnb5GyysmvARbt+voFZAjGcf7hSYxOYxSkCc4fbH/DTfq5YWoec8cflvmHHqyIFbqvmGKmYFzqhr9zxDg==", + "license": "MIT", + "dependencies": { + "@redocly/ajv": "8.11.2", + "@redocly/config": "0.22.0", + "colorette": "1.4.0", + "https-proxy-agent": "7.0.6", + "js-levenshtein": "1.1.6", + "js-yaml": "4.1.1", + "minimatch": "5.1.9", + "pluralize": "8.0.0", + "yaml-ast-parser": "0.0.43" + }, + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" + } + }, + "node_modules/redoc/node_modules/brace-expansion": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/redoc/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/reftools": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", @@ -2912,18 +2218,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/run-applescript": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", - "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -2946,7 +2240,8 @@ "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", - "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==" + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" }, "node_modules/semver": { "version": "5.7.2", @@ -2958,9 +2253,9 @@ } }, "node_modules/set-cookie-parser": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", - "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", "license": "MIT" }, "node_modules/shallowequal": { @@ -3285,18 +2580,6 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -3312,18 +2595,18 @@ "node": ">=0.6" } }, + "node_modules/ts-algebra": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-1.2.2.tgz", + "integrity": "sha512-kloPhf1hq3JbCPOTYoOWDKxebWjNb2o/LKnNfkWhxVVisFFmMJPPdJeGoGmM+iRLyoXAR61e08Pb+vUXINg8aA==", + "license": "MIT" + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "license": "MIT" - }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", @@ -3336,10 +2619,19 @@ "node": ">=0.8.0" } }, + "node_modules/ulid": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-3.0.2.tgz", + "integrity": "sha512-yu26mwteFYzBAot7KVMqFGCVpsF6g8wXfJzQUHvu1no3+rRRSFcSV2nKeYvNPLD2J4b08jYBDhHUjeH0ygIl9w==", + "license": "MIT", + "bin": { + "ulid": "dist/cli.js" + } + }, "node_modules/undici": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz", - "integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==", + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.0.tgz", + "integrity": "sha512-lVLNosgqo5EkGqh5XUDhGfsMSoO8K0BAN0TyJLvwNRSl4xWGZlCVYsAIpa/OpA3TvmnM01GWcoKmc3ZWo5wKKA==", "license": "MIT", "engines": { "node": ">=18.17" @@ -3348,7 +2640,8 @@ "node_modules/undici-types": { "version": "7.18.2", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==" + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "license": "MIT" }, "node_modules/uri-js-replace": { "version": "1.0.1", @@ -3366,6 +2659,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", + "license": "MIT", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } @@ -3465,7 +2759,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "node_modules/ws": { "version": "7.5.10", @@ -3556,9 +2851,9 @@ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==" }, "@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==" + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz", + "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==" }, "@emotion/is-prop-valid": { "version": "1.4.0", @@ -3593,166 +2888,125 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", "integrity": "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==" }, - "@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "requires": { - "@sinclair/typebox": "^0.27.8" - } - }, - "@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==", - "requires": {} - }, - "@jsep-plugin/regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", - "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", - "requires": {} + "@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==" }, "@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz", + "integrity": "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==" }, "@opentelemetry/api-logs": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", - "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.202.0.tgz", + "integrity": "sha512-fTBjMqKCfotFWfLzaKyhjLvyEyq5vDKTTFfBmx21btv3gvy8Lq6N5Dh2OzqeuN4DjtpSvNT1uNVfg08eD2Rfxw==", "requires": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": "^1.3.0" } }, "@opentelemetry/context-async-hooks": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.26.0.tgz", - "integrity": "sha512-HedpXXYzzbaoutw6DFLWLDket2FwLkLpil4hGCZ1xYEIMTcivdfwEOISgdbLEWyG3HW52gTq2V9mOVJrONgiwg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz", + "integrity": "sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw==", "requires": {} }, "@opentelemetry/core": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.26.0.tgz", - "integrity": "sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", + "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", "requires": { - "@opentelemetry/semantic-conventions": "1.27.0" + "@opentelemetry/semantic-conventions": "^1.29.0" } }, "@opentelemetry/exporter-trace-otlp-http": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.53.0.tgz", - "integrity": "sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.202.0.tgz", + "integrity": "sha512-/hKE8DaFCJuaQqE1IxpgkcjOolUIwgi3TgHElPVKGdGRBSmJMTmN/cr6vWa55pCJIXPyhKvcMrbrya7DZ3VmzA==", "requires": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-exporter-base": "0.53.0", - "@opentelemetry/otlp-transformer": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.202.0", + "@opentelemetry/otlp-transformer": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" } }, "@opentelemetry/otlp-exporter-base": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.53.0.tgz", - "integrity": "sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.202.0.tgz", + "integrity": "sha512-nMEOzel+pUFYuBJg2znGmHJWbmvMbdX5/RhoKNKowguMbURhz0fwik5tUKplLcUtl8wKPL1y9zPnPxeBn65N0Q==", "requires": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/otlp-transformer": "0.53.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-transformer": "0.202.0" } }, "@opentelemetry/otlp-transformer": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.53.0.tgz", - "integrity": "sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.202.0.tgz", + "integrity": "sha512-5XO77QFzs9WkexvJQL9ksxL8oVFb/dfi9NWQSq7Sv0Efr9x3N+nb1iklP1TeVgxqJ7m1xWiC/Uv3wupiQGevMw==", "requires": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-logs": "0.53.0", - "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-logs": "0.202.0", + "@opentelemetry/sdk-metrics": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1", "protobufjs": "^7.3.0" } }, - "@opentelemetry/propagator-b3": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.26.0.tgz", - "integrity": "sha512-vvVkQLQ/lGGyEy9GT8uFnI047pajSOVnZI2poJqVGD3nJ+B9sFGdlHNnQKophE3lHfnIH0pw2ubrCTjZCgIj+Q==", - "requires": { - "@opentelemetry/core": "1.26.0" - } - }, - "@opentelemetry/propagator-jaeger": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.26.0.tgz", - "integrity": "sha512-DelFGkCdaxA1C/QA0Xilszfr0t4YbGd3DjxiCDPh34lfnFr+VkkrjV9S8ZTJvAzfdKERXhfOxIKBoGPJwoSz7Q==", - "requires": { - "@opentelemetry/core": "1.26.0" - } - }, "@opentelemetry/resources": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.26.0.tgz", - "integrity": "sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", "requires": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/semantic-conventions": "1.27.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" } }, "@opentelemetry/sdk-logs": { - "version": "0.53.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.53.0.tgz", - "integrity": "sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==", + "version": "0.202.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.202.0.tgz", + "integrity": "sha512-pv8QiQLQzk4X909YKm0lnW4hpuQg4zHwJ4XBd5bZiXcd9urvrJNoNVKnxGHPiDVX/GiLFvr5DMYsDBQbZCypRQ==", "requires": { - "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/api-logs": "0.202.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" } }, "@opentelemetry/sdk-metrics": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.26.0.tgz", - "integrity": "sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", + "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", "requires": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" } }, "@opentelemetry/sdk-trace-base": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.26.0.tgz", - "integrity": "sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", + "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", "requires": { - "@opentelemetry/core": "1.26.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/semantic-conventions": "1.27.0" + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" } }, "@opentelemetry/sdk-trace-node": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.26.0.tgz", - "integrity": "sha512-Fj5IVKrj0yeUwlewCRwzOVcr5avTuNnMHWf7GPc1t6WaT78J6CJyF3saZ/0RkZfdeNO8IcBl/bNcWMVZBMRW8Q==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.0.1.tgz", + "integrity": "sha512-UhdbPF19pMpBtCWYP5lHbTogLWx9N0EBxtdagvkn5YtsAnCBZzL7SjktG+ZmupRgifsHMjwUaCCaVmqGfSADmA==", "requires": { - "@opentelemetry/context-async-hooks": "1.26.0", - "@opentelemetry/core": "1.26.0", - "@opentelemetry/propagator-b3": "1.26.0", - "@opentelemetry/propagator-jaeger": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", - "semver": "^7.5.2" - }, - "dependencies": { - "semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==" - } + "@opentelemetry/context-async-hooks": "2.0.1", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" } }, "@opentelemetry/semantic-conventions": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", - "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==" + "version": "1.34.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.34.0.tgz", + "integrity": "sha512-aKcOkyrorBGlajjRdVoJWHTxfxO1vCNHLJVlSDaRHDIdjU+pX8IYQPvPDkYiujKLbRnWU+1TBwEt0QRgSm4SGA==" }, "@protobufjs/aspromise": { "version": "1.1.2", @@ -3809,58 +3063,82 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "@redocly/ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.18.1.tgz", + "integrity": "sha512-Ifm/pP/tul1qmAecpbVxCBluVE32rKfjf8gYXH4xI2gCv9mRWFhJMHzkPDM4TXlxwPQYIFegymlsy8lXz7optA==", "requires": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js-replace": "^1.0.1" + "require-from-string": "^2.0.2" } }, "@redocly/cli": { - "version": "1.34.11", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.11.tgz", - "integrity": "sha512-NTFegt2uQ0A4xewDPcTadsZYSlmEUzF7wnvRgmFI8Ftvjpq/coIdr9EQPmCF6wjrh9UBKdz2rMNckxLo/jhViA==", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-2.25.3.tgz", + "integrity": "sha512-02wjApwJwGD+kGWRoiFVY0Hq960ydMAMHrK3AJH2LMiYNYcrzAr1FSbA3OSylvg2gx3w/r1r710B+iMz3KJKbw==", "requires": { - "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", - "@opentelemetry/sdk-trace-node": "1.26.0", - "@opentelemetry/semantic-conventions": "1.27.0", - "@redocly/config": "0.22.0", - "@redocly/openapi-core": "1.34.11", - "@redocly/respect-core": "1.34.11", - "abort-controller": "3.0.0", - "chokidar": "3.5.3", - "colorette": "1.4.0", - "core-js": "3.32.1", + "@opentelemetry/exporter-trace-otlp-http": "0.202.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-node": "2.0.1", + "@opentelemetry/semantic-conventions": "1.34.0", + "@redocly/cli-otel": "0.1.2", + "@redocly/openapi-core": "2.25.3", + "@redocly/respect-core": "2.25.3", + "abort-controller": "^3.0.0", + "ajv": "npm:@redocly/ajv@8.18.0", + "ajv-formats": "^3.0.1", + "colorette": "^1.2.0", + "cookie": "^0.7.2", "dotenv": "16.4.7", - "form-data": "4.0.4", - "get-port-please": "3.0.1", - "glob": "7.2.3", - "handlebars": "4.7.8", - "mobx": "6.12.3", - "pluralize": "8.0.0", + "glob": "^13.0.5", + "handlebars": "^4.7.9", + "https-proxy-agent": "^7.0.5", + "mobx": "^6.0.4", + "picomatch": "^4.0.4", + "pluralize": "^8.0.0", "react": "^17.0.0 || ^18.2.0 || ^19.2.1", "react-dom": "^17.0.0 || ^18.2.0 || ^19.2.1", - "redoc": "2.5.0", - "semver": "7.7.4", - "simple-websocket": "9.1.0", + "redoc": "2.5.1", + "semver": "^7.5.2", + "set-cookie-parser": "^2.3.5", + "simple-websocket": "^9.0.0", "styled-components": "6.3.9", + "ulid": "^3.0.1", + "undici": "6.24.0", "yargs": "17.0.1" }, "dependencies": { - "core-js": { - "version": "3.32.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.1.tgz", - "integrity": "sha512-lqufgNn9NLnESg5mQeYsxQP5w7wrViSj0jr/kv6ECQiByzQkrn1MKvV0L3acttpDqfQrHLwr2KCMgX5b8X+lyQ==" + "balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==" + }, + "brace-expansion": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "requires": { + "balanced-match": "^4.0.2" + } + }, + "glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "requires": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + } }, - "mobx": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.12.3.tgz", - "integrity": "sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw==" + "minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "requires": { + "brace-expansion": "^5.0.2" + } }, "semver": { "version": "7.7.4", @@ -3869,110 +3147,81 @@ } } }, + "@redocly/cli-otel": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@redocly/cli-otel/-/cli-otel-0.1.2.tgz", + "integrity": "sha512-Bg7BoO5t1x3lVK+KhA5aGPmeXpQmdf6WtTYHhelKJCsQ+tRMiJoFAQoKHoBHAoNxXrhlS3K9lKFLHGmtxsFQfA==", + "requires": { + "ulid": "^2.3.0" + }, + "dependencies": { + "ulid": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-2.4.0.tgz", + "integrity": "sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg==" + } + } + }, "@redocly/config": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.0.tgz", - "integrity": "sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==" + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.45.0.tgz", + "integrity": "sha512-V+wNusPQUaYV1c5s9iptfKQ2Ggno4bMeiyXdNILxqZS87gttwPfqlqHKHKFyz006voS3JsR295cbpx3GlsIxKg==", + "requires": { + "json-schema-to-ts": "2.7.2" + } }, "@redocly/openapi-core": { - "version": "1.34.11", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.11.tgz", - "integrity": "sha512-V09ayfnb5GyysmvARbt+voFZAjGcf7hSYxOYxSkCc4fbH/DTfq5YWoec8cflvmHHqyIFbqvmGKmYFzqhr9zxDg==", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-2.25.3.tgz", + "integrity": "sha512-GIu3Mdym5IDIPCvXTzMZ6TQw/+7sKd52PdysxNVe7zBk22ExSGnVE9UAk9BaLOzXT77PJWDUwaimBdJoPpxHMA==", "requires": { - "@redocly/ajv": "8.11.2", - "@redocly/config": "0.22.0", - "colorette": "1.4.0", - "https-proxy-agent": "7.0.6", - "js-levenshtein": "1.1.6", - "js-yaml": "4.1.1", - "minimatch": "5.1.9", - "pluralize": "8.0.0", + "@redocly/ajv": "^8.18.0", + "@redocly/config": "^0.45.0", + "ajv": "npm:@redocly/ajv@8.18.0", + "ajv-formats": "^3.0.1", + "colorette": "^1.2.0", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "picomatch": "^4.0.4", + "pluralize": "^8.0.0", "yaml-ast-parser": "0.0.43" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", - "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", - "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", - "requires": { - "brace-expansion": "^2.0.1" - } - } } }, "@redocly/respect-core": { - "version": "1.34.11", - "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.11.tgz", - "integrity": "sha512-0USZA1iRkyCZN/o5ZmgJ9vFVfWe5dE6m2IabF4g7s8EWJErbRFc8LoJ20hfoR75yGUfde+0vTPNOG5T9dlqq1g==", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-2.25.3.tgz", + "integrity": "sha512-07m80JYdp7J7kH4D1Vqdpa2ZBFCv3QAwCoh2w9H3OjuT/rXQkBSkJQm1n70fzO/HuUf4azzULdp2XnsIpxP2qw==", "requires": { - "@faker-js/faker": "7.6.0", - "@redocly/ajv": "8.11.2", - "@redocly/openapi-core": "1.34.11", - "better-ajv-errors": "1.2.0", - "colorette": "2.0.20", - "concat-stream": "2.0.0", - "cookie": "0.7.2", - "dotenv": "16.4.7", - "form-data": "4.0.4", - "jest-diff": "29.7.0", - "jest-matcher-utils": "29.7.0", - "js-yaml": "4.1.0", - "json-pointer": "0.6.2", - "jsonpath-plus": "10.3.0", - "open": "10.1.0", - "openapi-sampler": "1.7.0", - "outdent": "0.8.0", - "set-cookie-parser": "2.7.1", - "undici": "6.24.1" + "@faker-js/faker": "^7.6.0", + "@noble/hashes": "^1.8.0", + "@redocly/ajv": "^8.18.0", + "@redocly/openapi-core": "2.25.3", + "ajv": "npm:@redocly/ajv@8.18.0", + "better-ajv-errors": "^1.2.0", + "colorette": "^2.0.20", + "json-pointer": "^0.6.2", + "jsonpath-rfc9535": "1.3.0", + "openapi-sampler": "^1.7.1", + "outdent": "^0.8.0", + "picomatch": "^4.0.4" }, "dependencies": { "colorette": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "openapi-sampler": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.7.0.tgz", - "integrity": "sha512-fWq32F5vqGpgRJYIarC/9Y1wC9tKnRDcCOjsDJ7MIcSv2HsE7kNifcXIZ8FVtNStBUWxYrEk/MKqVF0SwZ5gog==", - "requires": { - "@types/json-schema": "^7.0.7", - "fast-xml-parser": "^5.3.4", - "json-pointer": "0.6.2" - } } } }, - "@sinclair/typebox": { - "version": "0.27.10", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", - "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==" - }, "@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==" }, "@types/node": { - "version": "25.4.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.4.0.tgz", - "integrity": "sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw==", + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", + "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", "requires": { "undici-types": "~7.18.0" } @@ -4008,10 +3257,9 @@ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==" }, "ajv": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", - "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", - "peer": true, + "version": "npm:@redocly/ajv@8.18.0", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-F+LMD2IDIXuHxgpLJh3nkLj9+tSaEzoUWd+7fONGq5pe2169FUDjpEkOfEpoGLz1sbZni/69p07OsecNfAOpqA==", "requires": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -4019,6 +3267,14 @@ "require-from-string": "^2.0.2" } }, + "ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "requires": { + "ajv": "^8.0.0" + } + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -4033,15 +3289,6 @@ "color-convert": "^1.9.0" } }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -4059,11 +3306,6 @@ "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", "dev": true }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -4126,50 +3368,16 @@ } } }, - "binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==" - }, "brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "requires": { - "fill-range": "^7.1.1" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "bundle-name": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", - "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", - "requires": { - "run-applescript": "^7.0.0" - } - }, - "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==", - "requires": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - } - }, "call-me-maybe": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", @@ -4191,21 +3399,6 @@ "supports-color": "^5.3.0" } }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, "classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", @@ -4246,29 +3439,11 @@ "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - } + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "cookie": { "version": "0.7.2", @@ -4276,9 +3451,9 @@ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==" }, "core-js": { - "version": "3.48.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.48.0.tgz", - "integrity": "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz", + "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==", "peer": true }, "css-color-keywords": { @@ -4317,32 +3492,8 @@ }, "decko": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz", - "integrity": "sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==" - }, - "default-browser": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz", - "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==", - "requires": { - "bundle-name": "^4.1.0", - "default-browser-id": "^5.0.0" - } - }, - "default-browser-id": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", - "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==" - }, - "define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + "resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz", + "integrity": "sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==" }, "dezalgo": { "version": "1.0.4", @@ -4354,15 +3505,10 @@ "wrappy": "1" } }, - "diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==" - }, "dompurify": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.2.tgz", - "integrity": "sha512-6obghkliLdmKa56xdbLOpUZ43pAR6xFy1uOrxBaIDjT+yaRuuybLjGS9eVBoSR/UPU5fq3OXClEHLJNGvbxKpQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.3.tgz", + "integrity": "sha512-Oj6pzI2+RqBfFG+qOaOLbFXLQ90ARpcGG6UePL82bJLtdsa6CYJD7nmiU8MW9nQNOtCHV3lZ/Bzq1X0QYbBZCA==", "requires": { "@types/trusted-types": "^2.0.7" } @@ -4372,50 +3518,11 @@ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==" }, - "dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "requires": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - } - }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" - }, - "es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" - }, - "es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "requires": { - "es-errors": "^1.3.0" - } - }, - "es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "requires": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - } - }, "es6-promise": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", @@ -4438,9 +3545,9 @@ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" }, "eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==" }, "fast-deep-equal": { "version": "3.1.3", @@ -4455,8 +3562,7 @@ "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==", - "peer": true + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==" }, "fast-xml-builder": { "version": "1.1.4", @@ -4476,87 +3582,33 @@ "strnum": "^2.2.2" } }, - "fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, "foreach": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==" }, - "form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "optional": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, - "get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "requires": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - } - }, - "get-port-please": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.0.1.tgz", - "integrity": "sha512-R5pcVO8Z1+pVDu8Ml3xaJCEkBiiy1VQN9za0YqH8GIi1nIqD4IzQhzY6dDzMRtdS1lyiGlucRzm8IN8wtLIXng==" - }, - "get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "requires": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - } - }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4566,19 +3618,6 @@ "path-is-absolute": "^1.0.0" } }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" - }, "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -4586,9 +3625,9 @@ "dev": true }, "handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "requires": { "minimist": "^1.2.5", "neo-async": "^2.6.2", @@ -4603,23 +3642,11 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" - }, - "has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "requires": { - "has-symbols": "^1.0.3" - } - }, "hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, "requires": { "function-bind": "^1.1.2" } @@ -4648,6 +3675,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -4658,14 +3686,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, "is-core-module": { "version": "2.16.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", @@ -4675,167 +3695,11 @@ "hasown": "^2.0.2" } }, - "is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "requires": { - "is-docker": "^3.0.0" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "is-wsl": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", - "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", - "requires": { - "is-inside-container": "^1.0.0" - } - }, - "jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==" - }, - "jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -4854,11 +3718,6 @@ "argparse": "^2.0.1" } }, - "jsep": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", - "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==" - }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -4873,20 +3732,25 @@ "foreach": "^2.0.4" } }, + "json-schema-to-ts": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.7.2.tgz", + "integrity": "sha512-R1JfqKqbBR4qE8UyBR56Ms30LL62/nlhoz+1UkfI/VE7p54Awu919FZ6ZUPG8zIa3XB65usPJgr1ONVncUGSaQ==", + "requires": { + "@babel/runtime": "^7.18.3", + "@types/json-schema": "^7.0.9", + "ts-algebra": "^1.2.0" + } + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "jsonpath-plus": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", - "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", - "requires": { - "@jsep-plugin/assignment": "^1.3.0", - "@jsep-plugin/regex": "^1.0.4", - "jsep": "^1.4.0" - } + "jsonpath-rfc9535": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-rfc9535/-/jsonpath-rfc9535-1.3.0.tgz", + "integrity": "sha512-3jFHya7oZ45aDxIIdx+/zQARahHXxFSMWBkcBUldfXpLS9VCXDJyTKt35kQfEXLqh0K3Ixw/9xFnvcDStaxh7Q==" }, "jsonpointer": { "version": "5.0.1", @@ -4940,6 +3804,11 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lru-cache": { + "version": "11.2.7", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz", + "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==" + }, "lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", @@ -4955,28 +3824,11 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==" }, - "math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, "minimatch": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.4.tgz", "integrity": "sha512-twmL+S8+7yIsE9wsqgzU3E8/LumN3M3QELrBZ20OdmQ9jB2JvW5oZtBEmft84k/Gs5CG9mqtWc6Y9vW+JEzGxw==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4986,6 +3838,11 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" }, + "minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==" + }, "mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -4998,15 +3855,14 @@ "mobx": { "version": "6.15.0", "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.15.0.tgz", - "integrity": "sha512-UczzB+0nnwGotYSgllfARAqWCJ5e/skuV2K/l+Zyck/H6pJIhLXuBnz+6vn2i211o7DtbE78HQtsYEKICHGI+g==", - "peer": true + "integrity": "sha512-UczzB+0nnwGotYSgllfARAqWCJ5e/skuV2K/l+Zyck/H6pJIhLXuBnz+6vn2i211o7DtbE78HQtsYEKICHGI+g==" }, "mobx-react": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.1.tgz", - "integrity": "sha512-WJNNm0FB2n0Z0u+jS1QHmmWyV8l2WiAj8V8I/96kbUEN2YbYCoKW+hbbqKKRUBqElu0llxM7nWKehvRIkhBVJw==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.0.tgz", + "integrity": "sha512-dkGWCx+S0/1mfiuFfHRH8D9cplmwhxOV5CkXMp38u6rQGG2Pv3FWYztS0M7ncR6TyPRQKaTG/pnitInoYE9Vrw==", "requires": { - "mobx-react-lite": "^4.1.1" + "mobx-react-lite": "^4.1.0" } }, "mobx-react-lite": { @@ -5078,11 +3934,6 @@ "validate-npm-package-license": "^3.0.1" } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, "npm-normalize-package-bin": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", @@ -5148,21 +3999,11 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } }, - "open": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", - "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", - "requires": { - "default-browser": "^5.2.1", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" - } - }, "openapi-sampler": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.7.2.tgz", @@ -5213,7 +4054,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-parse": { "version": "1.0.7", @@ -5221,6 +4063,15 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "requires": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + } + }, "perfect-scrollbar": { "version": "1.5.6", "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.6.tgz", @@ -5232,9 +4083,9 @@ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==" }, "pluralize": { "version": "8.0.0", @@ -5264,23 +4115,6 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, - "pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "requires": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" - } - } - }, "prismjs": { "version": "1.30.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", @@ -5294,13 +4128,6 @@ "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" - }, - "dependencies": { - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - } } }, "protobufjs": { @@ -5349,14 +4176,14 @@ } }, "react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "react-tabs": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-6.1.0.tgz", - "integrity": "sha512-6QtbTRDKM+jA/MZTTefvigNxo0zz+gnBTVFw2CFVvq+f2BuH0nF0vDLNClL045nuTAdOoK/IL1vTP0ZLX0DAyQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-6.1.1.tgz", + "integrity": "sha512-CPiuKoMFf89B7QlbFfdBD9XmUWiE3qudQputMVZB8GQvPJZRX/gqjDaDWOPDwGinEfpJKEuBCkGt83Tt4efeyA==", "requires": { "clsx": "^2.0.0", "prop-types": "^15.5.0" @@ -5411,18 +4238,10 @@ "once": "^1.3.0" } }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, "redoc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.0.tgz", - "integrity": "sha512-NpYsOZ1PD9qFdjbLVBZJWptqE+4Y6TkUuvEOqPUmoH7AKOmPcE+hYjotLxQNTqVoWL4z0T2uxILmcc8JGDci+Q==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.1.tgz", + "integrity": "sha512-LmqA+4A3CmhTllGG197F0arUpmChukAj9klfSdxNRemT9Hr07xXr7OGKu4PHzBs359sgrJ+4JwmOlM7nxLPGMg==", "requires": { "@redocly/openapi-core": "^1.4.0", "classnames": "^2.3.2", @@ -5433,7 +4252,7 @@ "lunr": "^2.3.9", "mark.js": "^8.11.1", "marked": "^4.3.0", - "mobx-react": "^9.1.1", + "mobx-react": "9.2.0", "openapi-sampler": "^1.5.0", "path-browserify": "^1.0.1", "perfect-scrollbar": "^1.5.5", @@ -5445,6 +4264,56 @@ "stickyfill": "^1.1.1", "swagger2openapi": "^7.0.8", "url-template": "^2.0.8" + }, + "dependencies": { + "@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" + } + }, + "@redocly/config": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.0.tgz", + "integrity": "sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==" + }, + "@redocly/openapi-core": { + "version": "1.34.11", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.11.tgz", + "integrity": "sha512-V09ayfnb5GyysmvARbt+voFZAjGcf7hSYxOYxSkCc4fbH/DTfq5YWoec8cflvmHHqyIFbqvmGKmYFzqhr9zxDg==", + "requires": { + "@redocly/ajv": "8.11.2", + "@redocly/config": "0.22.0", + "colorette": "1.4.0", + "https-proxy-agent": "7.0.6", + "js-levenshtein": "1.1.6", + "js-yaml": "4.1.1", + "minimatch": "5.1.9", + "pluralize": "8.0.0", + "yaml-ast-parser": "0.0.43" + } + }, + "brace-expansion": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "reftools": { @@ -5473,11 +4342,6 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, - "run-applescript": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", - "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==" - }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -5495,9 +4359,9 @@ "dev": true }, "set-cookie-parser": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", - "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==" + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==" }, "shallowequal": { "version": "1.1.0", @@ -5735,14 +4599,6 @@ "yargs": "^17.0.1" } }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -5754,26 +4610,31 @@ "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", "dev": true }, + "ts-algebra": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-1.2.2.tgz", + "integrity": "sha512-kloPhf1hq3JbCPOTYoOWDKxebWjNb2o/LKnNfkWhxVVisFFmMJPPdJeGoGmM+iRLyoXAR61e08Pb+vUXINg8aA==" + }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" - }, "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==", "optional": true }, + "ulid": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-3.0.2.tgz", + "integrity": "sha512-yu26mwteFYzBAot7KVMqFGCVpsF6g8wXfJzQUHvu1no3+rRRSFcSV2nKeYvNPLD2J4b08jYBDhHUjeH0ygIl9w==" + }, "undici": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz", - "integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==" + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.0.tgz", + "integrity": "sha512-lVLNosgqo5EkGqh5XUDhGfsMSoO8K0BAN0TyJLvwNRSl4xWGZlCVYsAIpa/OpA3TvmnM01GWcoKmc3ZWo5wKKA==" }, "undici-types": { "version": "7.18.2", @@ -5872,7 +4733,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "ws": { "version": "7.5.10", diff --git a/package.json b/package.json index 3a48d7285..d2ad63ee1 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,13 @@ "license": "MIT", "homepage": "https://github.com/NHSDigital/e-referrals-service-api", "dependencies": { - "@redocly/cli": "^1.34.5" + "@redocly/cli": "^2.25.3" }, "devDependencies": { "license-checker": "^25.0.1", "minimist": "^1.2.8" + }, + "overrides": { + "handlebars": "^4.7.9" } } diff --git a/redocly.yaml b/redocly.yaml index fa3880bd9..1af24940b 100644 --- a/redocly.yaml +++ b/redocly.yaml @@ -3,5 +3,4 @@ extends: rules: no-invalid-media-type-examples: severity: off - info-license-url: off tag-description: off diff --git a/specification/components/stu3/schemas/endpoints/a020-upload-file-to-document-store.yaml b/specification/components/stu3/schemas/endpoints/a020-upload-file-to-document-store.yaml index 3cf29ec4a..73603531f 100644 --- a/specification/components/stu3/schemas/endpoints/a020-upload-file-to-document-store.yaml +++ b/specification/components/stu3/schemas/endpoints/a020-upload-file-to-document-store.yaml @@ -81,7 +81,49 @@ parameters: requestBody: required: true content: - $ref: '../file/FileContentTypeSchemaUpload.yaml' + text/plain: + schema: + $ref: '../file/StringBinarySchema.yaml' + example: 'This is some example text.' + application/pdf: + schema: + $ref: '../file/StringBinarySchema.yaml' + text/xml: + schema: + $ref: '../file/StringBinarySchema.yaml' + text/rtf: + schema: + $ref: '../file/StringBinarySchema.yaml' + audio/basic: + schema: + $ref: '../file/StringBinarySchema.yaml' + audio/mpeg: + schema: + $ref: '../file/StringBinarySchema.yaml' + image/png: + schema: + $ref: '../file/StringBinarySchema.yaml' + image/gif: + schema: + $ref: '../file/StringBinarySchema.yaml' + image/jpeg: + schema: + $ref: '../file/StringBinarySchema.yaml' + image/tiff: + schema: + $ref: '../file/StringBinarySchema.yaml' + video/mpeg: + schema: + $ref: '../file/StringBinarySchema.yaml' + application/msword: + schema: + $ref: '../file/StringBinarySchema.yaml' + application/vnd.openxmlformats-officedocument.wordprocessingml.document: + schema: + $ref: '../file/StringBinarySchema.yaml' + application/dicom: + schema: + $ref: '../file/StringBinarySchema.yaml' responses: '201': $ref: '../responses/uploadFileToDocumentStore/201Response.yaml' diff --git a/specification/components/stu3/schemas/file/FileContentTypeSchemaDownload.yaml b/specification/components/stu3/schemas/file/FileContentTypeSchemaDownload.yaml deleted file mode 100644 index 7e7890b39..000000000 --- a/specification/components/stu3/schemas/file/FileContentTypeSchemaDownload.yaml +++ /dev/null @@ -1,46 +0,0 @@ -text/plain: - schema: - $ref: 'StringBinarySchema.yaml' - example: 'This is some example text.' -text/html: - schema: - $ref: 'StringBinarySchema.yaml' -application/pdf: - schema: - $ref: 'StringBinarySchema.yaml' -text/xml: - schema: - $ref: 'StringBinarySchema.yaml' -text/rtf: - schema: - $ref: 'StringBinarySchema.yaml' -audio/basic: - schema: - $ref: 'StringBinarySchema.yaml' -audio/mpeg: - schema: - $ref: 'StringBinarySchema.yaml' -image/png: - schema: - $ref: 'StringBinarySchema.yaml' -image/gif: - schema: - $ref: 'StringBinarySchema.yaml' -image/jpeg: - schema: - $ref: 'StringBinarySchema.yaml' -image/tiff: - schema: - $ref: 'StringBinarySchema.yaml' -video/mpeg: - schema: - $ref: 'StringBinarySchema.yaml' -application/msword: - schema: - $ref: 'StringBinarySchema.yaml' -application/vnd.openxmlformats-officedocument.wordprocessingml.document: - schema: - $ref: 'StringBinarySchema.yaml' -application/dicom: - schema: - $ref: 'StringBinarySchema.yaml' diff --git a/specification/components/stu3/schemas/file/FileContentTypeSchemaUpload.yaml b/specification/components/stu3/schemas/file/FileContentTypeSchemaUpload.yaml deleted file mode 100644 index ae314062a..000000000 --- a/specification/components/stu3/schemas/file/FileContentTypeSchemaUpload.yaml +++ /dev/null @@ -1,43 +0,0 @@ -text/plain: - schema: - $ref: 'StringBinarySchema.yaml' - example: 'This is some example text.' -application/pdf: - schema: - $ref: 'StringBinarySchema.yaml' -text/xml: - schema: - $ref: 'StringBinarySchema.yaml' -text/rtf: - schema: - $ref: 'StringBinarySchema.yaml' -audio/basic: - schema: - $ref: 'StringBinarySchema.yaml' -audio/mpeg: - schema: - $ref: 'StringBinarySchema.yaml' -image/png: - schema: - $ref: 'StringBinarySchema.yaml' -image/gif: - schema: - $ref: 'StringBinarySchema.yaml' -image/jpeg: - schema: - $ref: 'StringBinarySchema.yaml' -image/tiff: - schema: - $ref: 'StringBinarySchema.yaml' -video/mpeg: - schema: - $ref: 'StringBinarySchema.yaml' -application/msword: - schema: - $ref: 'StringBinarySchema.yaml' -application/vnd.openxmlformats-officedocument.wordprocessingml.document: - schema: - $ref: 'StringBinarySchema.yaml' -application/dicom: - schema: - $ref: 'StringBinarySchema.yaml' diff --git a/specification/components/stu3/schemas/responses/retrieveAttachment/200Response.yaml b/specification/components/stu3/schemas/responses/retrieveAttachment/200Response.yaml index 76c242c6e..38ed4aa1b 100644 --- a/specification/components/stu3/schemas/responses/retrieveAttachment/200Response.yaml +++ b/specification/components/stu3/schemas/responses/retrieveAttachment/200Response.yaml @@ -11,4 +11,49 @@ headers: Content-Type: $ref: '../../headers/response/ContentTypeAttachmentsDownload.yaml' content: - $ref: '../../file/FileContentTypeSchemaDownload.yaml' + text/plain: + schema: + $ref: '../../file/StringBinarySchema.yaml' + example: 'This is some example text.' + text/html: + schema: + $ref: '../../file/StringBinarySchema.yaml' + application/pdf: + schema: + $ref: '../../file/StringBinarySchema.yaml' + text/xml: + schema: + $ref: '../../file/StringBinarySchema.yaml' + text/rtf: + schema: + $ref: '../../file/StringBinarySchema.yaml' + audio/basic: + schema: + $ref: '../../file/StringBinarySchema.yaml' + audio/mpeg: + schema: + $ref: '../../file/StringBinarySchema.yaml' + image/png: + schema: + $ref: '../../file/StringBinarySchema.yaml' + image/gif: + schema: + $ref: '../../file/StringBinarySchema.yaml' + image/jpeg: + schema: + $ref: '../../file/StringBinarySchema.yaml' + image/tiff: + schema: + $ref: '../../file/StringBinarySchema.yaml' + video/mpeg: + schema: + $ref: '../../file/StringBinarySchema.yaml' + application/msword: + schema: + $ref: '../../file/StringBinarySchema.yaml' + application/vnd.openxmlformats-officedocument.wordprocessingml.document: + schema: + $ref: '../../file/StringBinarySchema.yaml' + application/dicom: + schema: + $ref: '../../file/StringBinarySchema.yaml' diff --git a/test-output.json b/test-output.json new file mode 100644 index 000000000..296c6b43e --- /dev/null +++ b/test-output.json @@ -0,0 +1,100528 @@ +[1] redocly.yaml:6:3 at #/rules/info-license-url + +Property `info-license-url` is not expected here. + +4 | no-invalid-media-type-examples: +5 | severity: off +6 | info-license-url: off + | ^^^^^^^^^^^^^^^^ +7 | tag-description: off +8 | + +Warning was generated by the configuration struct rule. + + +{ + "openapi": "3.0.0", + "info": { + "version": "0.0.1", + "title": "e-Referrals Service", + "description": "## Overview\nUse this API to create paperless referrals from primary to secondary care with the [e-Referral Service (e-RS)](https://digital.nhs.uk/services/e-referral-service).\n\nFor an overview of how you can plan and prepare for your integration with e-RS, see our [API onboarding guide](https://digital.nhs.uk/services/e-referral-service/api).\n\n**As a primary care referrer, you can:**\n\n -\tcreate a new e-referral\n - search for relevant patient services to create a shortlist\n -\taccess existing e-referrals\n -\tcreate a triage request for the Referral Assessment Service (RAS)\n -\tupload and manage a patient letter or attachments, linking them to a referral\n -\tretrieve appointment slots and book appointments\n -\tdefer a booking to a provider if an appointment slot is unavailable\n - create a new advice and guidance request\n\n**As a secondary care provider, you can:**\n\n -\taccess referrals as a worklist\n -\tretrieve non-clinical information (meta-data) about the referral\n -\tretrieve attachments which are linked to a referral or triage (RAS) request\n -\tretrieve clinical information which has been provided by a referrer\n -\taccept or reject a referral request\n -\tretrieve Advice & Guidance (A&G) conversations and send responses\n -\tconvert Advice & Guidance (A&G) conversations into a referral\n - cancel a referral\n\n**You cannot use this API to:**\n\n -\tget patient details - instead, use the [[HYPERLINK_PDS]]\n\n**You can access the following data:**\n\n -\treferral attachments\n -\treferral letters\n -\tappointment slots\n -\tworklists for referral requests\n -\tworklists for triage (RAS) requests\n -\tworklists for Advice and Guidance (A&G) requests\n -\tconversation histories for Advice and Guidance (A&G) requests\n\n
\n
\n
\n
\n \n \"\"\n \n
\n
\n
\n
\n

To discover the most common use cases, see our Building Healthcare Software guides.

\n
\n
\n
\n
\n\n### Access modes\n\nThis API has two access modes:\n\n| Access mode | Authentication via | Functions | Availability |\n| ----------------------------- | -------------------------- | ----------------------- | ------------------------------- |\n| Application-restricted,
unattended access | [[HYPERLINK_SIGNED_JWT]] | | [[HYPERLINK_PRODUCTION]] |\n| Healthcare worker,
user-restricted access | [[HYPERLINK_CIS_AUTH_SHORT]] | All Endpoints | [[HYPERLINK_PRODUCTION]] |\n\n##### Application-restricted, unattended access\n\nThis access mode has been introduced to allow a Partner application which has been [registered with us](https://portal.developer.nhs.uk/create-a-developer-account) and [authenticated via signed JWT](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication) to interact with a subset of e-RS FHIR API endpoints in an unattended and read-only fashion.\nApplication-restricted, unattended access should only be used when authenticating a human user (for example via smartcard) is not possible.\n\nWrite operations are currently supported for specific use cases via:\n- [[HYPERLINK_A028]]\n- [[HYPERLINK_A013]]\n- [[HYPERLINK_A036]]\n\nYou will be required to submit your use case for review when using these endpoints via application-restricted, unattended access.\n\n##### Healthcare worker, user-restricted access\n\nThis access mode allows Partner applications to access e-RS FHIR API endpoints by authenticating users with [[HYPERLINK_CIS_AUTH_LONG]].\n\nThis access mode must be used for writing changes (such as Create Referral).\n\n## Who can use this API\n\nYou can use this API if you are a software developer wishing to interact with the e-referrals service (e-RS) data, for use in a professional, clinical setting. \n\nTo use this API you must:\n\n -\thave justification for doing so\n -\t[register with us](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1-design#1-8-register-with-us)\n -\tensure you have a [valid use case](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1-design#1-2-validate-your-use-case) before you go too far with your development\n -\t[assure](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-3-assure) your solution before we grant access to live data\n\n## Related APIs\n\n[HL7 V3 API](https://digital.nhs.uk/developer/api-catalogue/e-referral-service-hl7-v3) - this API allows you to manage appointment slots for a Patient Administration System (PAS). \n\n\n## API status and roadmap\n\n### This API has two access modes:\n - Application-restricted, unattended access\n - Healthcare worker, user-restricted access\n\n### Application-restricted, unattended access\n\nThis access mode is [[HYPERLINK_PRODUCTION]], meaning:\n - we avoid making routine [breaking changes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy#breaking-changes), except in exceptional circumstances\n - if we need to deprecate an endpoint, we will give advance notice on our [board](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/deprecation-notices). Our [sunsetting page](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy) details our deprecation and retirement policy.\n \n### Healthcare worker, user-restricted access\n\nThis access mode is [[HYPERLINK_PRODUCTION]], meaning:\n - we avoid making routine [breaking changes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy#breaking-changes), except in exceptional circumstances\n - if we need to deprecate an endpoint, we will give advance notice on our [board](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/deprecation-notices). Our [sunsetting page](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy) details our deprecation and retirement policy.\n\n### Roadmap\n\nVisit our [roadmap page](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/roadmap) for details of what we are working on.\n\nTo suggest, comment or vote on features for this API, see our [interactive product backlog](https://portal.productboard.com/qhpkcqgctqtk3ujk8jyoajp8/tabs/4-new-requests).\n\n## Service level\nThis API is a gold service, meaning it is operational and supported 24 hours a day, 365 days a year.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\n\nThis API is primarily [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest) \nand based on [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir) global standards for health care data exchange.\n\nThis API supports FHIR STU3 and FHIR R4.\n\n### FHIR STU3\n\nThe e-RS FHIR STU3 API is built against the set of profiles called [CareConnect](https://nhsconnect.github.io/CareConnectAPI/).\n\n### FHIR R4\n\nThe e-RS FHIR R4 API is built alongside the [NHS England FHIR Implementation Guide](https://simplifier.net/guide/nhsdigital), which is built on top of [FHIR UK Core](https://digital.nhs.uk/services/fhir-uk-core). The canonical URLs listed in the schema can be resolved with [https://simplifier.net/resolve](https://simplifier.net/resolve).\n\n## Network access\n\nThis API is available on the internet and, indirectly, on the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network).\n\nTo use this API with NHS smartcards you do need an HSCN connection, although internet-facing alternatives are available.\n\nFor more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n\n## Security and authorisation\n\nThis API has two access modes:\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n### Application-restricted, unattended access\n\nThis access mode is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis), meaning we authenticate the calling application but not the end user.\n\nYou can only use this access mode when authenticating a human user (for example via smartcard) is not possible.\n\nWrite operations are currently only supported by [[HYPERLINK_A028]] for non-clinical use cases. You will be required to submit your use case for review when using this endpoint via application-restricted, unattended access.\n\nTo use this access mode, use the following security pattern:\n- [Application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)\n\n### Healthcare worker, user-restricted access\n\nThis access mode is [user-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis), meaning an end user must be present, authenticated and authorised.\n\nThe end user must be:\n- present\n- a healthcare worker\n- strongly authenticated and authorised by [[HYPERLINK_CIS_AUTH_LONG]]\n\nIn order to successfully authenticate with CIS2, the NHS e-Referral Service requires end users to be authenticated to the following standards:\n - an [Identity Assurance Level (IAL)](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication/guidance-for-developers/detailed-guidance/scopes-and-claims#claims ) of IAL3\n - an [Authenticator Assurance Level (AAL)](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication/guidance-for-developers/detailed-guidance/acr-values#authentication-methods) of AAL2 or AAL3\n\nTo use this access mode, use one of the following security patterns:\n- [user-restricted RESTful API - using NHS CIS2 - combined authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-combined-authentication-and-authorisation)\n- [user-restricted RESTful API - using NHS CIS2 - separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-separate-authentication-and-authorisation)\n\nWe strongly recommend the use of separate authentication and authorisation. This mode will provide you access to the healthcare workers identity, allowing you to reuse it across multiple applications such as PDS.\n\nYou can [learn more](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1.4---select-your-authentication-level#1-access-modes) about each access mode option on our onboarding guide.\n\n#### Role and Organisation Validation\nFor most e-RS endpoints requests are made in the context of a specific authorised e-RS Role at a specific Organisation for the authenticated user. \n\nThe e-RS Role is supplied to the endpoint via the `NHSD-eRS-Business-Function` request header. \n\nThe Organisation is supplied to the endpoint via the `NHSD-End-User-Organisation-ODS` request header. \n\nSuitable values for these request headers can be obtained from the Practitioner Role Bundle returned by [[HYPERLINK_A030]].\n\n#### On Behalf Of User\nIf the `SERVICE_PROVIDER_CLINICIAN_ADMIN` role is used then the User ID of the Service Provider Clinician that the Admin is acting on behalf of must be supplied via the `NHSD-eRS-On-Behalf-Of-User-ID` header.\n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC).\n\n## Environments and testing\n\n| Environment | Base URL |\n| ----------------- | ---------------------------------------------------------------------- |\n| Sandbox | `https://sandbox.api.service.nhs.uk/referrals/FHIR` |\n| Integration test | `https://int.api.service.nhs.uk/referrals/FHIR` |\n| Production | `https://api.service.nhs.uk/referrals/FHIR` |\n\n### Sandbox testing\n\nOur [sandbox](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing) environment:\n-\tis for developer education and early testing\n-\tonly covers a limited set of scenarios\n-\tis stateless, so does not actually persist any updates\n-\tis open access, so does not allow you to test authorisation\n\nTry out the sandbox using our 'Try this API' feature, see the documentation for each endpoint.\n\nThe sandbox will only respond to an input which exactly matches one of the examples provided; it is otherwise stateless.\n\n### Integration testing\n\nOur [integration test](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis) environment:\n -\tis where the majority of your integration efforts will take place\n - is where we conduct witness testing for your application\n -\tis stateful, so data will be persisted\n\n\n## Onboarding\n\nYou need to get your software approved by us before you 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\nWe use the Supplier Conformance Assessment List (SCAL) process. [Learn more](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1-design#1-7-learn-how-to-onboard) about onboarding.\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* 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 Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n", + "contact": { + "url": "https://digital.nhs.uk/developer/help-and-support", + "email": "api.management@nhs.net" + }, + "license": { + "name": "MIT" + } + }, + "servers": [ + { + "url": "https://sandbox.api.service.nhs.uk/referrals/FHIR", + "description": "Sandbox environment." + }, + { + "url": "https://int.api.service.nhs.uk/referrals/FHIR", + "description": "Integration test environment." + }, + { + "url": "https://api.service.nhs.uk/referrals/FHIR", + "description": "Production environment. Not yet available." + } + ], + "tags": [ + { + "name": "Retrieve user information" + }, + { + "name": "Refer patient" + }, + { + "name": "Arrange appointment" + }, + { + "name": "Arrange triage" + }, + { + "name": "Request advice" + }, + { + "name": "Retrieve healthcare service information" + }, + { + "name": "Change appointment" + }, + { + "name": "Manage referral" + }, + { + "name": "Retrieve clinical information" + }, + { + "name": "Review referral requests" + }, + { + "name": "Review advice and guidance requests" + } + ], + "paths": { + "/STU3/CodeSystem/{codeSystemType}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve a list of reference data codes along with the user-friendly display values used in the e-RS Professional Application.\n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider or Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Use case\nAs an authenticated user or application\n\nI need to retrieve e-RS reference data\n\nSo I can use it with other endpoints or display the reference data in a user-friendly format to my users.\n\n## Related endpoints\nReference data may be needed for other endpoints, for example when including Specialty and Clinic Type reference data to:\n- find services that meet the referral needs of a patient using [[HYPERLINK_A010]], and\n- create a referral using [[HYPERLINK_A011]]\n\nYou can use the Priority reference data to calculate when a patient can expect to be contacted by the service. \n\nThis is important because when a patient's appointment is deferred to a service to book, the patient may be informed of the date by which they can expect to be contacted. \nSimilarly, in the case of a triage service, a letter may inform the patient of the date by which they can expect to be contacted.\n\nYou can calculate this date by:\n\n1. Obtaining the current priority of the referral (via [[HYPERLINK_A005]]) and its associated \"deferToProviderContactDays\" (for deferred-to services) or \"triageContactDays\" (for triage services). These represent the number of \"working days\" and do not include weekends\n2. Obtaining the datetime of the appointment resource, e.g. \"created\" : \"2021-05-06T11:21:45.652Z\"\n3. Adding the \"working days\" to the datetime of the appointment resource\n\n For example:\n\n1. Given a referral with a priority of `TWO_WEEK_WAIT` and a \"deferToProviderContactDays\" of \"2\" for priority `TWO_WEEK_WAIT`\n2. If the appointment was created on Monday 03/01/2022 for a deferred-to service \n3. The calculated date when a patient can expect to be contacted by the service would be on or before 05/01/2022\n\nNote that the \"deferToProviderContactDays\" and \"triageContactDays\" values are dynamic, and may change independently from one another, so the above calculation is for illustration purposes only.\n\nYou may also wish to present the user-friendly names for the reference data, for example when viewing the referral using [[HYPERLINK_A005]] and [[HYPERLINK_A038]].\n\nDocumentation for other endpoints will reference this endpoint, where specific reference data is required.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request | Response |\n| --------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------- |\n| Retrieve speciality reference data | `codeSystemType`=`SPECIALTY` | Specialty details |\n| Retrieve clinic type reference data | `codeSystemType`=`CLINIC-TYPE` | Clinic type details |\n| Retrieve appointment cancellation reason reference data | `codeSystemType`=`APPOINTMENT-CANCELLATION-REASON` | Appointment reason type details |\n| Retrieve referral cancellation reason reference data | `codeSystemType`=`REFERRAL-CANCELLATION-REASON` | ReferralRequest reason type details |\n| Retrieve appointment non-attendance reason reference data | `codeSystemType`=`APPOINTMENT-NON-ATTENDANCE-REASON` | Appointment non-attendance reason details |\n| Retrieve priority reference data | `codeSystemType`=`PRIORITY` | Priority details |\n", + "summary": "Retrieve reference data (A004, FHIR STU3)", + "operationId": "a004-retrieve-reference-data", + "tags": [ + "Refer patient", + "Request advice" + ], + "parameters": [ + { + "name": "codeSystemType", + "in": "path", + "description": "The requested code system\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "SPECIALTY", + "APPOINTMENT-CANCELLATION-REASON", + "CLINIC-TYPE", + "REFERRAL-CANCELLATION-REASON", + "APPOINTMENT-NON-ATTENDANCE-REASON", + "PRIORITY" + ], + "example": "SPECIALTY" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "e-RS Reference Data", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "url", + "name", + "status", + "date", + "description", + "content", + "property", + "concept" + ], + "properties": { + "id": { + "title": "Identifier of this code system", + "type": "string", + "enum": [ + "SPECIALTY", + "APPOINTMENT-CANCELLATION-REASON", + "CLINIC-TYPE", + "REFERRAL-CANCELLATION-REASON", + "APPOINTMENT-NON-ATTENDANCE-REASON", + "PRIORITY" + ], + "example": "SPECIALTY" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/StructureDefinition/shareablecodesystem", + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Specialty-CodeSystem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Specialty-CodeSystem-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "CodeSystem" + ], + "example": "CodeSystem" + }, + "url": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "name": { + "title": "Description of the code system", + "type": "string", + "enum": [ + "e-RS Appointment Cancellation Reason", + "e-RS Specialty", + "e-RS Clinic Type", + "e-RS ReferralRequest Cancellation Reason", + "e-RS Appointment Non-attendance Reason", + "e-RS Priority" + ], + "example": "e-RS Specialty" + }, + "status": { + "type": "string", + "enum": [ + "active" + ], + "example": "active" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "publisher": { + "type": "string", + "enum": [ + "e-Referral Service" + ], + "example": "e-Referral Service" + }, + "description": { + "type": "string", + "example": "e-RS Specialty" + }, + "copyright": { + "type": "string", + "example": "Copyright (c) 2016 HL7 UK" + }, + "content": { + "type": "string", + "enum": [ + "complete" + ], + "example": "complete" + }, + "property": { + "title": "Code System Properties", + "description": "\nSome properties are only returned for certain code systems\n \n| Property | Code System |\n| -----------------------------------------| ------------------------------------------------------------- |\n| EffectiveFrom | All Code Systems |\n| EffectiveTo | All Code Systems |\n| Specialty | CLINIC-TYPE |\n| AppointmentBookingCancellationReasonType | APPOINTMENT-CANCELLATION-REASON |\n| WillCancelWholeRequest | APPOINTMENT-CANCELLATION-REASON |\n| Usage | APPOINTMENT-CANCELLATION-REASON |\n| CommentIsMandatory | APPOINTMENT-CANCELLATION-REASON / REFERRAL-CANCELLATION-REASON |\n| BusinessFunction | APPOINTMENT-CANCELLATION-REASON / REFERRAL-CANCELLATION-REASON |\n| AppointmentRequestCancellationReasonType | REFERRAL-CANCELLATION-REASON |\n| CanCancelAppointment | REFERRAL-CANCELLATION-REASON |\n| ReferrerUsage | REFERRAL-CANCELLATION-REASON |\n| DeferToProviderContactDays | PRIORITY |\n| TriageContactDays | PRIORITY |\n", + "type": "array", + "items": { + "anyOf": [ + { + "title": "Effective from date", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "effectiveFrom" + ], + "example": "effectiveFrom" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveFrom" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveFrom" + }, + "type": { + "type": "string", + "enum": [ + "dateTime" + ], + "example": "dateTime" + } + } + }, + { + "title": "Effective to date", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "effectiveTo" + ], + "example": "effectiveTo" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveTo" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveTo" + }, + "type": { + "type": "string", + "enum": [ + "dateTime" + ], + "example": "dateTime" + } + } + }, + { + "title": "Specialty", + "description": "This will only be returned when codeSystemType is CLINIC-TYPE", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#specialty" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#specialty" + }, + "type": { + "type": "string", + "enum": [ + "Coding" + ], + "example": "Coding" + } + } + }, + { + "title": "Appointment Booking Cancellation Reason Type", + "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "appointmentBookingCancellationReasonType" + ], + "example": "appointmentBookingCancellationReasonType" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentBookingCancellationReasonType" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentBookingCancellationReasonType" + }, + "type": { + "type": "string", + "enum": [ + "Coding" + ], + "example": "Coding" + } + } + }, + { + "title": "Will Cancel Whole Request", + "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", + "type": "object", + "deprecated": true, + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "willCancelWholeRequest" + ], + "example": "willCancelWholeRequest" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#willCancelWholeRequest" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#willCancelWholeRequest" + }, + "type": { + "type": "string", + "enum": [ + "boolean" + ], + "example": "boolean" + } + } + }, + { + "title": "Usage", + "description": "Details how the current code system should be used", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "usage" + ], + "example": "usage" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#usage" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#usage" + }, + "type": { + "type": "string", + "enum": [ + "Coding" + ], + "example": "Coding" + } + } + }, + { + "title": "Comment Is Mandatory", + "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON or REFERRAL-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "commentIsMandatory" + ], + "example": "commentIsMandatory" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#commentIsMandatory" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#commentIsMandatory" + }, + "type": { + "type": "string", + "enum": [ + "boolean" + ], + "example": "boolean" + } + } + }, + { + "title": "BusinessFunction", + "description": "Details which Business functions are able to use the current code system", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "businessFunction" + ], + "example": "businessFunction" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#businessFunction" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#businessFunction" + }, + "type": { + "type": "string", + "enum": [ + "Coding" + ], + "example": "Coding" + } + } + }, + { + "title": "Appointment Request Cancellation Reason Type", + "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "appointmentRequestCancellationReasonType" + ], + "example": "appointmentRequestCancellationReasonType" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentRequestCancellationReasonType" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentRequestCancellationReasonType" + }, + "type": { + "type": "string", + "enum": [ + "Coding" + ], + "example": "Coding" + } + } + }, + { + "title": "CanCancelAppointment", + "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "canCancelAppointment" + ], + "example": "canCancelAppointment" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#canCancelAppointment" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#canCancelAppointment" + }, + "type": { + "type": "string", + "enum": [ + "boolean" + ], + "example": "boolean" + } + } + }, + { + "title": "ReferrerUsage", + "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "referrerUsage" + ], + "example": "referrerUsage" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#referrerUsage" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#referrerUsage" + }, + "type": { + "type": "string", + "enum": [ + "Coding" + ], + "example": "Coding" + } + } + }, + { + "title": "Defer to Provider Contact Days", + "description": "This will only be returned when codeSystemType is PRIORITY", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "deferToProviderContactDays" + ], + "example": "deferToProviderContactDays" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#deferToProviderContactDays" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#deferToProviderContactDays" + }, + "type": { + "type": "string", + "enum": [ + "integer" + ], + "example": "integer" + } + } + }, + { + "title": "Triage Contact Days", + "description": "This will only be returned when codeSystemType is PRIORITY", + "type": "object", + "required": [ + "code", + "uri", + "type" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "triageContactDays" + ], + "example": "triageContactDays" + }, + "uri": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#triageContactDays" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#triageContactDays" + }, + "type": { + "type": "string", + "enum": [ + "integer" + ], + "example": "integer" + } + } + } + ] + } + }, + "concept": { + "title": "Details of the code system", + "type": "array", + "items": { + "type": "object", + "required": [ + "code", + "display", + "property" + ], + "properties": { + "extension": { + "title": "Effective Date Range Extensions", + "type": "array", + "nullable": true, + "items": { + "anyOf": [ + { + "title": "Extension-eRS-EffectivefromDate", + "description": "Extension to supply the effective From Date, this will only be returned for specialty", + "type": "object", + "required": [ + "url", + "valueDate" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivefromDate-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivefromDate-1" + }, + "valueDate": { + "type": "string", + "format": "date" + } + } + }, + { + "title": "Extension-eRS-EffectivetoDate", + "description": "Extension to supply the effective To Date, this will only be returned for specialty", + "type": "object", + "required": [ + "url", + "valueDate" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivetoDate-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivetoDate-1" + }, + "valueDate": { + "type": "string", + "format": "date" + } + } + } + ] + } + }, + "code": { + "title": "Value of the code system", + "description": "\n| Code System | Example Value |\n| ------------------------------------- | ----------------------------- |\n| Specialty | UROLOGY |\n| Clinic Type | GENERAL_UROLOGY |\n| Appointment Cancellation Reason | SERVICE_INAPPROPRIATE |\n| Referral Cancellation Reason | INTEND_PRIVATE |\n| Appointment Non-attendance Reason | PATIENT_ILL |\n| Priority | ROUTINE |\n", + "type": "string" + }, + "display": { + "title": "Display value of the code system", + "description": "\n| Code System | Example Display Value |\n| ------------------------------------- | ----------------------------------- |\n| Specialty | Urology |\n| Clinic Type | General Urology |\n| Appointment Cancellation Reason | Inappropriate service |\n| Referral Cancellation Reason | Patient will go to a private clinic |\n| Appointment Non-attendance Reason | Patient ill |\n| Priority | Routine |\n", + "type": "string" + }, + "property": { + "description": "\nSome properties are only returned for certain code systems\n\n| Property | Code System |\n| -----------------------------------------| ----------------------------------------------------------- |\n| EffectiveFrom | All Code Systems |\n| EffectiveTo | All Code Systems |\n| Specialty | CLINIC-TYPE |\n| AppointmentBookingCancellationReasonType | APPOINTMENT-CANCELLATION-REASON |\n| WillCancelWholeRequest | APPOINTMENT-CANCELLATION-REASON |\n| Usage | APPOINTMENT-CANCELLATION-REASON |\n| CommentIsMandatory | APPOINTMENT-CANCELLATION-REASON/REFERRAL-CANCELLATION-REASON |\n| businessFunction | APPOINTMENT-CANCELLATION-REASON/REFERRAL-CANCELLATION-REASON |\n| AppointmentRequestCancellationReasonType | REFERRAL-CANCELLATION-REASON |\n| CanCancelAppointment | REFERRAL-CANCELLATION-REASON |\n| RequestCancellationReferrerUsage | REFERRAL-CANCELLATION-REASON |\n| DeferToProviderContactDays | PRIORITY |\n| TriageContactDays | PRIORITY |\n", + "type": "array", + "nullable": true, + "items": { + "anyOf": [ + { + "title": "Will cancel whole request value", + "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", + "type": "object", + "deprecated": true, + "required": [ + "code", + "valueBoolean" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "willCancelWholeRequest" + ] + }, + "valueBoolean": { + "type": "boolean" + } + } + }, + { + "title": "Effective from date", + "type": "object", + "required": [ + "code", + "valueDateTime" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "effectiveFrom" + ] + }, + "valueDateTime": { + "type": "string", + "format": "date-time" + } + } + }, + { + "title": "Effective to date", + "type": "object", + "required": [ + "code", + "valueDateTime" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "effectiveTo" + ] + }, + "valueDateTime": { + "type": "string", + "format": "date-time" + } + } + }, + { + "title": "Specialty value", + "description": "This will only be returned when codeSystemType is CLINIC-TYPE", + "type": "object", + "required": [ + "code", + "valueCoding" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "specialty" + ] + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "Appointment cancellation reason type", + "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "valueCoding" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "appointmentBookingCancellationReasonType" + ] + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentBookingCancellationReasonType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentBookingCancellationReasonType-1" + }, + "code": { + "type": "string", + "example": "PROVIDER_REJECT" + } + } + } + } + }, + { + "title": "AppointmentCancellationUsage", + "description": "This will only be returned when `codeSystemType` is `APPOINTMENT-CANCELLATION-REASON`", + "type": "object", + "required": [ + "code", + "valueCoding" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "usage" + ], + "example": "usage" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentCancellationReasonUsage-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentCancellationReasonUsage-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECT", + "CANCEL" + ], + "example": "REJECT" + } + } + } + } + }, + { + "title": "Comment is mandatory value", + "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "valueBoolean" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "commentIsMandatory" + ] + }, + "valueBoolean": { + "type": "boolean" + } + } + }, + { + "title": "BusinessFunction", + "description": "This will only be returned when `codeSystemType` is `APPOINTMENT-CANCELLATION-REASON` or `REFERRAL-CANCELLATION-REASON`", + "type": "object", + "required": [ + "code", + "valueCoding" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "businessFunction" + ], + "example": "businessFunction" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + }, + "code": { + "type": "string", + "example": "REFERRING_CLINICIAN" + } + } + } + } + }, + { + "title": "Appointment request cancellation reason type", + "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "valueCoding" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "appointmentRequestCancellationReasonType" + ] + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentRequestCancellationReasonType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentRequestCancellationReasonType-1" + }, + "code": { + "type": "string", + "example": "PROVIDER" + } + } + } + } + }, + { + "title": "CanCancelAppointment", + "description": "This will only be returned when `codeSystemType` is REFERRAL-CANCELLATION-REASON", + "type": "object", + "required": [ + "code", + "valueBoolean" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "canCancelAppointment" + ], + "example": "canCancelAppointment" + }, + "valueBoolean": { + "type": "boolean" + } + } + }, + { + "title": "RequestCancellationReferrerUsage", + "description": "This will only be returned when `codeSystemType` is `REFERRAL-CANCELLATION-REASON`", + "type": "object", + "required": [ + "code", + "valueCoding" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "referrerUsage" + ], + "example": "referrerUsage" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralRequestCancellationReasonUsage-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralRequestCancellationReasonUsage-1" + }, + "code": { + "type": "string", + "enum": [ + "CANCEL_REFERRAL" + ], + "example": "CANCEL_REFERRAL" + } + } + } + } + }, + { + "title": "Defer to provider contact days", + "description": "This will only be returned when codeSystemType is PRIORITY", + "type": "object", + "required": [ + "code", + "valueInteger" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "deferToProviderContactDays" + ] + }, + "valueInteger": { + "type": "integer", + "example": 10 + } + } + }, + { + "title": "Triage contact days", + "description": "This will only be returned when codeSystemType is PRIORITY", + "type": "object", + "required": [ + "code", + "valueInteger" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "triageContactDays" + ] + }, + "valueInteger": { + "type": "integer", + "example": 10 + } + } + } + ] + } + } + } + } + } + } + }, + "examples": { + "specialty": { + "summary": "Specialty Reference Data", + "description": "This is example data only and should not be taken as the real reference data. Specialty data may have 'effectiveTo' dates in the past", + "value": { + "$ref": "../../../examples/getCodeSystem/responses/SpecialtyCodeSystem.json" + } + }, + "clinic-type": { + "summary": "Clinic Type Reference Data", + "description": "This is example data only and should not be taken as the real reference data.", + "value": { + "$ref": "../../../examples/getCodeSystem/responses/ClinicTypeCodeSystem.json" + } + }, + "appointment-cancellation-reason-code": { + "summary": "Appointment Cancellation Reason Reference Data", + "description": "This is example data only and should not be taken as the real reference data.", + "value": { + "$ref": "../../../examples/getCodeSystem/responses/AppointmentCancellationReasonCodeSystem.json" + } + }, + "referral-request-cancellation-reason-code": { + "summary": "ReferralRequest Cancellation Reason Reference Data", + "description": "This is example data only and should not be taken as the real reference data.", + "value": { + "$ref": "../../../examples/getCodeSystem/responses/ReferralCancellationReasonCodeSystem.json" + } + }, + "appointment-non-attendance-reason": { + "summary": "Appointment Non-attendance Reason Reference Data", + "description": "This is example data only and should not be taken as the real reference data.", + "value": { + "$ref": "../../../examples/getCodeSystem/responses/AppointmentNonAttendanceReasonCodeSystem.json" + } + }, + "priority": { + "summary": "Priority Reference Data", + "description": "This is example data only and should not be taken as the real reference data.", + "value": { + "$ref": "../../../examples/getCodeSystem/responses/PriorityCodeSystem.json" + } + } + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/$ers.fetchworklist": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to retrieve available worklists of referral requests. \nService Providers can use [[HYPERLINK_A023]] to retrieve available worklists of advice and guidance requests. \nThere are currently no worklists of advice and guidance requests for Referrers.\n\nWorklists provide lists of referral/advice requests that meet certain criteria, \ntypically where a user needs to be aware of something important, or to undertake an action, in order to avoid delays to patient care.\n\n## Referring Organisations\nReferring organisations can currently access the following referral related worklists:\n - The 'Letters Outstanding' worklist contains referrals which require a referral letter to be added.\n - The 'Rejected / Triage Response' worklist contains referrals which have had an appointment rejected or have been returned to the referrer with a response as part of a triage outcome.\n - The 'Assessment Returned / Cancelled / DNA' worklist contains referrals which have a clinical assessment outcome of 'advise referrer' recorded, or referrals which have been cancelled by someone outside the initial referring organisation, or referrals where the patient did not attend the appointment booking and the provider has returned the referral back to the referrer for action.\n - The 'Awaiting Booking' worklist contains referrals for which an appointment booking could be made but they do not currently have an appointment booking. This includes referrals that are currently awaiting triage, deferred to provider, or have had their appointment booking cancelled.\n\nFilters can be used in requests for service provider organisation worklists, however, filters cannot be used in requests for referring organisation worklists.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint and retrieve the referring organisation worklists, you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `REFERRING_ADMIN`\n\n### Use case\nAs an authenticated user\n\nI need to retrieve a referral worklist for my referring organisation\n\nSo that I can determine which referrals I need to take further action on\n\n### Related endpoints\nTo retrieve pertinent details relating to a referral:\n - Use [[HYPERLINK_A005]] to retrieve the details of the referral\n - Use [[HYPERLINK_A006]] to retrieve the clinical attachments for a referral\n - Use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for a referral\n\nYou can use [[HYPERLINK_A029]] to determine what endpoints an authenticated user is permitted to use for a referral in it's current state.\n\n## Service Providing Organisations\nService provider organisations can currently access the following referral related worklists:\n - The 'Referrals for Review' worklist contains booked and RAS (triage) referrals that require review by the service provider organisation. The version of each referral in the worklist will also be returned. Note that the version can change due to admin/clinical changes as well as internal e-RS processes.\n - The 'Appointment Slot Issues' worklist contains referrals which have been 'deferred to provider' because of a lack of appointment availability (e.g. no appointment slots). \n The referrals need to be reviewed and if appropriate booked into a service at the service provider organisation.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nSupported Worklists:\n- Referrals for Review\n- Appointment Slot Issues\n\nThe Service filter is mandatory when using this security pattern.\n\nThis endpoint must only be used to retrieve the worklist for a given service up to two times per day. If this does not meet your requirements, please [[HYPERLINK_CONTACT_US]] to discuss your use case.\n\nIf a worklist response exceeds 10MB, a successful response will not be returned. This is due to the size limitation on the APIM platform.\n\n### User-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nSupported Worklists:\n - Referrals for Review\n - Appointment Slot Issues\n\nIf a worklist response exceeds 10MB, a successful response will not be returned. This is due to the size limitation on the APIM platform.\n\n### Use case\nAs an authenticated user\n\nI need to retrieve a referral worklist for my service providing organisation\n\nSo that I can determine which referrals I need to take further action on\n\n### Related endpoints\n\nTo retrieve pertinent details relating to a referral:\n - Use [[HYPERLINK_A005]] to retrieve the details of the referral\n - Use [[HYPERLINK_A006]] to retrieve the clinical attachments for a referral\n - Use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for a referral\n\nFor service providing organisations reviewing booked referrals on the 'Referrals for review' worklist:\n - Use [[HYPERLINK_A013]] to accept a referral into a bookable service\n - Use [[HYPERLINK_A014]] to reject a referral from a bookable service\n - Use [[HYPERLINK_A022]] to request an admin team to rebook or redirect a referral\n\nFor service providing organisations reviewing triage (RAS) referrals on the 'Referrals for review' worklist:\n - Use [[HYPERLINK_A028]] to record the triage outcome based on the available clinical information and attachments\n\nFor service providing organisations reviewing referrals that have been deferred to provider on the 'Appointment slot issues' worklist:\n - Use [[HYPERLINK_A028]] to record the triage outcome based on the available clinical information and attachments\n", + "summary": "Retrieve referral worklist (A008, FHIR STU3)", + "operationId": "a008-retrieve-worklist", + "tags": [ + "Retrieve clinical information", + "Review referral requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-FetchWorklist-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `listType` | `1..1` | |\n| `service` | `0..1` | Mandatory for the application-restricted security pattern |\n| `specialtyAssignedIndicator` | `0..1` | |\n| `specialty` | `0..1` | | \n| `location` | `0..1` | | \n| `clinicianAssignedIndicator` | `0..1` | | \n| `clinician` | `0..1` | | \n", + "items": { + "anyOf": [ + { + "title": "listType", + "description": "Indicates the type of list requested", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "listType" + ], + "example": "listType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| -------------------------------- | ----------- | -------------------------------------- |\n| `eRS-ReferralListSelector` | `0..1` | |\n| `eRS-CommunicationListSelector` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-ReferralListSelector", + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRALS_FOR_REVIEW", + "APPOINTMENT_SLOT_ISSUES", + "REJECTED_TRIAGE_RESPONSE", + "ASSESSMENT_RETURNED_CANCELLED_DNA", + "AWAITING_BOOKING", + "LETTERS_OUTSTANDING" + ], + "example": "REFERRALS_FOR_REVIEW" + } + } + }, + { + "title": "eRS-CommunicationListSelector", + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVICE_AND_GUIDANCE_REQUESTS" + ], + "example": "ADVICE_AND_GUIDANCE_REQUESTS" + } + } + } + ] + } + } + } + } + } + }, + { + "title": "service", + "description": "The service identifier", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + }, + { + "title": "specialtyAssignedIndicator", + "description": "Indicates whether filtering on Specialty is required or not\n", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialtyAssignedIndicator" + ], + "example": "specialtyAssignedIndicator" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + }, + "code": { + "type": "string", + "enum": [ + "ASSIGNED", + "NOT_ASSIGNED" + ], + "example": "NOT_ASSIGNED" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "location", + "description": "The service location identifier", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "location" + ], + "example": "location" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "clinicianAssignedIndicator", + "description": "Indicates whether filtering on Clinician is required or not\n", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicianAssignedIndicator" + ], + "example": "clinicianAssignedIndicator" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + }, + "code": { + "type": "string", + "enum": [ + "ASSIGNED", + "NOT_ASSIGNED" + ], + "example": "NOT_ASSIGNED" + } + } + } + } + } + } + } + }, + { + "title": "clinician", + "description": "The clinician assigned to the Referral Request. If present, the 'clinicianAssignedIndicator' parameter must be set to 'Assigned'", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinician" + ], + "example": "clinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "referrals-for-review": { + "summary": "Referrals for review", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/MinimalReferralsForReview.json" + } + }, + "appointment-slot-issues": { + "summary": "Appointment slot issues", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/MinimalAppointmentSlotIssues.json" + } + }, + "filtered-by-specialty": { + "summary": "Filter by specialty", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/FilteringBySpecialty.json" + } + }, + "filtered-by-clinician": { + "summary": "Filter by clinician", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/FilteringByClinician.json" + } + }, + "filtered-by-service": { + "summary": "Filter by service", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/FilteringByService.json" + } + }, + "rejected-triage-responses": { + "summary": "Rejected Triage Responses", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/MinimalRejectedTriageResponse.json" + } + }, + "assessment-returned-cancelled-dna": { + "summary": "Assessment Returned Cancelled DNA", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/MinimalAssessmentReturnedCancelledDna.json" + } + }, + "awaiting-booking": { + "summary": "Awaiting Booking", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/MinimalAwaitingBooking.json" + } + }, + "letters-outstanding": { + "summary": "Letters Outstanding", + "value": { + "$ref": "../../examples/retrieveWorklist/requests/MinimalLettersOutstanding.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The response body contains the list of referrals (if any) that match the search criteria provided", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-FetchWorklist-List", + "description": "A list of referrals representing the available worklist items", + "type": "object", + "required": [ + "meta", + "resourceType", + "status", + "mode" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------------------------------------------- |\n| `Practitioner` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n| `Patient` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n", + "items": { + "anyOf": [ + { + "title": "Practitioner", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "Practitioner-021600556514" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Practitioner" + ], + "example": "Practitioner" + }, + "identifier": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + }, + { + "title": "Patient", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "Patient-9912003888" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Patient" + ], + "example": "Patient" + }, + "identifier": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with referral details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070002" + } + } + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ----------------------------------------------------------- | ----------- | ------------------------------------------------------------- |\n| `Extension-eRS-ReferralsforReview-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AppointmentSlotIssues-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested | \n| `Extension-eRS-AdviceAndGuidanceRequests-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-RejectedTriageResponse-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AwaitingBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-LettersOutstanding-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralsforReview-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `requestContextStatus` | `1..1` | |\n| `clinicalInfoFirstSubmitted` | `0..1` | |\n| `clinicalInfoLastUpdated` | `0..1` | |\n| `appointmentStart` | `0..1` | |\n| `allocatedClinician` | `0..1` | |\n| `service` | `1..1` | |\n| `referralRequestVersion` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#Patient-9462979626" + } + } + } + } + }, + { + "title": "namedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#Practitioner-021600556514" + } + } + } + } + }, + { + "title": "eReferralPathwayStart", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "eReferralPathwayStart" + ], + "example": "eReferralPathwayStart" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "clinicalInfoPrinted", + "type": "object", + "required": [ + "url", + "valueBoolean" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoPrinted" + ], + "example": "clinicalInfoPrinted" + }, + "valueBoolean": { + "type": "boolean", + "example": false + } + } + }, + { + "title": "requestContextStatus", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "requestContextStatus" + ], + "example": "requestContextStatus" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "LETTER_CHANGED", + "PRIORITY_CHANGED", + "PRIORITY_AND_LETTER_CHANGED", + "NEVER_REVIEWED" + ], + "example": "NEVER_REVIEWED" + }, + "display": { + "type": "string", + "example": "Never Reviewed" + } + } + } + } + } + } + } + }, + { + "title": "clinicalInfoFirstSubmitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoFirstSubmitted" + ], + "example": "clinicalInfoFirstSubmitted" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "clinicalInfoLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoLastUpdated" + ], + "example": "clinicalInfoLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-03T10:44:42.764Z" + } + } + }, + { + "title": "referralType", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralType" + ], + "example": "referralType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" + }, + "code": { + "type": "string", + "enum": [ + "APPOINTMENT", + "TRIAGE_DEFERRAL" + ], + "example": "TRIAGE_DEFERRAL" + } + } + } + } + } + } + } + }, + { + "title": "appointmentStart", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "appointmentStart" + ], + "example": "appointmentStart" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-02T14:15:00.000Z" + } + } + }, + { + "title": "allocatedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "allocatedClinician" + ], + "example": "allocatedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#Practitioner-021600556514" + } + } + } + } + }, + { + "title": "service", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier", + "display" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Service Name" + } + } + } + } + }, + { + "title": "referralRequestVersion", + "type": "object", + "required": [ + "url", + "valueInteger" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralRequestVersion" + ], + "example": "referralRequestVersion" + }, + "valueInteger": { + "type": "integer", + "example": 0 + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AppointmentSlotIssues-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `ubrnReceived` | `0..1` | |\n| `patientContactExpected` | `0..1` | |\n| `clinicalInformationStatus` | `0..1` | |\n| `reason` | `0..1` | |\n| `lastContact` | `0..1` | |\n| `service` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "namedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "eReferralPathwayStart", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "eReferralPathwayStart" + ], + "example": "eReferralPathwayStart" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "clinicalInfoPrinted", + "type": "object", + "required": [ + "url", + "valueBoolean" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoPrinted" + ], + "example": "clinicalInfoPrinted" + }, + "valueBoolean": { + "type": "boolean", + "example": false + } + } + }, + { + "title": "ubrnReceived", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "ubrnReceived" + ], + "example": "ubrnReceived" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "patientContactExpected", + "type": "object", + "required": [ + "url", + "valueDate" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patientContactExpected" + ], + "example": "patientContactExpected" + }, + "valueDate": { + "type": "string", + "format": "date", + "example": "2021-09-07" + } + } + }, + { + "title": "clinicalInformationStatus", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInformationStatus" + ], + "example": "clinicalInformationStatus" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PRESENT", + "NOT_APPLICABLE", + "NOT_DUE", + "OVERDUE" + ], + "example": "NOT_DUE" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + } + } + } + } + } + }, + { + "title": "lastContact", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "lastContact" + ], + "example": "lastContact" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "service", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier", + "display" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Service Name" + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AdviceAndGuidanceRequests-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `category` | `1..1` | |\n| `adviceFirstRequested` | `1..1` | |\n| `adviceLastUpdated` | `1..1` | |\n| `referrer` | `1..1` | |\n| `service` | `1..1` | |\n| `clinicType` | `0..1` | |\n| `communicationRequestVersion` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "namedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "category", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "category" + ], + "example": "category" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_RESPONSE_REQUIRED", + "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", + "REFERRER_TO_REVIEW_RESPONSE", + "CONVERSATION_ENDED_CANCELLED", + "CONVERSATION_ENDED_CLOSED", + "ADVICE_CONVERTED" + ], + "example": "PROVIDER_RESPONSE_REQUIRED" + } + } + } + } + } + } + } + }, + { + "title": "adviceFirstRequested", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "adviceFirstRequested" + ], + "example": "adviceFirstRequested" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "adviceLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "adviceLastUpdated" + ], + "example": "adviceLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "adviceLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "adviceLastUpdated" + ], + "example": "adviceLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "service", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier", + "display" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Service Name" + } + } + } + } + }, + { + "title": "clinicType", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/CLINIC-TYPE" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + } + } + } + }, + { + "title": "communicationRequestVersion", + "type": "object", + "required": [ + "url", + "valueInteger" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "communicationRequestVersion" + ], + "example": "communicationRequestVersion" + }, + "valueInteger": { + "type": "integer", + "example": 0 + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-RejectedTriageResponse-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Rejected/TriageRequest worklist, only included if `status` is `TRIAGE_RESPONSE` |\n", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "referralLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralLastUpdated" + ], + "example": "referralLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "status", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "status" + ], + "example": "status" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "ASSESSMENT_RESULT", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "NOT_BOOKED", + "BOOKED", + "AWAITING_TRIAGE", + "DEFERRED_TO_PROVIDER", + "APP_CANCELLED_BY_PROVIDER", + "APP_CANCELLED_BY_PATIENT", + "TRIAGED_PROVIDER_TO_ACTION", + "TRIAGE_RESPONSE" + ], + "example": "REJECTED" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Assessment result", + "Cancelled referral", + "Did not attend", + "Not booked", + "Booked", + "Awaiting triage", + "Deferred to provider", + "Appointment cancelled by provider", + "Appointment cancelled by patient", + "Triaged - provider to action", + "Triage Response" + ], + "example": "Rejected" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + ], + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "FURTHER_INFORMATION_REQUIRED" + }, + "display": { + "type": "string", + "example": "Further information required" + } + } + } + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" + }, + "extension": { + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Assessment Returned / Cancelled / DNA worklist, only included if `status` is `CANCELLED_REFERRAL` |\n", + "type": "array", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "referralLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralLastUpdated" + ], + "example": "referralLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "status", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "status" + ], + "example": "status" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "ASSESSMENT_RESULT", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "NOT_BOOKED", + "BOOKED", + "AWAITING_TRIAGE", + "DEFERRED_TO_PROVIDER", + "APP_CANCELLED_BY_PROVIDER", + "APP_CANCELLED_BY_PATIENT", + "TRIAGED_PROVIDER_TO_ACTION", + "TRIAGE_RESPONSE" + ], + "example": "REJECTED" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Assessment result", + "Cancelled referral", + "Did not attend", + "Not booked", + "Booked", + "Awaiting triage", + "Deferred to provider", + "Appointment cancelled by provider", + "Appointment cancelled by patient", + "Triaged - provider to action", + "Triage Response" + ], + "example": "Rejected" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" + ], + "example": "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "INTEND_PRIVATE" + }, + "display": { + "type": "string", + "example": "Patient will go to a private clinic" + } + } + } + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AwaitingBooking-WorklistItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" + }, + "extension": { + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Awaiting Booking worklist, only included if `status` is `APPOINTMENT_CANCELLED_BY_PROVIDER` or `APPOINTMENT_CANCELLED_BY_PATIENT` |\n", + "type": "array", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "referralLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralLastUpdated" + ], + "example": "referralLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "status", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "status" + ], + "example": "status" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "ASSESSMENT_RESULT", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "NOT_BOOKED", + "BOOKED", + "AWAITING_TRIAGE", + "DEFERRED_TO_PROVIDER", + "APP_CANCELLED_BY_PROVIDER", + "APP_CANCELLED_BY_PATIENT", + "TRIAGED_PROVIDER_TO_ACTION", + "TRIAGE_RESPONSE" + ], + "example": "REJECTED" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Assessment result", + "Cancelled referral", + "Did not attend", + "Not booked", + "Booked", + "Awaiting triage", + "Deferred to provider", + "Appointment cancelled by provider", + "Appointment cancelled by patient", + "Triaged - provider to action", + "Triage Response" + ], + "example": "Rejected" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + ], + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_APPOINTMENT_CLASH" + }, + "display": { + "type": "string", + "example": "Patient - Clashes with another appointment" + } + } + } + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-LettersOutstanding-WorklistItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" + }, + "extension": { + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `letterDue` | `1..1` | The `date` a referral letter is due for the `ReferralRequest` |\n", + "type": "array", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "letterDue", + "type": "object", + "required": [ + "url", + "valueDate" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "letterDue" + ], + "example": "letterDue" + }, + "valueDate": { + "type": "string", + "format": "date", + "example": "2021-11-24" + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + } + }, + "examples": { + "referrals-for-review": { + "summary": "Referrals for Review", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/ReferralsForReview.json" + } + }, + "appointment-slot-issues": { + "summary": "Appointment Slot Issues", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/AppointmentSlotIssues.json" + } + }, + "filtered-by-specialty": { + "summary": "Filtered by specialty", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/FilteredBySpecialty.json" + } + }, + "filtered-by-clinician": { + "summary": "Filtered by clinician", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/FilteredByClinician.json" + } + }, + "filtered-by-service": { + "summary": "Filtered by service", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/FilteredByService.json" + } + }, + "rejected-triage-responses": { + "summary": "Rejected Triage / Response", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/RejectedTriageResponse.json" + } + }, + "assessment-returned-cancelled-dna": { + "summary": "Assessment Returned / Cancelled / DNA", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/AssessmentReturnedCancelledDna.json" + } + }, + "awaiting-booking": { + "summary": "Awaiting Booking", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/AwaitingBooking.json" + } + }, + "letters-outstanding": { + "summary": "Letters Outstanding", + "value": { + "$ref": "../../../examples/retrieveWorklist/responses/LettersOutstanding.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request or service. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve details of a referral. This includes references to clinical attachments, related referrals and other important data.\n\nDuring the lifecycle of a referral, the state of the referral may change multiple times. To help with understanding the state of a referral, we provide an \"at a glance\" summary of the referral as detailed below:\n\n| Code returned via https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1 | Description |\n| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| `APPT_CANCELLED_BY_PATIENT` | The referral's most recent appointment was cancelled at the request of, or directly by, a patient |\n| `APPT_CANCELLED_BY_PROVIDER` | The referral's most recent appointment was cancelled by the service provider |\n| `ASSESSMENT_RESULT` | A service provider has reviewed and drafted, or submitted a clinical assessment for the referral |\n| `AWAITING_TRIAGE` | The triage referral is currently pending review with a service provider |\n| `BOOKED` | This referral's appointment indicates a date and time with a service |\n| `CANCELLED_REFERRAL` | The referral has been cancelled and cannot be progressed any further |\n| `DEFERRED_TO_PROVIDER` | The service provider will arrange the patient's appointment |\n| `DID_NOT_ATTEND` | The patient did not attend their last appointment |\n| `NOT_BOOKED` | The referral is currently not booked, there is currently no planned patient encounter |\n| `REJECTED` | The referral was rejected by a provider at their service |\n| `TRIAGE_RESPONSE` | A service has passed the referral back to the referrer, with advice |\n| `TRIAGED_PROVIDER_TO_ACTION` | The service provider has recorded a review decision, with the intention of processing this referral |\n\nSome referral states may also have a `reason` and some reasons may also have a `comment`. These are described below:\n\n## Reason\n- The reason is always connected to the current state. This means the reason is likely to change each time the state changes. You cannot currently retrieve previous versions of a referral.\n- This reason may have been selected by a clinician or automatically applied by the e-RS system at the time the state was persisted.\n- A reason can be dynamic reference data, from any of the following sets of reference data: `APPOINTMENT-CANCELLATION-REASON`, `REFERRAL-CANCELLATION-REASON`, `APPOINTMENT-NON-ATTENDANCE-REASON`. These are retrievable from [[HYPERLINK_A004]].\n- A reason may be static reference data.\n\n## Comments\n- The comment is always connected to the current reason, and state. This means the comment is likely to change as the state changes.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user or application and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to retrieve details of a referral.\n\n## Important notes\n### Attachment availability\n\n In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A005]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE | The file is available for download. |\n| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again |\n| THREATS FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n### Receiving an e-Referral Pathway Start Date\n \nThe e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]].\n\nIf a referral was created with an alternate pathway start date, then this will be available in the referral request response.\n\nService providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]].\n\n## Use case\n\nAs an authenticated user or application\n\nI want to read details of a referral\n\nSo that I can decide what further action may be needed.\n\n## Related endpoints\n\nYou can retrieve attachments that are associated with the referral using [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]. Attachments can only be retrieved where the eRS-AvailabilityStatus-1 code returned is 'AVAILABLE'\n\nYou can retrieve a clinical information summary for the referral using [[HYPERLINK_A007]]\n\nYou can search for services appropriate to a referral to form a shortlist using [[HYPERLINK_A010]]\n\nIf bookable services are on the shortlist of the referral, you can retrieve appointment slots for a service on the shortlist for a referral using [[HYPERLINK_A015]]\n\nYou can retrieve the patient letter appropriate to the referral using [[HYPERLINK_A019]]\n\nYou can retrieve reference data used in viewing a referral using [[HYPERLINK_A004]]\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ----------------------- |\n| Unbooked `ReferralRequest` | `ubrn`=`000000070000` |\n| `ReferralRequest` booked to directly-bookable service | `ubrn`=`000000070001` |\n| `ReferralRequest` booked to indirectly-bookable service | `ubrn`=`000000070002` |\n| `ReferralRequest` deferred to service provider for booking | `ubrn`=`000000070003` |\n| `ReferralRequest` that was converted from an Advice and Guidance Request | `ubrn`=`000000070004` |\n| `ReferralRequest` with related `ReferralRequest` | `ubrn`=`000000070005` |\n| `ReferralRequest` with additional requirements listed | `ubrn`=`000000070011` |\n| `ReferralRequest` with attachments unavailable to download | `ubrn`=`000000070012` | \n", + "summary": "Retrieve referral request (A005, FHIR STU3)", + "operationId": "a005-retrieve-referral-request", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "unbooked": { + "summary": "Unbooked `ReferralRequest`", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/Unbooked.json" + } + }, + "booked-dbs": { + "summary": "`ReferralRequest` booked to directly-bookable service", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/BookedDBS.json" + } + }, + "booked-ibs": { + "summary": "`ReferralRequest` booked to indirectly-bookable service", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/BookedIBS.json" + } + }, + "deferred-to-provider": { + "summary": "`ReferralRequest` deferred to service provider for booking", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/DeferredToProvider.json" + } + }, + "converted-from-advice-and-guidance": { + "summary": "`ReferralRequest` that was converted from an Advice and Guidance Request", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json" + } + }, + "with-related-referral": { + "summary": "`ReferralRequest` with related ReferralRequest", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/WithRelatedReferral.json" + } + }, + "with-additional-requirements": { + "summary": "`ReferralRequest` with additional requirements", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/WithAdditionalRequirements.json" + } + }, + "with-unavailable-attachments": { + "summary": "Unbooked `ReferralRequest` with attachments unavailable for download", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/WithUnavailableAttachments.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/Task": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nThis endpoint allows an authenticated e-RS user to check ahead of performing an action, \nwhether or not the action is permitted. This endpoint performs a search for available and \nsupported actions that can be *currently* performed, by the *current* e-RS user on a *specific* \nreferral. When a permitted action is returned, the e-RS user could immediately attempt to \nperform a permitted action.\n\nYou SHOULD NOT cache the list of available user actions returned because this endpoint \ngives the *current* actions for the *current* e-RS user, for the referral in context and is therefore, \ntransient; a future call for a different e-RS user, referral, or at a different point in time, \nmight result in a different set of actions, leading to potential failure flows.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Application-restricted, unattended access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nSupported action:\n - Record Review Outcome\n - Cancel Referral\n\n### Healthcare worker, user-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou should obtain a `Unique Booking Reference Number` (UBRN) before using this endpoint, as the current UBRN version is required.\n\n## Use case\n\nAs an authenticated user\n\nI want to know what actions I might currently perform on a referral prior to attempting to do so\n\nSo that I can review my options, and do not try to persist a prohibited action\n\n## Important information about using this endpoint\n\nThis endpoint can be used to check permitted actions on a referral. Only a select number of results will be returned for which a corresponding action can be performed via the API. Not all actions are currently supported.\n\nAs a referrer, the actions returned can include:\n - Cancel Directly Booked Appointment \n - Cancel Referral\n - Create Appointment\n - Change Shortlist\n - Change Shortlist and Send for Triage\n\nAs a service provider, the actions returned can include:\n - Record Review Outcome\n - Cancel Referral\n\n## Related endpoints\n\nTo retrieve pertinent details relating to a referral:\n - Use [[HYPERLINK_A005]] to retrieve the details of the referral, UBRN and UBRN version.\n\nBelow is a list of actions that could be returned by calling [[HYPERLINK_A029]]\n - Use [[HYPERLINK_A028]] to record a review outcome based on the available clinical information and attachments.\n - Use [[HYPERLINK_A016]] to Book, or if unable, Defer, an appointment to a specific service on the current shortlist, or to make a triage deferral by sending an appointment to a triage service.\n - Use [[HYPERLINK_A031]] to change the shortlist of bookable services on an existing referral.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| --------------------------------------------------- | ---------------------------------------------------------------------------------------- |\n| No \"action\" is available | `focus`=`ReferralRequest/000000070000/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Record Review Outcome\" is available | `focus`=`ReferralRequest/000000070001/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Create Appointment\" is available | `focus`=`ReferralRequest/000000070002/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Change Shortlist\" is available | `focus`=`ReferralRequest/000000070003/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Change Shortlist and Send for Triage\" is available | `focus`=`ReferralRequest/000000070004/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Cancel Referral\" is available | `focus`=`ReferralRequest/000000070005/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Cancel Directly Booked Appointment\" is available | `focus`=`ReferralRequest/000000070006/_history/6`, `intent`=`proposal`, `status`=`ready` |\n", + "summary": "Available actions for user (A029, FHIR STU3)", + "operationId": "a029-available-actions-for-user-list", + "tags": [ + "Change appointment", + "Manage referral", + "Review referral requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "query", + "name": "focus", + "description": "The component describing the ReferralRequest for which the task list is requested for.\n\nPattern:\n\n`ReferralRequest/{ubrn}/_history/{version}`\n\n - The `ubrn` represents the unique booking reference number of the referral request\n - The `version` is the version of the referral request (only the most current version will be accepted)\n", + "required": true, + "schema": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/6" + } + }, + { + "in": "query", + "name": "intent", + "description": "Value must be set to `proposal`\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "proposal" + ], + "example": "proposal" + } + }, + { + "in": "query", + "name": "status", + "description": "The status of the `task`, value must be set to `ready`\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ready" + ], + "example": "ready" + } + } + ], + "responses": { + "200": { + "description": "Bundle containing list of available tasks", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "Bundle resource containing tasks", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "type", + "link", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "604dc1ea-986c-45ec-b36c-cf9d2fabc5c0" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated", + "profile" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" + ], + "example": "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Bundle" + ], + "example": "Bundle" + }, + "type": { + "type": "string", + "enum": [ + "searchset" + ], + "example": "searchset" + }, + "link": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "relation", + "url" + ], + "properties": { + "relation": { + "type": "string", + "enum": [ + "self" + ], + "example": "self" + }, + "url": { + "type": "string", + "example": "_baseUrl_/STU3/Task?focus=ReferralRequest/000000070000/_history/6&intent=proposal&status=ready" + } + } + } + }, + "entry": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ----------------------- | ----------- | --------------------------------------------------- |\n| `CareConnect-Task` | `0..*` | |\n", + "items": { + "title": "CareConnect-Task", + "description": "CareConnect-Task details a single `task` (action available for user).\n", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/STU3/Task/ed4dff57-503c-46ef-9084-4045a23f4c2a" + }, + "resource": { + "title": "CareConnect-Task", + "description": "The Task resource represents a specific task to be performed by the user.", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "intent", + "focus" + ], + "properties": { + "id": { + "type": "string", + "example": "ed4dff57-503c-46ef-9084-4045a23f4c2a" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Task-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Task-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Task" + ], + "example": "Task" + }, + "status": { + "type": "string", + "enum": [ + "ready" + ], + "example": "ready" + }, + "intent": { + "type": "string", + "enum": [ + "proposal" + ], + "example": "proposal" + }, + "focus": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/6" + } + } + }, + "code": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "anyOf": [ + { + "title": "AvailableActionsForUser", + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailableActionsForUser-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailableActionsForUser-1" + }, + "code": { + "type": "string", + "enum": [ + "RECORD_REVIEW_OUTCOME", + "CREATE_APPOINTMENT", + "CHANGE_SHORTLIST", + "CHANGE_SHORTLIST_AND_SEND_FOR_TRIAGE", + "CANCEL_REFERRAL", + "CANCEL_DIRECTLY_BOOKED_APPOINTMENT" + ], + "example": "RECORD_REVIEW_OUTCOME" + }, + "display": { + "type": "string", + "enum": [ + "Record Review Outcome", + "Create Appointment", + "Change Shortlist", + "Change Shortlist and Send for Triage", + "Cancel Referral", + "Cancel Directly Booked Appointment" + ], + "example": "Record Review Outcome" + } + } + } + ] + } + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "match" + ], + "example": "match" + } + } + } + } + } + } + } + }, + "examples": { + "empty": { + "summary": "Empty", + "value": { + "$ref": "../../../examples/availableActionsForUserList/Empty.json" + } + }, + "with-record-review-outcome": { + "summary": "With Record Review Outcome", + "value": { + "$ref": "../../../examples/availableActionsForUserList/WithRecordReviewOutcome.json" + } + }, + "with-create-appointment": { + "summary": "With Create Appointment", + "value": { + "$ref": "../../../examples/availableActionsForUserList/WithCreateAppointment.json" + } + }, + "with-change-shortlist": { + "summary": "With Change Shortlist", + "value": { + "$ref": "../../../examples/availableActionsForUserList/WithChangeShortlist.json" + } + }, + "with-change-shortlist-and-send-for-triage": { + "summary": "With Change Shortlist and Send for Triage", + "value": { + "$ref": "../../../examples/availableActionsForUserList/WithChangeShortlistAndSendForTriage.json" + } + }, + "with-cancel-referral": { + "summary": "With Cancel Referral", + "value": { + "$ref": "../../../examples/availableActionsForUserList/WithCancelReferral.json" + } + }, + "with-cancel-directly-booked-appointment": { + "summary": "With Cancel Directly Booked Appointment", + "value": { + "$ref": "../../../examples/availableActionsForUserList/WithCancelDBAppointment.json" + } + } + } + } + } + }, + "400": { + "description": "Where status code 400 (Bad Request) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| MISSING_PARAMETER | Indicates missing mandatory FHIR search parameter. |\n| HISTORY_NOT_SUPPORTED | Only the current version of the UBRN is permissible. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/_history/{version}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to retrieve a specific version of `ReferralRequest`.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nThe pre-requisites for this endpoint are the same as for endpoint [[HYPERLINK_A005]].\n\nNote: e-RS only supports the retrieval of the most recent version of `ReferralRequest`. You cannot retrieve earlier versions.\n\n## Important notes\n### Attachment availability\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A005]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE | The file is available for download. |\n| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again |\n| THREATS FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n### Receiving an e-Referral Pathway Start Date \n \nThe e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]].\n\nIf a referral was created with an alternate pathway start date, then this will be available in the referral request response.\n\nService providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]].\n\n## Use case\n\nSee [[HYPERLINK_A005]].\n\n## Related endpoints\n\nSee [[HYPERLINK_A005]].\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ------------------------------------- |\n| Unbooked `ReferralRequest` | `ubrn`=`000000070000`, `version`=`5` |\n| `ReferralRequest` booked to directly-bookable service | `ubrn`=`000000070001`, `version`=`5` |\n| `ReferralRequest` booked to indirectly-bookable service | `ubrn`=`000000070002`, `version`=`5` |\n| `ReferralRequest` deferred to service provider for booking | `ubrn`=`000000070003`, `version`=`5` |\n| `ReferralRequest` that was converted from an Advice and Guidance Request | `ubrn`=`000000070004`, `version`=`5` |\n| `ReferralRequest` with related `ReferralRequest` | `ubrn`=`000000070005`, `version`=`5` |\n| `ReferralRequest` with additional requirements listed | `ubrn`=`000000070011`, `version`=`5` |\n| `ReferralRequest` with attachments unavailable to download | `ubrn`=`000000070012`, `version`=`5` | \n", + "summary": "Retrieve referral request (versioned) (A005, FHIR STU3)", + "operationId": "a005-retrieve-referral-request-versioned", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "name": "version", + "in": "path", + "description": "The version of the resource to be retrieved. It must be the latest version of the resource otherwise\n`HISTORY_NOT_SUPPORTED` error will be returned (HTTP 404 Not Found).\n", + "required": true, + "schema": { + "type": "string", + "example": "5" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "unbooked": { + "summary": "Unbooked `ReferralRequest`", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/Unbooked.json" + } + }, + "booked-dbs": { + "summary": "`ReferralRequest` booked to directly-bookable service", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/BookedDBS.json" + } + }, + "booked-ibs": { + "summary": "`ReferralRequest` booked to indirectly-bookable service", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/BookedIBS.json" + } + }, + "deferred-to-provider": { + "summary": "`ReferralRequest` deferred to service provider for booking", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/DeferredToProvider.json" + } + }, + "converted-from-advice-and-guidance": { + "summary": "`ReferralRequest` that was converted from an Advice and Guidance Request", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json" + } + }, + "with-related-referral": { + "summary": "`ReferralRequest` with related ReferralRequest", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/WithRelatedReferral.json" + } + }, + "with-additional-requirements": { + "summary": "`ReferralRequest` with additional requirements", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/WithAdditionalRequirements.json" + } + }, + "with-unavailable-attachments": { + "summary": "Unbooked `ReferralRequest` with attachments unavailable for download", + "value": { + "$ref": "../../../examples/retrieveReferralRequest/responses/WithUnavailableAttachments.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found - Resource not found for ID provided or Resource version does not match version requested." + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/Binary/{attachmentLogicalID}": { + "get": { + "deprecated": true, + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n **This endpoint has now been deprecated please use [[HYPERLINK_A042]] instead.**\n\nUse this endpoint to retrieve a file that is attached to a referral or advice request.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n\n## Pre-requisites\n### Authentication\n#### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application.\n\n#### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user or application and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n### Attachment availability\nIn order to use this endpoint, the attachment to be retrieved must be available for download. Attachments are only made available once an uploaded file has been validated and successfully scanned for malware. A request to retrieve an attachment that is not available for download will result in a 422 error being returned. See the Response section for further information.\n\nThe availability status of an attachment can be retrieved via any endpoint that provides details of an attachment in the success response. Details of the availability statuses that may be returned via these endpoints can be found in the specification for [[HYPERLINK_A005]].\n\nPrior to retrieving an attachment, you will need to have retrieved the referral or advice request the attachment is associated with (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example). Referrals and advice requests include resolvable URLs to the files currently attached to them, which can be used with this endpoint to retrieve the attachments themselves.\n\n### Maximum file size\n\n The [[HYPERLINK_A006]] endpoint allows you to retrieve attachments up to a maximum file size of 5MB (5242880 bytes). Attempting to retrieve a file over this limit will lead to a 422 error being returned. See the Response section for further information. Due to this, prior to calling this endpoint, the size of the attachment being retrieved should first be validated so that this error can be avoided.\n\nFiles that are larger than 5MB can be downloaded via the [[HYPERLINK_A042]] endpoint or the e-RS web-based professional application.\n\n## Important notes\n\nA referral pathway in e-RS can be made up of more than one UBRN. \nFor example, a referral is booked and seen in a general knee clinical assessment service (UBRN #1), \nand the service decides to onward refer to a more specialist knee miniscus service (UBRN #2). \nThis would result in two UBRNs for the referral pathway in this example (but there could be more related UBRNs if onward referred multiple times).\n\nAs such, it is important that all clinical information is obtained from across all the related UBRNs referenced in [[HYPERLINK_A005]]. \nYou can do this using the following endpoints:\n\n - [[HYPERLINK_A007]]\n - [[HYPERLINK_A006]]\n\nNote: It is possible that the initial UBRN may be the only one in the referral pathway to have clinical information and/or attachments associated.\n\nThe [[HYPERLINK_A006]] endpoint allows you to retrieve attachments up to a maximum file size of 5MB (5242880 bytes), subject to the attachment being available for download. Attempts to retrieve an attachment that is not available, or exceeds the maximum file size, will lead to a 422 error being returned. See the Response section for further information.\n\n## Use case\n\nAs an authenticated user\n\nI need to retrieve a clinical attachment associated with a referral\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\n\nYou can retrieve a clinical information summary for a referral using [[HYPERLINK_A007]].\n\n## Sandbox test scenarios\n\nThe sandbox for this endpoint is a simple implementation that only supports success cases.\n\nA successful response will always be returned, provided the Binary ID is in a valid format. The Availability Status of a file is not considered in the sandbox and a file will always be available for retrieval.\n\nSuccessful responses will always return the same example PDF file.\n", + "summary": "Retrieve attachment (A006, FHIR STU3) [deprecated]", + "operationId": "a006-retrieve-attachment", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "path", + "name": "attachmentLogicalID", + "description": "Reference to attachment as provided in the output from [[HYPERLINK_A005]]\n", + "required": true, + "schema": { + "type": "string" + }, + "examples": { + "uuid-format": { + "value": "c5d2d200-7613-4a69-9c5f-1bb68e04b8d8", + "summary": "ID of an attachment utilising UUID ID format." + }, + "legacy-format": { + "value": "att-70000-70001", + "summary": "ID of an attachment utilising the legacy ID format." + } + } + } + ], + "responses": { + "200": { + "description": "Response contains the binary stream of the file attachment requested.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Disposition": { + "description": "The description of the type of content provided.\n", + "required": true, + "schema": { + "type": "string", + "example": "attachment; filename=\"000000070000_Appointment_Confirmation_Summary_20210603121353.pdf\"" + } + }, + "Content-Length": { + "description": "The length of the response.\n", + "required": true, + "schema": { + "type": "string", + "example": "3111" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "text/plain", + "text/html", + "application/pdf", + "text/xml", + "text/rtf", + "audio/basic", + "audio/mpeg", + "image/png", + "image/gif", + "image/jpeg", + "image/tiff", + "video/mpeg", + "application/msword", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "application/dicom" + ], + "example": "text/plain" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + }, + "example": "This is some example text." + }, + "text/html": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/rtf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/basic": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/gif": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/tiff": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/msword": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/dicom": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| FILE_SIZE_ERROR | The file requested is larger than 5MB (5242880 bytes) so cannot be retrieved via this endpoint. Files larger than 5MB can be downloaded via the [[HYPERLINK_A042]] endpoint or the e-RS web-based professional application. |\n| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |\n| THREATS_FOUND | The file has been quarantined after detecting a threat and cannot be retrieved. Contact the organisation that uploaded the file to resolve the issue and get the information you need. Details of who uploaded the file can be retrieved via any endpoint that provides details of an attachment in the success response (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example) |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved. Contact the organisation that uploaded the file to resolve the issue and get the information you need. Details of who uploaded a file can be retrieved via any endpoint that provides details of an attachment in the success response (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example)
Validation can fail because the:\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/R4/Binary/{id}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve a file that is attached to a referral or advice request.\n\nReferral information can also include:\n - Structured clinical information added by an integrated primary care system\n - Service provider activity\n - Advice and guidance conversation\n\nThis additional clinical information must be retrieved via [[HYPERLINK_A007]]\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted, unattended access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user or application and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n### Attachment availability\nTo use this endpoint, the attachment must be available for download. Attachments are only available after successful validation and malware scans. A request to retrieve an attachment that is not available for download will result in a 400 error. See the Response HTTP 400 section for further information.\n\nThe availability status of an attachment can be retrieved via any endpoint that provides details of an attachment in the success response. Details of the availability statuses that may be returned via these endpoints can be found in the specification for [[HYPERLINK_A005]].\n\nPrior to retrieving an attachment, you will need to have retrieved the referral or advice request the attachment is associated with (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example). Referrals and advice requests include resolvable URLs to the files currently attached to them, which can be used with this endpoint to retrieve the attachments themselves.\n\n## Support for a temporary redirect\nThis endpoint makes use of a HTTP 307 temporary redirect. It redirects the caller to a temporary location from which the file contents can be downloaded directly.\n\nThe temporary location is only valid for a short period of time and should be used immediately. \n\nCallers of this endpoint must ensure they:\n - follow this redirect to retrieve the file\n - do not cache the temporary location\n - generate a new redirect each time the file is downloaded\n\nSee the Response HTTP 307 section for further information.\n\n## Important notes\nA referral pathway in e-RS can be made up of more than one UBRN. For example: a referral is booked and seen in a general knee clinical assessment service (UBRN #1), and the service decides to onward refer to a more specialist knee meniscus service (UBRN #2). This would result in two UBRNs for the referral pathway. There may be additional related UBRNs if there are multiple onward referrals.\n\nAs such, it is important that all clinical information is obtained from across all the related UBRNs referenced in [[HYPERLINK_A005]]. You can do this using the following endpoints:\n - [[HYPERLINK_A006]]\n - [[HYPERLINK_A007]]\n\nNote: It is possible that the initial UBRN may be the only one in the referral pathway to have clinical information and/or attachments associated.\n\n## Use case \nAs an authenticated user\n\nI need to retrieve a clinical attachment associated with a referral or advice request\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\n - [[HYPERLINK_A005]] to retrieve details of a referral. This includes references to clinical attachments, related referrals and other important data.\n - [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request. This endpoint provides important contextual information about the advice and guidance request (e.g. the service/specialty to which advice has been requested, etc).\n - [[HYPERLINK_A025]] to retrieve the advice and guidance conversation between the referring organisation and service providing organisation.\n - [[HYPERLINK_A007]] to generate a PDF file that summarises clinical information for a referral.\n\n## Sandbox test scenarios\nThe sandbox for this endpoint is a simple implementation that only supports success cases.\n\nInline with the behaviour described in \"Support for a temporary redirect\", the sandbox will return a HTTP 307 temporary redirect. For simplicity, the temporary location will be static and never expire, unlike the live environment.\n\nA successful response will always be returned, provided the Binary ID is in a valid format. The Availability Status of a file is not considered in the sandbox and a file will always be available for retrieval.\n\nSuccessful responses will always return the same example PDF file.\n", + "summary": "Retrieve attachment (A042, FHIR R4)", + "operationId": "a042-retrieve-attachment", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "path", + "name": "id", + "description": "The identifier for the binary.\n", + "required": true, + "schema": { + "type": "string" + }, + "examples": { + "uuid-format": { + "value": "c5d2d200-7613-4a69-9c5f-1bb68e04b8d8", + "summary": "A binary ID utilising the UUID ID format." + }, + "legacy-format": { + "value": "att-70000-70001", + "summary": "A binary ID utilising the legacy ID format." + } + } + } + ], + "responses": { + "307": { + "description": "Response redirects the user agent to a location (via the Location header) in the object store from which the attachment can be downloaded from.", + "headers": { + "x-correlation-id": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "x-request-id": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Location": { + "description": "The attachment location in the object store.", + "required": true, + "schema": { + "type": "string", + "format": "uri" + } + } + } + }, + "400": { + "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| REC_BAD_REQUEST | invalid | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The request could not be processed due to an error. This could be due to either an error with the request or the state of the resource requested. See the diagnostics field for further information. |\n", + "headers": { + "x-correlation-id": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "x-request-id": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "invalid", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_BAD_REQUEST" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "ACCESS_DENIED" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_RELATIONSHIP | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The caller has no legitimate relationship with the resource. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_FORBIDDEN" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-found", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_FOUND" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "429": { + "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "throttled", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "TOO_MANY_REQUESTS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "500": { + "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_SERVER_ERROR" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_UNAVAILABLE" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.generateCRI": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to generate a PDF file that summarises clinical information for a referral.\n\nThis does not include files attached to a referral or advice request. These must be retrieved via [[HYPERLINK_A042]]\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\n## Important note\nA referral pathway in e-RS can be made up of more than one UBRN. For example, a referral is booked and seen in a general knee clinical assessment service (UBRN #1), \nand the service decides to onward refer to a more specialist knee miniscus service (UBRN #2). This would result in two UBRNs for the referral pathway \nin this example (but there could be more related UBRNs if onward referred multiple times).\n\nAs such, it is important that all clinical information is obtained from across all the related UBRNs referenced in [[HYPERLINK_A005]]. \nYou can do this using the following endpoints:\n - [[HYPERLINK_A007]]\n - [[HYPERLINK_A006]]\n\nNote: It is possible that the initial UBRN may be the only one in the referral pathway to have clinical information and/or attachments associated.\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve a clinical information summary (in PDF format) associated with the referral\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\nYou can retrieve clinical attachments that are associated with a referral using [[HYPERLINK_A006]].\n", + "summary": "Retrieve clinical information (A007, FHIR STU3)", + "operationId": "a007-retrieve-clinical-information", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + } + ], + "responses": { + "200": { + "description": "Response contains the binary stream of the clinical information summary (PDF).", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Disposition": { + "description": "The description of the type of content provided.\n", + "required": true, + "schema": { + "type": "string", + "example": "attachment; filename=\"000000070000_Appointment_Confirmation_Summary_20210603121353.pdf\"" + } + }, + "Content-Length": { + "description": "The length of the response.\n", + "required": true, + "schema": { + "type": "string", + "example": "3111" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/pdf" + ], + "example": "application/pdf" + } + } + }, + "content": { + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/HealthcareService/$ers.searchHealthcareServicesForPatient": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to find services that meet the referral needs of a patient.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a `patient`, for example via [[HYPERLINK_PDS]].\n\n## Use case\nAs an authenticated user\n\nI need to find services I can refer the patient to\n\nSo that I can offer the patient appropriate services that meet their referral needs\n\n## Important Notes\nIf using this endpoint for modifying an existing Referral (such as via the [[HYPERLINK_A031]] endpoint for example), you will need to provide the Commissioning Rule Organisation parameter. This ensures that the services returned in the response are valid for use with the Referral. You can obtain the 'Commissioning Rule Organisation' from [[HYPERLINK_A005]].\n\n## Related endpoints\nOnce you have identified appropriate services for the patient you can create a referral by choosing a shortlist of bookable and/or triage services using [[HYPERLINK_A011]]. You may then subsequently be able to use [[HYPERLINK_A016]] to book an appointment to a directly bookable service if an appointment slot is available, defer the booking responsibility to a directly bookable service if no appointment slot is available, or refer a patient into a triage service.\n", + "summary": "Patient service search (A010, FHIR STU3)", + "operationId": "a010-patient-service-search", + "tags": [ + "Refer patient", + "Request advice" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-PatientServiceSearch-Parameters", + "description": "The parameters used in patient services search", + "type": "object", + "required": [ + "meta", + "resourceType", + "parameter" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-PatientServiceSearch-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-PatientServiceSearch-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `RequestType` | `1..1` | |\n| `SortBy` | `1..1` | |\n| `Patient` | `1..1` | |\n| `SearchCriteria` | `1..1` | |\n| `ReferringClinician` | `0..1` | |\n| `CommissioningRuleOrganisation` | `0..1` | Required if searching for services for an existing Referral. This field should be provided using the returned Commissioning Rule Organisation already included on the Referral to ensure the services returned are valid. Note this field is not supported when searching with the `ADVICE_AND_GUIDANCE_REQUEST` request type. |\n", + "items": { + "anyOf": [ + { + "title": "RequestType", + "description": "The type of request in e-RS which this service search is aimed at creating or updating. \nThe options are appointment request (i.e. referral) or advice and guidance request. \nServices may support one or the other or both and will be filtered accordingly.\n", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "requestType" + ], + "example": "requestType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestType-1" + }, + "code": { + "type": "string", + "enum": [ + "APPOINTMENT_REQUEST", + "ADVICE_AND_GUIDANCE_REQUEST" + ], + "example": "APPOINTMENT_REQUEST" + } + } + } + } + }, + { + "title": "SortBy", + "description": "The service search returns the top results according to the sorting requested. \nTherefore, the sorting requested affects the selection of services that are included in the response.\n", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "sortBy" + ], + "example": "sortBy" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-SortBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-SortBy-1" + }, + "code": { + "type": "string", + "enum": [ + "DISTANCE", + "IWT" + ], + "example": "IWT" + }, + "display": { + "type": "string", + "example": "Indicative Appointment Wait Time" + } + } + } + } + }, + { + "title": "Patient", + "description": "Parameter to supply a patient", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + { + "title": "ReferringClinician", + "description": "Parameter to supply a referring clinician", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "referringClinician" + ], + "example": "referringClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "CommissioningRuleOrganisation", + "description": "Parameter to supply a commissioning rule organisation", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningRuleOrganisation" + ], + "example": "commissioningRuleOrganisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "SearchCriteria", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "searchCriteria" + ], + "example": "searchCriteria" + }, + "resource": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "rc-minimal": { + "summary": "Referring Clinician minimal search", + "value": { + "$ref": "../../examples/patientServiceSearch/requests/RcMinimal.json" + } + }, + "rc-search-by-clinical-term": { + "summary": "Referring Clinician search by clinical term", + "value": { + "$ref": "../../examples/patientServiceSearch/requests/RcSearchByClinicalTerm.json" + } + }, + "rc-search-by-named-clinician": { + "summary": "Referring Clinician search by named clinician", + "value": { + "$ref": "../../examples/patientServiceSearch/requests/RcSearchByNamedClinician.json" + } + }, + "rc-search-for-advice-service": { + "summary": "Referring Clinician search for services supporting Advice Requests", + "value": { + "$ref": "../../examples/patientServiceSearch/requests/RcSearchForAdviceService.json" + } + }, + "rca-with-iwt": { + "summary": "Referring Clinician Admin search", + "value": { + "$ref": "../../examples/patientServiceSearch/requests/RcaWithIWT.json" + } + }, + "rc-search-with-commissoning-rule-organisation": { + "summary": "Referring Clinician search with commissioning rule organisation", + "value": { + "$ref": "../../examples/patientServiceSearch/requests/RcSearchWithCommissioningRuleOrganisation.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The response body contains the list of services (if any) that match the search criteria provided", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-FetchServices-List", + "description": "Service search response", + "type": "object", + "required": [ + "meta", + "resourceType", + "status", + "mode", + "entry" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchServices-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchServices-List-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "emptyReason": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/list-empty-reason" + ], + "example": "http://hl7.org/fhir/ValueSet/list-empty-reason" + }, + "code": { + "type": "string", + "enum": [ + "nilknown", + "notasked", + "withheld", + "unavailable", + "notstarted", + "closed" + ], + "example": "nilknown" + }, + "display": { + "type": "string", + "example": "no results" + } + } + } + } + } + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item", + "extension" + ], + "properties": { + "extension": { + "title": "Extension to supply search specific details for a service", + "type": "array", + "items": { + "title": "Extension-eRS-ServiceSearch-ListItem", + "type": "object", + "required": [ + "extension", + "url" + ], + "properties": { + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `DisplayProminently` | `1..1` | |\n| `Distance` | `0..1` | |\n| `IndicativeAppointmentWaitTime` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "DisplayProminently", + "description": "Extension to supply display prominently indicator", + "type": "object", + "required": [ + "url", + "valueBoolean" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "displayProminently" + ], + "example": "displayProminently" + }, + "valueBoolean": { + "type": "boolean", + "example": false + } + } + }, + { + "title": "Distance", + "description": "Extension to supply distance value", + "type": "object", + "required": [ + "url", + "valueUnsignedInt" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "distance" + ], + "example": "distance" + }, + "valueUnsignedInt": { + "type": "integer", + "format": "int32", + "example": 10 + } + } + }, + { + "title": "IndicativeAppointmentWaitTime", + "description": "Extension to supply indicative wait time, only one extension with url value 'indicativeAppointmentWaitTime' will be returned at once", + "type": "object", + "required": [ + "url", + "valueUnsignedInt" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTime" + ], + "example": "indicativeAppointmentWaitTime" + }, + "valueUnsignedInt": { + "type": "integer", + "format": "int32", + "example": 7 + } + } + }, + { + "title": "IndicativeAppointmentWaitTime", + "description": "Extension to supply indicative wait time, only one extension with url value 'indicativeAppointmentWaitTime' will be returned at once", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTime" + ], + "example": "indicativeAppointmentWaitTime" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-IWT-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-IWT-1" + }, + "code": { + "type": "string", + "enum": [ + "LIMITED_AVAILABILITY", + "NOT_APPLICABLE" + ], + "example": "LIMITED_AVAILABILITY" + } + } + } + } + } + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + }, + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSearch-ListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSearch-ListItem-1" + } + } + } + }, + "item": { + "type": "object", + "required": [ + "extension", + "identifier" + ], + "properties": { + "extension": { + "type": "array", + "items": { + "title": "Extension-eRS-ServiceSummaryView", + "description": "Extension to supply service summary view", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSummaryView-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSummaryView-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| -------------------------------- | ----------- | ------------------------------------------ |\n| `SupportedAppointmentType` | `0..1` | |\n| `ServiceName` | `1..1` | |\n| `SupportedRequestFlowType` | `1..2` | |\n| `IndicativeTreatmentWaitTime` | `0..1` | |\n| `BookableType` | `1..1` | |\n| `Location` | `1..1` | |\n| `ReferrerAlert` | `0..1` | |\n| `Exclusions` | `0..1` | |\n| `SuggestedInvestigations` | `0..1` | |\n| `ConditionsTreated` | `0..1` | |\n| `GenderTreated` | `1..1` | Sex treated. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `AdditionalRequirementSupported` | `0..3` | |\n| `ReferralLetterRequired` | `1..1` | |\n| `Specialty` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "SupportedAppointmentType", + "description": "Supported appointment type", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "supportedAppointmentType" + ], + "example": "supportedAppointmentType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "DAY_CASE", + "FIRST_OUTPATIENT", + "ASSESSMENT_SERVICE", + "GPSI", + "AHP_CLINIC", + "DIAGNOSTIC", + "NURSE_CLINIC", + "OPHTHALMOLOGIST", + "TELEPHONE_ASSESSMENT" + ], + "example": "DIAGNOSTIC" + } + } + } + } + } + } + } + }, + { + "title": "ServiceName", + "description": "Name of the service.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "serviceName" + ], + "example": "serviceName" + }, + "valueString": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + }, + { + "title": "SupportedRequestFlowType", + "description": "Services can support one or two Request Flow Types, but not Triage Request and Appointment Request simultaneously.", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "supportedRequestFlowType" + ], + "example": "supportedRequestFlowType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestFlowType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestFlowType-1" + }, + "code": { + "type": "string", + "enum": [ + "APPOINTMENT_REQUEST", + "TRIAGE_REQUEST", + "ADVICE_AND_GUIDANCE_REQUEST" + ], + "example": "APPOINTMENT_REQUEST" + } + } + } + } + } + } + } + }, + { + "title": "IndicativeTreatmentWaitTime", + "description": "Statistical indication of how long Patients have waited before receiving treatment.", + "type": "object", + "required": [ + "url", + "valueUnsignedInt" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "indicativeTreatmentWaitTime" + ], + "example": "indicativeTreatmentWaitTime" + }, + "valueUnsignedInt": { + "type": "integer", + "format": "int32", + "example": 15 + } + } + }, + { + "title": "IndicativeTreatmentWaitTime", + "description": "Statistical indication of how long Patients have waited before receiving treatment.", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "indicativeTreatmentWaitTime" + ], + "example": "indicativeTreatmentWaitTime" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CapacityAlert-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CapacityAlert-1" + }, + "code": { + "type": "string", + "enum": [ + "LOW" + ], + "example": "LOW" + } + } + } + } + } + } + } + }, + { + "title": "BookableType", + "description": "Whether the service is Directly or Indirectly Bookable", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "bookableType" + ], + "example": "bookableType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookableType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookableType-1" + }, + "code": { + "type": "string", + "enum": [ + "DIRECTLY_BOOKABLE", + "INDIRECTLY_BOOKABLE", + "UNSPECIFIED" + ], + "example": "DIRECTLY_BOOKABLE" + } + } + } + } + } + } + } + }, + { + "title": "LinkToNHSWebsite", + "description": "Link to NHS website providing information about the Service such as contact details, map, department, facilities and reviews.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "linkToNHSWebsite" + ], + "example": "linkToNHSWebsite" + }, + "valueString": { + "type": "string", + "example": "https://www.nhs.uk/service-search/other-services/chooseandbook?serviceId=11002" + } + } + }, + { + "title": "Location", + "description": "Service location", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "location" + ], + "example": "location" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier", + "display" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + }, + "display": { + "type": "string", + "example": "Cicero-Clinic" + } + } + } + } + }, + { + "title": "ReferrerAlert", + "description": "Referrer Alert", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrerAlert" + ], + "example": "referrerAlert" + }, + "valueString": { + "type": "string", + "example": "Surgery and post op follow up will be done at Harrogate District Hospital" + } + } + }, + { + "title": "Exclusions", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "exclusions" + ], + "example": "Service Users under the age of 18" + }, + "valueString": { + "type": "string", + "example": "Exclusions" + } + } + }, + { + "title": "SuggestedInvestigations", + "description": "Suggested investigations", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "suggestedInvestigations" + ], + "example": "suggestedInvestigations" + }, + "valueString": { + "type": "string", + "example": "Relevant Xray" + } + } + }, + { + "title": "ConditionsTreated", + "description": "Conditions treated", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "conditionsTreated" + ], + "example": "conditionsTreated" + }, + "valueString": { + "type": "string", + "example": "Hip pain" + } + } + }, + { + "title": "AgeTreated", + "description": "Age range treated", + "type": "object", + "required": [ + "url", + "valueRange" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "ageTreated" + ], + "example": "ageTreated" + }, + "valueRange": { + "type": "object", + "required": [ + "low", + "high" + ], + "properties": { + "low": { + "type": "object", + "required": [ + "value", + "unit" + ], + "properties": { + "value": { + "type": "integer", + "example": 18 + }, + "unit": { + "type": "string", + "enum": [ + "YEARS", + "MONTHS" + ], + "example": "YEARS" + } + } + }, + "high": { + "type": "object", + "required": [ + "value", + "unit" + ], + "properties": { + "value": { + "type": "integer", + "example": 100 + }, + "unit": { + "type": "string", + "enum": [ + "YEARS", + "MONTHS" + ], + "example": "YEARS" + } + } + } + } + } + } + }, + { + "title": "GenderTreated", + "description": "Sex treated", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "genderTreated" + ], + "example": "genderTreated" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GenderTreated-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GenderTreated-1" + }, + "code": { + "type": "string", + "enum": [ + "MALE", + "FEMALE", + "MALE_AND_FEMALE" + ], + "example": "MALE_AND_FEMALE" + } + } + } + } + } + } + } + }, + { + "title": "AdditionalRequirementSupported", + "description": "Additional support services provided by the Organisation where the Service is located at", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "additionalRequirementSupported" + ], + "example": "additionalRequirementSupported" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "TRANSPORT", + "INTERPRETER", + "ADVOCACY" + ], + "example": "ADVOCACY" + } + } + } + } + } + } + } + }, + { + "title": "ReferralLetterRequired", + "description": "Indicates whether the Service requires a referral letter before they consider a referral to be valid", + "type": "object", + "required": [ + "url", + "valueBoolean" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralLetterRequired" + ], + "example": "referralLetterRequired" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "Specialty", + "description": "The specialty supported by the Service", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + } + ] + } + } + } + } + }, + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + }, + "examples": { + "fetch-service-list-single-service": { + "summary": "With single service", + "value": { + "$ref": "../../../examples/patientServiceSearch/responses/FetchServiceListWithSingleService.json" + } + }, + "fetch-service-list-multiple-services": { + "summary": "With multiple services", + "value": { + "$ref": "../../../examples/patientServiceSearch/responses/FetchServiceListWithMultipleServices.json" + } + }, + "fetch-service-list-multiple-request-types": { + "summary": "With multiple supported request flow types", + "value": { + "$ref": "../../../examples/patientServiceSearch/responses/TriageAndAppointmentRequestType.json" + } + }, + "fetch-service-list-with-indicative-appointment-wait-time": { + "summary": "With indicative appointment wait time", + "value": { + "$ref": "../../../examples/patientServiceSearch/responses/WithIndicativeAppointmentWaitTime.json" + } + }, + "fetch-service-list-empty": { + "summary": "Empty result list", + "value": { + "$ref": "../../../examples/patientServiceSearch/responses/EmptyResponse.json" + } + }, + "fetch-advice-services": { + "summary": "With advice service", + "value": { + "$ref": "../../../examples/patientServiceSearch/responses/AdviceServiceSearch.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/$ers.createReferral": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to create a referral by choosing a shortlist of bookable services and/or triage services.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Important notes when creating a referral\nThe maximum amount of services allowed on a given shortlist is 20.\n\nThe act of shortlisting alone will not result in a referral being sent/booked to any of the shortlisted services (even if only one service is shortlisted).\nA shortlist of a single triage service should be avoided as this relies on the patient to progress the referral, potentially leading to a delay to care. Especially if the referral priority is 2WW or Urgent.\n\nUse [[HYPERLINK_A016]] if there is a need to support the sending/booking of the referral into a shortlisted service.\n\n## Important notes when sending an e-Referral Pathway Start Date\nThe e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]].\n\nYou can supply an optional, alternate pathway start date when creating a referral.\n\nThis may be because steps, such as reviews, take place early in your business process. Which means the clock started earlier than when the e-RS referral is created. \nProviding an alternate pathway start date ensures the correct date is recorded and used in other systems.\n\nWhen provided, the pathway start date must be:\n - in the past\n - no longer than 365 days ago\n - calculated in line with [[HYPERLINK_RTT_RULES]]\n\nThis also overrides any e-RS derived date.\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a `patient`, for example via [[HYPERLINK_PDS]].\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Use case\nAs an authenticated user\n\nI need to create a shortlist of bookable services and/or triage services\n\nSo I can initiate my patients referral pathway, allowing the patient to book into one of the shortlisted services.\n\n## Related endpoints\n\nTo allow the patient to progress their referral in their own time, you can generate a letter for the patient by \nusing [[HYPERLINK_A019]]. The letter summarises the current state of the referral and any steps the \npatient may need to follow (e.g. appointment booking instructions).\n\nYou can book an appointment for the patient into a shortlisted directly bookable service using [[HYPERLINK_A015]] and [[HYPERLINK_A016]].\n\nYou can send the referral into a shortlisted triage service using [[HYPERLINK_A016]]. \n\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\nYou can generate a letter for the patient, which summarises the current state of their referral and any steps the patient may need to follow, by using [[HYPERLINK_A019]].\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Create referral (A011, FHIR STU3)", + "operationId": "a011-create-referral", + "tags": [ + "Refer patient" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CreateReferral-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferral-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferral-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `ReferringClinician` | `0..1` | |\n| `Shortlist` | `1..1` | |\n| `IntentionToAddReferralLetter` | `1..1` | | \n| `FirstReminderLetterFollowUpDays` | `1..1` | | \n| `EReferralPathwayStart` | `0..1` | | \n", + "items": { + "anyOf": [ + { + "title": "Patient", + "description": "Parameter to supply a patient", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + { + "title": "ReferringClinician", + "description": "Parameter to supply a referring clinician", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "referringClinician" + ], + "example": "referringClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "Shortlist", + "description": "Parameter to supply a shortlist", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "shortlist" + ], + "example": "shortlist" + }, + "resource": { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + } + } + }, + { + "title": "IntentionToAddReferralLetter", + "description": "Parameter to supply the intention to add referral letter flag", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "intentionToAddReferralLetter" + ], + "example": "intentionToAddReferralLetter" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + }, + "code": { + "type": "string", + "enum": [ + "NEED_TO_ADD_LATER", + "NOT_INTENDING_TO_ADD" + ], + "example": "NEED_TO_ADD_LATER" + } + } + } + } + }, + { + "title": "FirstReminderLetterFollowUpDays", + "description": "Parameter to supply the first reminder follow up days", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "firstReminderLetterFollowUpDays" + ], + "example": "firstReminderLetterFollowUpDays" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 0 + } + } + }, + { + "title": "EReferralPathwayStart", + "description": "Parameter to supply the pathway start date", + "type": "object", + "required": [ + "name", + "valueInstant" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "eReferralPathwayStart" + ], + "example": "eReferralPathwayStart" + }, + "valueInstant": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + } + } + }, + "examples": { + "rc-minimum-request-body": { + "summary": "Referring Clinician - minimum request body", + "value": { + "$ref": "../../examples/createReferral/requests/MinimalRequest.json" + } + }, + "rc-request-body-multi-service-shortlist": { + "summary": "Referring Clinician - request body using multi-service shortlist", + "value": { + "$ref": "../../examples/createReferral/requests/RequestTwentyServices.json" + } + }, + "rc-request-body-mixed-shortlist": { + "summary": "Referring Clinician - request body using mixed service shortlist", + "value": { + "$ref": "../../examples/createReferral/requests/RequestMixedShortlist.json" + } + }, + "create-referral-parameters-twenty-services": { + "summary": "Referring Clinician Admin - minimum request body", + "value": { + "$ref": "../../examples/createReferral/requests/MinimalRequestWithReferringClinician.json" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "A referral created within e-RS.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "referral-request-single-service": { + "summary": "Example with single service", + "value": { + "$ref": "../../../examples/createReferral/responses/ReferralRequest.json" + } + }, + "referral-request-twenty-services": { + "summary": "Example with twenty services", + "value": { + "$ref": "../../../examples/createReferral/responses/ReferralRequestTwentyServices.json" + } + }, + "referral-request-mixed-shortlist": { + "summary": "Example with a shortlist containing bookable and triage services", + "value": { + "$ref": "../../../examples/createReferral/responses/ReferralRequestMixedShortlist.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/$ers.createReferralAndSendForTriage": { + "post": { + "deprecated": true, + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n**This endpoint has now been deprecated please use [[HYPERLINK_A011]] instead.**\n\nUse this endpoint to refer the patient directly to a triage service.\n\nPlease note: this endpoint cannot be used to shortlist bookable services. In order to shortlist bookable services please use [[HYPERLINK_A011]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a `patient`, for example via [[HYPERLINK_PDS]].\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Use case\nAs an authenticated user\n\nI need to send the patient's referral to a triage service for assessment\n\nSo that I can put the patient on the appropriate clinical pathway for the chosen service provider.\n\n## Related endpoints\n\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\nYou can generate a letter for the patient by using [[HYPERLINK_A019]]. \nThe letter summarises the current state of the referral and any steps the patient may need to follow.\n\nYou can calculate the date when the patient will need to be contacted (by the triage service) using reference data from [[HYPERLINK_A004]].\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Create referral and send for triage (A021, FHIR STU3) [deprecated]", + "operationId": "a021-create-referral-request-and-send-for-triage", + "tags": [ + "Refer patient" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CreateReferralAndSendForTriage-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferralAndSendForTriage-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferralAndSendForTriage-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `ReferringClinician` | `0..1` | |\n| `Shortlist` | `1..1` | |\n| `IntentionToAddReferralLetter` | `1..1` | | \n| `FirstReminderLetterFollowUpDays` | `1..1` | | \n", + "items": { + "anyOf": [ + { + "title": "Patient", + "description": "Parameter to supply a patient", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + { + "title": "ReferringClinician", + "description": "Parameter to supply a referring clinician", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "referringClinician" + ], + "example": "referringClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "Shortlist", + "description": "Parameter to supply a shortlist. When sending for triage, \nthe shortlist must contain exactly one service, and this must support the 'triage request flow'.\n", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "shortlist" + ], + "example": "shortlist" + }, + "resource": { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + } + } + }, + { + "title": "IntentionToAddReferralLetter", + "description": "Parameter to supply the intention to add referral letter flag.\nWhen sending for triage, a referral letter is always required, therefore the only acceptable value is NEED_TO_ADD_LATER.\n", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "intentionToAddReferralLetter" + ], + "example": "intentionToAddReferralLetter" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + }, + "code": { + "type": "string", + "enum": [ + "NEED_TO_ADD_LATER" + ], + "example": "NEED_TO_ADD_LATER" + } + } + } + } + }, + { + "title": "FirstReminderLetterFollowUpDays", + "description": "Parameter to supply the first reminder follow up days. When sending for triage, \nthe only acceptable value is 0, which means no follow up letter will be sent, \nas the patient does not need to book an appointment.\n", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "firstReminderLetterFollowUpDays" + ], + "example": "firstReminderLetterFollowUpDays" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 0 + } + } + } + ] + } + } + } + }, + "examples": { + "parameters": { + "summary": "Referring Clinician creates referral to a Triage service", + "value": { + "$ref": "../../examples/createReferralAndSendForTriage/requests/Parameters.json" + } + }, + "parameters-with-named-clinician": { + "summary": "Referring Clinician Admin minimum call", + "value": { + "$ref": "../../examples/createReferralAndSendForTriage/requests/ParametersWithNamedClinician.json" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "A referral created within e-RS.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "referral-request-with-appointment": { + "summary": "Basic example", + "value": { + "$ref": "../../../examples/createReferralAndSendForTriage/responses/ReferralRequest.json" + } + }, + "referral-request-with-named-clinician": { + "summary": "Example with named clinician in search criteria", + "value": { + "$ref": "../../../examples/createReferralAndSendForTriage/responses/ReferralRequestWithNamedClinician.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/Slot": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve available appointment slots for a service.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a directly bookable `service` that is on the current referral shortlist. You can do this by using [[HYPERLINK_A005]].\n\n## Use case\n\nAs an authenticated user\n\nI need to retrieve a list of available appointment slots for a service\n\nSo that I can offer them to the patient for booking.\n\n## Important note\nYou need to provide the 'commissioning rule organisation' when calling [[HYPERLINK_A015]] to ensure only suitable slots are returned. You can obtain the 'commissioning rule organisation' from [[HYPERLINK_A005]].\n\nWhen slots are retrieved using this endpoint, they can include slots with or without a named clinician associated with them. Your integrated application must support both scenarios.\n\nSlots with a named clinician will have an additional \"actor\" which defines the SDS User ID of the clinician, this will be on the Schedule associated to the Slot.\n\n## Related endpoints\n\nYou can book an appointment to an available slot using [[HYPERLINK_A016]].\n\nYou can defer booking to a directly bookable service using [[HYPERLINK_A016]] but only in the following circumstances:\n - when the service has no available slots\n - when trying to book an appointment into a service, the slot advertised is no longer available\n - when trying to book an appointment into a service, no response is received within message timeout period (currently 2 minutes)\n\n## Known Issues\nThis endpoint is using the :Practitioner search parameter. The \"schedule.actor\" search parameter is incorrectly using the \":Practitioner\" modifier. As per the [FHIR standard](https://hl7.org/fhir/R4/) the \":identifier\" modifier should be used when searching to indicate that an Identifer is used rather than a literal, relative, internal or absolute reference. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request Query Parameters | Response |\n| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |\n| Minimum slot search | `schedule.actor:HealthcareService`=`12000`, `appointmentType`=`ROUTINE`, `_count`=`20`, `status`=`free`, `page`=`1` | Illustrates minimum usage/parameters with concise, minimal response. |\n| Empty slot search response | `schedule.actor:HealthcareService`=`10000`, `appointmentType`=`ROUTINE`, `_count`=`20`, `status`=`free`, `page`=`1` | Illustrates how a 'no slots' response appears. |\n| Multipage slot search (page 1) | `schedule.actor:HealthcareService`=`11000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`1` | Illustrates first page of multi-page response. |\n| Multipage slot search (page 2) | `schedule.actor:HealthcareService`=`11000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`2` | Illustrates second page of multi-page response. |\n| Multipage slot search (invalid page 5) | `schedule.actor:HealthcareService`=`11000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`5` | Illustrates error when page is outside of valid range. |\n| Multi schedule response | `schedule.actor:HealthcareService`=`13000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`1` | Illustrates response when there is >1 Schedule: one Schedule is for slots with no associated clinician and the other does have an associated clinician. |\n| Slot clinician search | `schedule.actor:HealthcareService`=`14000`, `schedule.actor:Practitioner`=`921600556514`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`1` | Illustrates search for clinician-specific slots |\n", + "summary": "Retrieve appointment slots (A015, FHIR STU3)", + "operationId": "a015-retrieve-appointment-slots", + "tags": [ + "Arrange appointment" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Comm-Rule-Org", + "description": "To retrieve accurate slot information for a specific ReferralRequest the code from the ReferralRequest's 'Extension-eRS-Commissioning-Rule-Org-1' field should be passed to the slot search in this field otherwise slots which are, in fact, unbookable for that ReferralRequest may be returned\n", + "required": true, + "schema": { + "type": "string", + "example": "R68" + } + }, + { + "in": "query", + "name": "schedule.actor:HealthcareService", + "description": "A single service ID is required to indicate the service for which appointment slots are required.\n", + "required": true, + "schema": { + "type": "string", + "example": "11000" + } + }, + { + "in": "query", + "name": "appointmentType", + "description": "The priority of the appointment slots.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "ROUTINE" + } + }, + { + "in": "query", + "name": "status", + "description": "The status of the appointment slots required must be supplied. This must indicate that 'free' slots are required.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "free" + ], + "example": "free" + } + }, + { + "in": "query", + "name": "_count", + "description": "The pageSize is the maximum number of results (i.e. slots) that should be returned by this call. This value must be in the range of 1-100. 100 is the maximum slots available per API call.\n**Note:** Page contents cannot be guaranteed to be contiguous with no gaps or duplicates since the availability of slots may change between calls to the API.\n", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "format": "int32", + "example": 5 + } + }, + { + "in": "query", + "name": "page", + "description": "The number of the page required to be returned, starting at 1.\n", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "format": "int32", + "example": 1 + } + }, + { + "in": "query", + "name": "schedule.actor:Practitioner", + "description": "Slots in e-RS may be allocated to a clinician and is set in the service provider's PAS. \nIf a named clinician is supplied (by the UUID), the appointment slots returned are constrained to slots for which this clinician is allocated to the appointment slot. \nThe clinician must be a named clinician for the selected service.\n", + "required": false, + "schema": { + "type": "string", + "example": "921600556514" + } + }, + { + "in": "query", + "name": "_include", + "description": "An optional URL parameter to cause service/clinician information to be returned ('_include=Slot:schedule') is recognised (i.e. causes no error and is understood by e-RS) but e-RS will return a Schedule for each Slot whether this parameter is present or not.\n", + "required": false, + "schema": { + "type": "string", + "example": "Slot:schedule" + } + } + ], + "responses": { + "200": { + "description": "The Response contains a FHIR 'Bundle' that, in turn, contains 'Slot' resources where each 'Slot' resource includes the 'Reference' to the slot and the slot's 'start' and 'end' times.\n\nThe Response Bundle also contains one or more 'Schedule' resources each of which is used to indicate which allocated clinician a Slot is associated with (if any). \nThe 'Schedule' also indicates the Service Id that will be the same Service for which the Slot search was performed.\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "Bundle resource containing appointment slots", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "type", + "total", + "link", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "08acc887-6a7b-4b38-8f50-022e41319efe" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated", + "profile" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" + ], + "example": "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Bundle" + ], + "example": "Bundle" + }, + "type": { + "type": "string", + "enum": [ + "searchset" + ], + "example": "searchset" + }, + "total": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 3 + }, + "link": { + "type": "array", + "minItems": 1, + "maxItems": 3, + "items": { + "type": "object", + "required": [ + "relation", + "url" + ], + "properties": { + "relation": { + "type": "string", + "enum": [ + "self", + "previous", + "next" + ], + "example": "self" + }, + "url": { + "type": "string", + "example": "_baseUrl_/STU3/Slot?schedule.actor%3AHealthcareService=11010&appointmentType=ROUTINE&_count=10&status=free&_include=Slot%3Aschedule&page=1" + } + } + } + }, + "entry": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Slot` | `1..*` | |\n| `Schedule` | `1..*` | |\n", + "items": { + "anyOf": [ + { + "title": "Slot", + "description": "Slot resource includes the 'Reference' to the slot and the slot's 'start' and 'end' times.\n", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/STU3/Slot/11000010" + }, + "resource": { + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "identifier", + "schedule", + "status", + "start", + "end" + ], + "properties": { + "id": { + "type": "string", + "example": "11000009" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Slot" + ], + "example": "Slot" + }, + "identifier": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/alternative-slot" + ], + "example": "https://fhir.nhs.uk/Id/alternative-slot" + }, + "value": { + "type": "string", + "example": "USRN-11000009" + } + } + } + }, + "schedule": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Schedule/11000-921600556514" + } + } + }, + "status": { + "type": "string", + "enum": [ + "free" + ], + "example": "free" + }, + "start": { + "type": "string", + "format": "date-time", + "example": "2021-05-19T18:00:00.000Z" + }, + "end": { + "type": "string", + "format": "date-time", + "example": "2021-05-19T19:00:00.000Z" + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "match" + ], + "example": "match" + } + } + } + } + }, + { + "title": "Schedule", + "description": "Schedule resource is used to indicate which allocated clinician a Slot is associated with (if any). \nThe 'Schedule' also indicates the Service Id that will be the same Service for which the Slot search was performed\n", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/STU3/Schedule/11000-921600556514" + }, + "resource": { + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "identifier", + "actor" + ], + "properties": { + "id": { + "type": "string", + "example": "11000-921600556514" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Schedule-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Schedule-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Schedule" + ], + "example": "Schedule" + }, + "identifier": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ers-schedule" + ], + "example": "https://fhir.nhs.uk/Id/ers-schedule" + }, + "value": { + "type": "string", + "example": "11000-921600556514" + } + } + } + }, + "actor": { + "type": "array", + "minItems": 1, + "maxItems": 2, + "items": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "anyOf": [ + { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + ] + } + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "include" + ], + "example": "include" + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "minimum": { + "summary": "Minimum slot search", + "value": { + "$ref": "../../../examples/retrieveAppointmentSlots/responses/Minimum.json" + } + }, + "empty": { + "summary": "Empty slot search response", + "value": { + "$ref": "../../../examples/retrieveAppointmentSlots/responses/NoSlots.json" + } + }, + "page1of2": { + "summary": "Multipage slot search (page 1)", + "value": { + "$ref": "../../../examples/retrieveAppointmentSlots/responses/Page1PageSize5.json" + } + }, + "page2of2": { + "summary": "Multipage slot search (page 2)", + "value": { + "$ref": "../../../examples/retrieveAppointmentSlots/responses/Page2PageSize5.json" + } + }, + "multi-schedule": { + "summary": "Multi schedule response", + "value": { + "$ref": "../../../examples/retrieveAppointmentSlots/responses/Page1With2Schedules.json" + } + }, + "slot-clinician-search": { + "summary": "Slot clinician search", + "value": { + "$ref": "../../../examples/retrieveAppointmentSlots/responses/SlotClinicianSearch.json" + } + } + } + } + } + }, + "400": { + "description": "Where status code 400 (Bad Request) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| MISSING_PARAMETER | Indicates missing mandatory FHIR search parameter. |\n| MISSING_HEADER | Indicates missing mandatory HTTP header. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| SERVICE_UNAVAILABLE | Indicates that a service is no longer available. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "INVALID_VALUE", + "display": "Invalid value" + } + ] + }, + "diagnostics": "'Page Number' (5) is invalid." + } + ] + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/Appointment": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to book an appointment to a directly bookable service if an appointment slot is available, defer the booking responsibility to a directly bookable service if no appointment slot is available, or refer a patient into a triage service. \n\nIt is not possible to book into an indirectly bookable service using this endpoint. The patient will need to contact the service provider on the telephone number provided on [[HYPERLINK_A019]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to check if the service is directly bookable, indirectly bookable, or triage by either using [[HYPERLINK_A033]] or [[HYPERLINK_A035]]. You can then offer appropriate actions to authenticated users, i.e. the ability to book an appointment into a directly bookable service if an appointment slot is available, defer the booking responsibility to a directly bookable service if no appointment slot is available, refer a patient into a triage service.\n\nIf the service is directly bookable, you need to retrieve available appointment slots for the service using [[HYPERLINK_A015]].\n\nYou need to use the Unique Booking Reference Number (UBRN) of a referral request in order to use this endpoint. \n\n## Important note when deferring to provider\n\nYou should only defer booking to a directly bookable service in the following circumstances:\n - when the service has no available slots *or*\n - when trying to book an appointment into a service, the slot advertised is no longer available *or*\n - when trying to book an appointment into a service, no response is received within the message timeout period (currently 2 minutes)\n\n## Important note when booking slots\n\nWhen appointment slots are booked using this endpoint, it may be necessary to provide the named clinician details. This is because slots can be setup with or without a named clinician. Your integrated application must support both scenarios.\n\nWhen booking a slot using [[HYPERLINK_A016]], the named clinician details must be added to the \"Appointment.partcipant\" list. As shown in the \"Booking with named clinician\" example.\n\n## Use case\nAs an authenticated user\n\nI need to be able to\n - Book an appointment into an available appointment slot for a directly bookable service *or*\n - Defer the booking responsibility to a directly bookable service if no appointment slot is available *or*\n - Refer the patient into a triage service\n\nSo I can progress my patient's care at that service.\n\n## Related endpoints\nYou can generate a letter for the patient, summarising the current state of their referral and any steps \nthe patient may need to follow using [[HYPERLINK_A019]].\n\nWhere deferring the booking responsibility to a directly bookable service, or referring the patient into a triage service, you can calculate the date when the patient can expect to be contacted (by the receiving service) using reference data from [[HYPERLINK_A004]].\n\n ## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Book or defer appointment (A016, FHIR STU3)", + "operationId": "a016-book-or-defer-appointment", + "tags": [ + "Arrange appointment", + "Arrange triage" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + "examples": { + "minimal-booking": { + "summary": "Minimum booking", + "value": { + "$ref": "../../examples/bookOrDeferAppointment/requests/MinimalBooking.json" + } + }, + "minimal-deferral": { + "summary": "Minimum deferral", + "value": { + "$ref": "../../examples/bookOrDeferAppointment/requests/MinimalDeferral.json" + } + }, + "triage-deferral": { + "summary": "Triage deferral", + "value": { + "$ref": "../../examples/bookOrDeferAppointment/requests/TriageDeferral.json" + } + }, + "booking-with-named-clinician": { + "summary": "Booking with named clinician", + "value": { + "$ref": "../../examples/bookOrDeferAppointment/requests/BookingWithNamedClinician.json" + } + }, + "deferral-with-slot-reference": { + "summary": "Deferral with slot reference", + "value": { + "$ref": "../../examples/bookOrDeferAppointment/requests/DeferralWithSlotReference.json" + } + }, + "deferral-booking-attempt-problem": { + "summary": "Deferral booking attempt problem", + "value": { + "$ref": "../../examples/bookOrDeferAppointment/requests/DeferralBookingAttemptProblem.json" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "An appointment within e-RS.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + "examples": { + "minimal-booking": { + "summary": "Minimum booking", + "value": { + "$ref": "../../../examples/bookOrDeferAppointment/responses/MinimalBooking.json" + } + }, + "minimal-deferral": { + "summary": "Minimum deferral", + "value": { + "$ref": "../../../examples/bookOrDeferAppointment/responses/MinimalDeferral.json" + } + }, + "triage-deferral": { + "summary": "Triage deferral", + "value": { + "$ref": "../../../examples/bookOrDeferAppointment/responses/TriageDeferral.json" + } + }, + "booking-with-named-clinician": { + "summary": "Booking with named clinician", + "value": { + "$ref": "../../../examples/bookOrDeferAppointment/responses/BookingWithNamedClinician.json" + } + }, + "deferral-with-slot-reference": { + "summary": "Deferral with slot reference", + "value": { + "$ref": "../../../examples/bookOrDeferAppointment/responses/DeferralWithSlotReference.json" + } + }, + "deferral-booking-attempt-problem": { + "summary": "Deferral booking attempt problem", + "value": { + "$ref": "../../../examples/bookOrDeferAppointment/responses/DeferralBookingAttemptProblem.json" + } + } + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| SERVICE_UNAVAILABLE | Indicates that a service is no longer available. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| INAPPROPRIATE_SLOT | The slot provided is not suitable. |\n| SLOT_NOT_AVAILABLE | Slot is no longer available. |\n| UNABLE_TO_CONFIRM_APPOINTMENT | An unexpected error prevented eRS from successfully confirming the appointment. |\n| SLOTS_CURRENTLY_AVAILABLE | There are currently future slots available, so you cannot defer to this Service to book. |\n| THIS_SLOT_IS_AVAILABLE | Slot is currently available. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "502": { + "description": "Where status code 502 (Bad Gateway) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_RESPONDED_WITH_ERROR | Error received from PAS. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "PAS_RESPONDED_WITH_ERROR", + "display": "Error received from PAS" + } + ] + }, + "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: ERROR" + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + }, + "504": { + "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "timeout", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "PAS_NOT_RESPONDING", + "display": "No response from PAS" + } + ] + }, + "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" + } + ] + } + } + } + } + } + } + }, + "/STU3/Binary": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to upload a file containing clinical information to e-RS ready to be associated with a referral, an advice and guidance request or an advice and guidance response.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou can only upload file formats that are supported by e-RS. Currently, the supported file formats are:\n\n| File type | File extension(s) |\n| ------------------ | --------------------------- |\n| Plain Text | `.txt` |\n| PDF | `.pdf` |\n| XML Text | `.xml` |\n| RTF Text | `.rtf`, `.rtx` |\n| Basic Audio | `.au` |\n| MPEG audio layer 3 | `.mp3` |\n| PNG Image | `.png` | \n| GIF Image | `.gif` |\n| JPEG Image | `.jpg,` `.jpe`, `.jpeg` |\n| TIFF Image | `.tif`, `.tiff` |\n| MPEG Video | `.mpg`, `.mpeg`, `.mpe` |\n| MSWORD | `.doc`, `.docx` |\n| DICOM | `.dcm` |\n\nCurrently, the maximum file size supported by e-RS is 5MB.\n\n## Use case\n\nAs an authenticated user\n\nI need to upload a referral letter or other clinical information file to e-RS\n\nSo that I can associate the file with an existing referral or advice and guidance request.\n\n## Important notes\n\nThis endpoint **only** performs the file upload and **does not** associate it with a referral. The uploaded file must be explicitly associated with a referral by, for example, using [[HYPERLINK_A012]].\n\nThe resulting URL within e-RS for the uploaded file is returned in the 'Location' header of the response.\n\nRequest header `NHSD-eRS-Referral-ID` - the ID (typically the UBRN) of the referral which the documents are intended for - is non-mandatory, but must be provided if this file is to be attached to an existing request.\n\n## Related endpoints\n\nYou can associate the uploaded file with a specific referral using:\n - [[HYPERLINK_A012]]\n - [[HYPERLINK_A022]]\n - [[HYPERLINK_A028]]\n\nYou can associate the uploaded file with a specific advice and guidance request using:\n - [[HYPERLINK_A044]]\n - [[HYPERLINK_A026]]\n - [[HYPERLINK_A027]]\n", + "summary": "Upload file to document store (A020, FHIR STU3)", + "operationId": "a020-upload-file-to-document-store", + "tags": [ + "Refer patient", + "Request advice", + "Arrange appointment", + "Arrange triage" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "NHSD-eRS-File-Name", + "description": "The name of file being uploaded, including the extension\n", + "required": true, + "schema": { + "type": "string", + "example": "test.txt" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Referral-ID", + "description": "The ID (typically the UBRN) of the referral which the documents are intended for. This must be provided if this file is to be attached to an existing request.\n", + "required": false, + "schema": { + "type": "string", + "example": "000000070000" + } + } + ], + "requestBody": { + "required": true, + "content": { + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + }, + "example": "This is some example text." + }, + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/rtf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/basic": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/gif": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/tiff": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/msword": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/dicom": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "201": { + "description": "201 (Created) - success response with no body", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Location": { + "description": "The e-RS file location of the file which has been uploaded.\n", + "required": true, + "schema": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n| FILE_SIZE_ERROR | The file is either empty or too large. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.maintainReferralLetter": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to manage the set of 'referral letter' attachments associated with an existing referral, including adding or removing attachments from a referral.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nAll new files to be associated with a referral must be uploaded first using [[HYPERLINK_A020]] and then linked to the referral using this endpoint.\n\n## Important notes\n\nThis endpoint can be used to associate attachments to a referral that has no existing referral letter attachments. \nIn this case you must upload the file first using [[HYPERLINK_A020]] and then associate it to the referral using this endpoint.\n\nYou can also use this endpoint to modify the *set* of referral letter attachments already associated with a referral. \nIn this case, you must post all referral letter attachments you wish to be (finally) associated to the referral, \nincluding any that were already associated. In other words, this endpoint replaces the set of referral letter \nattachments previously associated - with those specified in your latest request. \nAs such, it is imperative that this call references all the attachments the user wishes to keep, every time it is called.\n\nBelow are three example scenarios which clarify the behaviour of the endpoint when referral attachments are already present on the referral:\n\n1. Let us consider a referral that has two referral letter attachments associated (say \"A.pdf\" and \"B.pdf\"). If \nyou wish to add an additional attachment (say \"C.pdf\"), you must upload the additional attachment \n\"C.pdf\" using [[HYPERLINK_A020]], and then associate attachments \"A.pdf\", \"B.pdf\" and \"C.pdf\" \nvia this endpoint in a single request. That is, all three attachments \"A.pdf\", \"B.pdf\" and \"C.pdf\" \nmust be included in the request to [[HYPERLINK_A012]].\n2. Let us consider a different referral that has two referral letter attachments (say \"D.jpg\" and \"E.jpg\") \nalready associated, and you wish to remove one of them. Let us consider that you wish to remove \"D.jpg\". \nTo do this, you would call [[HYPERLINK_A012]] specifying only \"E.jpg\" in your request. By omitting \n\"D.jpg\" from your request, e-RS will disassociate attachment \"D.jpg\" from the referral and only attachment \"E.jpg\" \nwill remain associated.\n3. Let us now consider a referral that has four referral letter attachments associated (say \"L.doc\", \"M.doc\", \"N.doc\" \nand \"O.doc\"), and you wish to add some more files (say \"P.doc\" and \"Q.doc\") and remove some files (say \"N.doc\" \nand \"O.doc\"). To do this you must upload the additional attachment(s) (\"N.doc\" and \"O.doc\") \nusing [[HYPERLINK_A020]]. Following that successful upload, you must then associate only all \nreferral letter attachments the user wishes to keep (namely \"L.doc\", \"M.doc\", \"P.doc\" and \"Q.doc\") \nin a single request to [[HYPERLINK_A012]]. Attachments not included in the request \n(namely \"N.doc\" and \"O.doc\") will be disassociated from the referral as a result.\n\nAs a developer or software supplier, please ensure your users are made aware or protected from this behaviour. \nFor example, when a referring user wants to update the attachments on a referral, the user should be presented \nwith the currently associated attachments so they can add and/or remove attachments as required.\n\nNote: It is not permissible to remove *all* referral letter attachments leaving zero attachments associated. \nThere must be at least one referral letter attachment associated.\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use case\nAs an authenticated user\n\nI need to be able to manage referral letter attachments associated with a referral\n\nSo I can ensure the service provider has enough information to review/process the referral.\n\n\n## Related endpoints\nDocuments must be uploaded into the e-RS document store using [[HYPERLINK_A020]] before they can be associated \nwith a referral.\n\nYou can check to see what referral letter information has been added to a referral by using [[HYPERLINK_A005]], \n[[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request |\n| ------------------------------------------------------ | ------------------------------------------------------- |\n| Add clinical information for first time (single file) | `ubrn`=`000000070000`, `body` as defined in example 1 |\n| Add clinical information for first time (two files) | `ubrn`=`000000070001`, `body` as defined in example 2 |\n| Update clinical information | `ubrn`=`000000070001`, `body` as defined in example 3 |\n", + "summary": "Maintain referral letter (A012, FHIR STU3)", + "operationId": "a012-maintain-referral-letter", + "tags": [ + "Refer patient", + "Arrange appointment", + "Arrange triage" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-MaintainReferralLetter-Parameters", + "description": "The parameters object used in maintain referral letter endpoint", + "type": "object", + "required": [ + "meta", + "resourceType", + "parameter" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-MaintainReferralLetter-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-MaintainReferralLetter-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `referralLetterFile` | `1..*` | |\n", + "items": { + "title": "referralLetterFile", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "referralLetterFile" + ], + "example": "referralLetterFile" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER" + ], + "example": "REFERRER" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "Blood test results showing an anomaly in the values of xxxx" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "examples": { + "single-file": { + "summary": "1 - Add clinical information (single file)", + "value": { + "$ref": "../../examples/maintainReferralLetter/requests/SingleDocumentReference.json" + } + }, + "two-files": { + "summary": "2 - Add clinical information (two files)", + "value": { + "$ref": "../../examples/maintainReferralLetter/requests/MultipleDocumentReferences.json" + } + }, + "update-files": { + "summary": "3 - Update clinical information (removing one file from example above)", + "value": { + "$ref": "../../examples/maintainReferralLetter/requests/UpdateClinicalInfo.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "withClinicalInformation": { + "summary": "`ReferralRequest` with clinical information (2 files)", + "value": { + "$ref": "../../../examples/maintainReferralLetter/responses/ReferralRequestWithMultipleDocumentReferences.json" + } + }, + "withClinicalInformationFirstTime": { + "summary": "`ReferralRequest` with clinical information (1 file)", + "value": { + "$ref": "../../../examples/maintainReferralLetter/responses/ReferralRequestWithSingleDocumentReference.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "412": { + "description": "Precondition Failed - Mandatory data is missing" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| NO_CHANGES_DETECTED | No changes detected when processing supplied request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.acceptReferral": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint, as a service provider, to accept a referral that is booked into your bookable service and awaiting review.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n### Application-restricted, unattended access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nTo access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review.\n\n## Important notes\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. \n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A013]] can only be used for referrals \nbooked into bookable services, and not the referrals sent into triage services.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\n## Use cases\nAs an authenticated user\n\nI need to accept an inbound referral after its review\n\nSo that I can confirm the patient's referral is appropriate for the current service and booked appointment date/time.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Accept referral (A013, FHIR STU3)", + "operationId": "a013-accept-referral", + "tags": [ + "Review referral requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + } + ], + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "example-response": { + "summary": "Example response", + "value": { + "$ref": "../../../examples/acceptReferral/responses/ExampleResponse.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "412": { + "description": "Precondition Failed - Mandatory data is missing" + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.rejectReferral": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint, as a service provider, to reject a referral that is booked into your bookable service and awaiting review. \nThis returns the referral to the referrer with a mandatory rejection reason and optional user comment to explain why it has been rejected.\n\nConsider using [[HYPERLINK_A022]] instead if you wish to ask your admin team to get the patient into the most appropriate service.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A014]] can only \nbe used for referrals booked into bookable services, and not the referrals sent into triage services.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\nYou need to use [[HYPERLINK_A004]] to retrieve a list of rejection reason reference data codes along with their user-friendly display names. To find \nrelevant rejection reasons, obtain reference data from `APPOINTMENT-CANCELLATION-REASON` and filter as follows:\n\n - `appointmentBookingCancellationReasonType` must be `PROVIDER_REJECT`\n - `effectiveFrom` must be in the past, and\n - `effectiveTo` must not be in the past\n\n## Important notes\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use cases\nAs an authenticated user\n\nI need to reject an inbound referral back to the referrer after its review with an explanation of why\n\nSo that the referrer can address the reason for rejection and progress the referral appropriately.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Reject referral (A014, FHIR STU3)", + "operationId": "a014-reject-referral", + "tags": [ + "Review referral requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-RejectReferral-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RejectReferral-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RejectReferral-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `rejectionReason` | `1..1` | The reason why the referral is being rejected |\n| `rejectionComments` | `0..1` | This may be mandatory if mandatory comment indicator is set to 'Yes' for the Rejection Reason Type selected. Maximum 2000 characters. |\n| `appointmentCancelledInPAS` | `0..1` | This flag is mandatory for indirectly bookable services | \n", + "items": { + "anyOf": [ + { + "title": "rejectionReason", + "description": "Parameter to supply a rejectionReason", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "rejectionReason" + ], + "example": "rejectionReason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "TREATMENT_NO_LONGER_REQUIRED" + } + } + } + } + }, + { + "title": "rejectionComments", + "description": "Parameter to supply the rejectionComments", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "rejectionComments" + ], + "example": "rejectionComments" + }, + "valueString": { + "type": "string", + "example": "Condition of the patient has improved. No further action needed" + } + } + }, + { + "title": "appointmentCancelledInPAS", + "description": "Parameter to supply a appointmentCancelledInPAS", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "appointmentCancelledInPAS" + ], + "example": "appointmentCancelledInPAS" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + } + ] + } + } + } + }, + "examples": { + "basic-example-ibs": { + "summary": "Basic example for IBS", + "value": { + "$ref": "../../examples/rejectReferral/requests/BasicExampleIbs.json" + } + }, + "basic-example-dbs": { + "summary": "Basic example for DBS", + "value": { + "$ref": "../../examples/rejectReferral/requests/BasicExampleDbs.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "example-response-ibs": { + "summary": "Example response for IBS", + "value": { + "$ref": "../../../examples/rejectReferral/responses/ExampleResponseIbs.json" + } + }, + "example-response-dbs": { + "summary": "Example response for DBS", + "value": { + "$ref": "../../../examples/rejectReferral/responses/ExampleResponseDbs.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "412": { + "description": "Precondition Failed - Mandatory data is missing" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNABLE_TO_CANCEL_APPOINTMENT | System is unable to cancel the appointment. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + }, + "504": { + "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "timeout", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "PAS_NOT_RESPONDING", + "display": "No response from PAS" + } + ] + }, + "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.generatePatientLetter": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to download a PDF format letter for the patient summarising the current state of their referral and any steps the patient may need to follow.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\n## Use case\n\nAs an authenticated user\n\nI need to generate the patient letter including up-to-date details about their referral and any steps the patient may need to follow\n\nSo that I can pass it to the patient.\n", + "summary": "Generate patient letter (A019, FHIR STU3)", + "operationId": "a019-generate-patient-letter", + "tags": [ + "Refer patient", + "Arrange appointment", + "Arrange triage" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + } + ], + "responses": { + "200": { + "description": "Response contains the binary stream of the generated patient letter.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Disposition": { + "description": "The description of the type of content provided.\n", + "required": true, + "schema": { + "type": "string", + "example": "attachment; filename=\"000000070000_Appointment_Confirmation_Summary_20210603121353.pdf\"" + } + }, + "Content-Length": { + "description": "The length of the response.\n", + "required": true, + "schema": { + "type": "string", + "example": "3111" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/pdf" + ], + "example": "application/pdf" + } + } + }, + "content": { + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_ACCESS_CODE | The patient does not have an access code/password to log onto the patient portal. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.cancelAppointmentActionLater": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint, as a service provider, to task your admin team to rebook/redirect a referral that is booked \ninto your bookable service and awaiting review.\n\nNote: this will also cancel the current appointment.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A022]] can \nonly be used for referrals booked into bookable services, and not the referrals sent into triage services.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\nIf you want to include attachments with the admin task, you need to use [[HYPERLINK_A020]] so they are \nready to be associated when this endpoint is called.\n\n## Use cases\nAs an authenticated user\n\nI need to task my admin team to rebook/redirect a referral I have reviewed (whilst also cancelling the current appointment)\n\nSo that I can progress the patient's care along the most appropriate referral pathway.\n\n## Important notes\n - The priority of the referral can be changed as part of this endpoint.\n - A comment must be added to explain to the administrator what is required and can include optional attachments.\n - The current appointment is cancelled as part of this endpoint. If the current appointment is booked to an indirectly\n bookable service, you must indicate whether the appointment has been cancelled on the local provider system. \n If indicated as not cancelled, the referral will be added to the 'Indirectly Booked Appointments to Cancel in PAS' \n worklist to task the admin team to do so.\n - When this endpoint is successfully used, an entry will be added to the service providers 'Appointments For Booking' \n worklist for the admin team to action the task. The provider admin team will only be able to progress the referral \n via the e-RS Professional Application user interface (e.g. shortlisting appropriate services for the patient).\n - In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \n The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n - Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Cancel appointment, action later (A022, FHIR STU3)", + "operationId": "a022-cancel-appointment-action-later", + "tags": [ + "Review referral requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-cancelAppointmentActionLater-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-cancelAppointmentActionLater-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-cancelAppointmentActionLater-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------------------- |\n| `priority` | `0..1` | Optionally updates the priority |\n| `appointmentCancelledinPAS` | `0..1` | This flag is mandatory for indirectly bookable services |\n| `comments` | `1..1` | |\n| `providerAttachmentFile` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "priority", + "description": "Parameter to supply a priority", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "appointmentCancelledInPAS", + "description": "Parameter to supply a appointmentCancelledInPAS", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "appointmentCancelledInPAS" + ], + "example": "appointmentCancelledInPAS" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "comments", + "description": "Parameter to supply the comments", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Please contact patient to rebook" + } + } + }, + { + "title": "providerAttachmentFile", + "description": "Parameter to supply an attachment file", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "providerAttachmentFile" + ], + "example": "providerAttachmentFile" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER" + ], + "example": "PROVIDER" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "basic-example-dbs": { + "summary": "Basic example for DBS", + "value": { + "$ref": "../../examples/cancelAppointmentActionLater/requests/MinimalExampleDBS.json" + } + }, + "example-priority-change-and-attachments": { + "summary": "Example for priority change and attachments", + "value": { + "$ref": "../../examples/cancelAppointmentActionLater/requests/PriorityChangeAndWithAttachmentsDBS.json" + } + }, + "basic-example-ibs": { + "summary": "Basic example for IBS", + "value": { + "$ref": "../../examples/cancelAppointmentActionLater/requests/MinimalExampleIBS.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "example-response-dbs": { + "summary": "Example response for DBS", + "value": { + "$ref": "../../../examples/cancelAppointmentActionLater/responses/MinimalExampleDBS.json" + } + }, + "example-priority-change-and-attachments": { + "summary": "Example response for priority change and attachments", + "value": { + "$ref": "../../../examples/cancelAppointmentActionLater/responses/PriorityChangeAndWithAttachmentsDBS.json" + } + }, + "example-response-ibs": { + "summary": "Example response for IBS", + "value": { + "$ref": "../../../examples/cancelAppointmentActionLater/responses/MinimalExampleIBS.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "412": { + "description": "Precondition Failed - Mandatory data is missing" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/CommunicationRequest/$ers.fetchworklist": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve available worklists of advice and guidance requests. Use [[HYPERLINK_A008]] to retrieve available worklists of referral requests.\n\nWorklists provide lists of referral/advice requests that meet certain criteria, typically where a user needs to be aware of something important, \nor to undertake an action, in order to avoid delays to patient care.\n\nService provider organisations can retrieve the contents of their 'Advice and guidance requests' worklist using \nthis endpoint. This worklist contains advice and guidance requests the provider has received and which need actioning. The version of each advice \nrequest in the worklist will also be returned. Note that the version can change due to admin/clinical changes as well as internal e-RS processes.\n\nThere are currently no advice and guidance related worklists available for referring organisations.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nIf a worklist response exceeds 10MB, a successful response will not be returned. This is due to the size limitation on the APIM platform.\n\n## Use case\nAs an authenticated user\n\nI need to retrieve a worklist of advice and guidance requests\n\nSo I can determine which ones I need to take further action on.\n\n## Related endpoints\n\nHaving used this endpoint to retrieve the 'Advice and Guidance Requests' worklist, entries from it can be used as follows:\n - Use [[HYPERLINK_A024]] to retrieve contextual summary details of the advice and guidance request\n - Use [[HYPERLINK_A025]] to retrieve the conversation within the advice and guidance request, including references to attachments\n - Use [[HYPERLINK_A006]] to retrieve clinical attachments for an advice and guidance request\n - Use [[HYPERLINK_A026]] to respond to the referrer supplying advice or requesting further information\n - Use [[HYPERLINK_A027]] to convert the advice and guidance request into a referral. This is only possible if the referrer has authorised the provider to do so\n - Use [[HYPERLINK_A043]] to generate a PDF file overview relating to an advice and guidance request\n", + "summary": "Retrieve advice and guidance requests worklist (A023, FHIR STU3)", + "operationId": "a023-retrieve-a&g-worklist", + "tags": [ + "Review advice and guidance requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-FetchWorklist-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `listType` | `1..1` | |\n| `service` | `0..1` | Mandatory for the application-restricted security pattern |\n| `specialtyAssignedIndicator` | `0..1` | |\n| `specialty` | `0..1` | | \n| `location` | `0..1` | | \n| `clinicianAssignedIndicator` | `0..1` | | \n| `clinician` | `0..1` | | \n", + "items": { + "anyOf": [ + { + "title": "listType", + "description": "Indicates the type of list requested", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "listType" + ], + "example": "listType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| -------------------------------- | ----------- | -------------------------------------- |\n| `eRS-ReferralListSelector` | `0..1` | |\n| `eRS-CommunicationListSelector` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-ReferralListSelector", + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRALS_FOR_REVIEW", + "APPOINTMENT_SLOT_ISSUES", + "REJECTED_TRIAGE_RESPONSE", + "ASSESSMENT_RETURNED_CANCELLED_DNA", + "AWAITING_BOOKING", + "LETTERS_OUTSTANDING" + ], + "example": "REFERRALS_FOR_REVIEW" + } + } + }, + { + "title": "eRS-CommunicationListSelector", + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVICE_AND_GUIDANCE_REQUESTS" + ], + "example": "ADVICE_AND_GUIDANCE_REQUESTS" + } + } + } + ] + } + } + } + } + } + }, + { + "title": "service", + "description": "The service identifier", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + }, + { + "title": "specialtyAssignedIndicator", + "description": "Indicates whether filtering on Specialty is required or not\n", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialtyAssignedIndicator" + ], + "example": "specialtyAssignedIndicator" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + }, + "code": { + "type": "string", + "enum": [ + "ASSIGNED", + "NOT_ASSIGNED" + ], + "example": "NOT_ASSIGNED" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "location", + "description": "The service location identifier", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "location" + ], + "example": "location" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "clinicianAssignedIndicator", + "description": "Indicates whether filtering on Clinician is required or not\n", + "type": "object", + "required": [ + "name", + "valueCodeableConcept" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicianAssignedIndicator" + ], + "example": "clinicianAssignedIndicator" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" + }, + "code": { + "type": "string", + "enum": [ + "ASSIGNED", + "NOT_ASSIGNED" + ], + "example": "NOT_ASSIGNED" + } + } + } + } + } + } + } + }, + { + "title": "clinician", + "description": "The clinician assigned to the Referral Request. If present, the 'clinicianAssignedIndicator' parameter must be set to 'Assigned'", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinician" + ], + "example": "clinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "aAndg-requests": { + "summary": "Advice and guidance requests", + "value": { + "$ref": "../../examples/retrieveAdviceAndGuidanceWorklist/requests/MinimalAdviceAndGuidanceRequests.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The response body contains the list of advice and guidance requests (if any) that match the search criteria provided", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-FetchWorklist-List", + "description": "A list of referrals representing the available worklist items", + "type": "object", + "required": [ + "meta", + "resourceType", + "status", + "mode" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------------------------------------------- |\n| `Practitioner` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n| `Patient` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n", + "items": { + "anyOf": [ + { + "title": "Practitioner", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "Practitioner-021600556514" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Practitioner" + ], + "example": "Practitioner" + }, + "identifier": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + }, + { + "title": "Patient", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "Patient-9912003888" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Patient" + ], + "example": "Patient" + }, + "identifier": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with referral details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070002" + } + } + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ----------------------------------------------------------- | ----------- | ------------------------------------------------------------- |\n| `Extension-eRS-ReferralsforReview-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AppointmentSlotIssues-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested | \n| `Extension-eRS-AdviceAndGuidanceRequests-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-RejectedTriageResponse-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AwaitingBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-LettersOutstanding-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralsforReview-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `requestContextStatus` | `1..1` | |\n| `clinicalInfoFirstSubmitted` | `0..1` | |\n| `clinicalInfoLastUpdated` | `0..1` | |\n| `appointmentStart` | `0..1` | |\n| `allocatedClinician` | `0..1` | |\n| `service` | `1..1` | |\n| `referralRequestVersion` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#Patient-9462979626" + } + } + } + } + }, + { + "title": "namedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#Practitioner-021600556514" + } + } + } + } + }, + { + "title": "eReferralPathwayStart", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "eReferralPathwayStart" + ], + "example": "eReferralPathwayStart" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "clinicalInfoPrinted", + "type": "object", + "required": [ + "url", + "valueBoolean" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoPrinted" + ], + "example": "clinicalInfoPrinted" + }, + "valueBoolean": { + "type": "boolean", + "example": false + } + } + }, + { + "title": "requestContextStatus", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "requestContextStatus" + ], + "example": "requestContextStatus" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "LETTER_CHANGED", + "PRIORITY_CHANGED", + "PRIORITY_AND_LETTER_CHANGED", + "NEVER_REVIEWED" + ], + "example": "NEVER_REVIEWED" + }, + "display": { + "type": "string", + "example": "Never Reviewed" + } + } + } + } + } + } + } + }, + { + "title": "clinicalInfoFirstSubmitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoFirstSubmitted" + ], + "example": "clinicalInfoFirstSubmitted" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "clinicalInfoLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoLastUpdated" + ], + "example": "clinicalInfoLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-03T10:44:42.764Z" + } + } + }, + { + "title": "referralType", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralType" + ], + "example": "referralType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" + }, + "code": { + "type": "string", + "enum": [ + "APPOINTMENT", + "TRIAGE_DEFERRAL" + ], + "example": "TRIAGE_DEFERRAL" + } + } + } + } + } + } + } + }, + { + "title": "appointmentStart", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "appointmentStart" + ], + "example": "appointmentStart" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-02T14:15:00.000Z" + } + } + }, + { + "title": "allocatedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "allocatedClinician" + ], + "example": "allocatedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#Practitioner-021600556514" + } + } + } + } + }, + { + "title": "service", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier", + "display" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Service Name" + } + } + } + } + }, + { + "title": "referralRequestVersion", + "type": "object", + "required": [ + "url", + "valueInteger" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralRequestVersion" + ], + "example": "referralRequestVersion" + }, + "valueInteger": { + "type": "integer", + "example": 0 + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AppointmentSlotIssues-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `ubrnReceived` | `0..1` | |\n| `patientContactExpected` | `0..1` | |\n| `clinicalInformationStatus` | `0..1` | |\n| `reason` | `0..1` | |\n| `lastContact` | `0..1` | |\n| `service` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "namedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "eReferralPathwayStart", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "eReferralPathwayStart" + ], + "example": "eReferralPathwayStart" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "clinicalInfoPrinted", + "type": "object", + "required": [ + "url", + "valueBoolean" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInfoPrinted" + ], + "example": "clinicalInfoPrinted" + }, + "valueBoolean": { + "type": "boolean", + "example": false + } + } + }, + { + "title": "ubrnReceived", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "ubrnReceived" + ], + "example": "ubrnReceived" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "patientContactExpected", + "type": "object", + "required": [ + "url", + "valueDate" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patientContactExpected" + ], + "example": "patientContactExpected" + }, + "valueDate": { + "type": "string", + "format": "date", + "example": "2021-09-07" + } + } + }, + { + "title": "clinicalInformationStatus", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalInformationStatus" + ], + "example": "clinicalInformationStatus" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PRESENT", + "NOT_APPLICABLE", + "NOT_DUE", + "OVERDUE" + ], + "example": "NOT_DUE" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + } + } + } + } + } + }, + { + "title": "lastContact", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "lastContact" + ], + "example": "lastContact" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "service", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier", + "display" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Service Name" + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AdviceAndGuidanceRequests-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `category` | `1..1` | |\n| `adviceFirstRequested` | `1..1` | |\n| `adviceLastUpdated` | `1..1` | |\n| `referrer` | `1..1` | |\n| `service` | `1..1` | |\n| `clinicType` | `0..1` | |\n| `communicationRequestVersion` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "specialty", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + } + } + } + }, + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "namedClinician", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "category", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "category" + ], + "example": "category" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_RESPONSE_REQUIRED", + "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", + "REFERRER_TO_REVIEW_RESPONSE", + "CONVERSATION_ENDED_CANCELLED", + "CONVERSATION_ENDED_CLOSED", + "ADVICE_CONVERTED" + ], + "example": "PROVIDER_RESPONSE_REQUIRED" + } + } + } + } + } + } + } + }, + { + "title": "adviceFirstRequested", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "adviceFirstRequested" + ], + "example": "adviceFirstRequested" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "adviceLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "adviceLastUpdated" + ], + "example": "adviceLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "adviceLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "adviceLastUpdated" + ], + "example": "adviceLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-09-01T14:26:18.314Z" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "service", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "service" + ], + "example": "service" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier", + "display" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Service Name" + } + } + } + } + }, + { + "title": "clinicType", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/CLINIC-TYPE" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + } + } + } + }, + { + "title": "communicationRequestVersion", + "type": "object", + "required": [ + "url", + "valueInteger" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "communicationRequestVersion" + ], + "example": "communicationRequestVersion" + }, + "valueInteger": { + "type": "integer", + "example": 0 + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-RejectedTriageResponse-WorkListItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Rejected/TriageRequest worklist, only included if `status` is `TRIAGE_RESPONSE` |\n", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "referralLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralLastUpdated" + ], + "example": "referralLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "status", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "status" + ], + "example": "status" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "ASSESSMENT_RESULT", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "NOT_BOOKED", + "BOOKED", + "AWAITING_TRIAGE", + "DEFERRED_TO_PROVIDER", + "APP_CANCELLED_BY_PROVIDER", + "APP_CANCELLED_BY_PATIENT", + "TRIAGED_PROVIDER_TO_ACTION", + "TRIAGE_RESPONSE" + ], + "example": "REJECTED" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Assessment result", + "Cancelled referral", + "Did not attend", + "Not booked", + "Booked", + "Awaiting triage", + "Deferred to provider", + "Appointment cancelled by provider", + "Appointment cancelled by patient", + "Triaged - provider to action", + "Triage Response" + ], + "example": "Rejected" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + ], + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "FURTHER_INFORMATION_REQUIRED" + }, + "display": { + "type": "string", + "example": "Further information required" + } + } + } + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" + }, + "extension": { + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Assessment Returned / Cancelled / DNA worklist, only included if `status` is `CANCELLED_REFERRAL` |\n", + "type": "array", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "referralLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralLastUpdated" + ], + "example": "referralLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "status", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "status" + ], + "example": "status" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "ASSESSMENT_RESULT", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "NOT_BOOKED", + "BOOKED", + "AWAITING_TRIAGE", + "DEFERRED_TO_PROVIDER", + "APP_CANCELLED_BY_PROVIDER", + "APP_CANCELLED_BY_PATIENT", + "TRIAGED_PROVIDER_TO_ACTION", + "TRIAGE_RESPONSE" + ], + "example": "REJECTED" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Assessment result", + "Cancelled referral", + "Did not attend", + "Not booked", + "Booked", + "Awaiting triage", + "Deferred to provider", + "Appointment cancelled by provider", + "Appointment cancelled by patient", + "Triaged - provider to action", + "Triage Response" + ], + "example": "Rejected" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" + ], + "example": "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "INTEND_PRIVATE" + }, + "display": { + "type": "string", + "example": "Patient will go to a private clinic" + } + } + } + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-AwaitingBooking-WorklistItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" + }, + "extension": { + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Awaiting Booking worklist, only included if `status` is `APPOINTMENT_CANCELLED_BY_PROVIDER` or `APPOINTMENT_CANCELLED_BY_PATIENT` |\n", + "type": "array", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "referralLastUpdated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralLastUpdated" + ], + "example": "referralLastUpdated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "status", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "status" + ], + "example": "status" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "ASSESSMENT_RESULT", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "NOT_BOOKED", + "BOOKED", + "AWAITING_TRIAGE", + "DEFERRED_TO_PROVIDER", + "APP_CANCELLED_BY_PROVIDER", + "APP_CANCELLED_BY_PATIENT", + "TRIAGED_PROVIDER_TO_ACTION", + "TRIAGE_RESPONSE" + ], + "example": "REJECTED" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Assessment result", + "Cancelled referral", + "Did not attend", + "Not booked", + "Booked", + "Awaiting triage", + "Deferred to provider", + "Appointment cancelled by provider", + "Appointment cancelled by patient", + "Triaged - provider to action", + "Triage Response" + ], + "example": "Rejected" + } + } + } + } + } + } + } + }, + { + "title": "reason", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + ], + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_APPOINTMENT_CLASH" + }, + "display": { + "type": "string", + "example": "Patient - Clashes with another appointment" + } + } + } + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-LettersOutstanding-WorklistItem", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" + }, + "extension": { + "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `letterDue` | `1..1` | The `date` a referral letter is due for the `ReferralRequest` |\n", + "type": "array", + "items": { + "anyOf": [ + { + "title": "patient", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + { + "title": "priority", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "referralCreated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referralCreated" + ], + "example": "referralCreated" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-11-24T14:46:01.001Z" + } + } + }, + { + "title": "clinicalContext", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "clinicalContext" + ], + "example": "clinicalContext" + }, + "valueString": { + "type": "string", + "example": "ORTHAPEDICS/KNEE" + } + } + }, + { + "title": "referrer", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "referrer" + ], + "example": "referrer" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "letterDue", + "type": "object", + "required": [ + "url", + "valueDate" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "letterDue" + ], + "example": "letterDue" + }, + "valueDate": { + "type": "string", + "format": "date", + "example": "2021-11-24" + } + } + } + ] + } + } + } + } + ] + } + } + } + } + } + } + }, + "examples": { + "aAndg-requests": { + "summary": "Advice and guidance requests", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceWorklist/responses/AdviceAndGuidanceRequests.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request or service. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/CommunicationRequest/{ubrn}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve the summary of an advice and guidance request. This endpoint provides important \ncontextual information about the advice and guidance request (e.g. the service/specialty to which advice has been requested, etc).\n\nThis does not include the advice and guidance conversation between the referrer and the service provider. The conversation must be retrieved via [[HYPERLINK_A025]].\n\nAn advice request can include file attachments and structured clinical data added via an integrated primary care system. These must be retrieved via [[HYPERLINK_A042]] and [[HYPERLINK_A043]], respectively.\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of the advice and guidance request. \nFor service provider users, you may have identified the UBRN via [[HYPERLINK_A023]].\n \n## Application-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n## Healthcare worker, user-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve the summary of an advice and guidance request\n\nSo I can understand all of the relevant context for the request.\n\n## Important notes\n\nThe summary includes an indicator of whether the referrer has authorised the providing organisation to \nconvert the advice and guidance request into an appointment request. \nIf authorised, [[HYPERLINK_A027]] can be used to convert the advice and guidance request into an appointment request.\n\nAn advice and guidance request may have been converted to a referral (with the same UBRN), \nand in addition a referral pathway in e-RS can be made up of more than one UBRN. As such, \nit is important that all clinical information is obtained across all the related UBRNs in the pathway. \nThese may be identified using [[HYPERLINK_A005]] and will be returned if the user is authorised to view this.\n\nIf the converted advice and guidance request is referred to a service outside of your organisation, \nthe subsequent referral information may not be accessible due to existing data-access rules. However, \nthe advice and guidance summary ([[HYPERLINK_A024]]), attachments ([[HYPERLINK_A006]]), advice and guidance conversation ([[HYPERLINK_A025]]) and \nclinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved.\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or [[HYPERLINK_A006]] endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A024]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE\t | The file is available for download. |\n| PENDING\t | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |\n| THREATS_FOUND\t | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n## Related endpoints\n\nAfter using this endpoint, use [[HYPERLINK_A025]] to retrieve the Advice and Guidance conversation itself.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ----------------------- |\n| Simple summary `CommunicationRequest` | `ubrn`=`000000070000` |\n| Attachment file reference present | `ubrn`=`000000070001` |\n| Attachment files unavailable for download | `ubrn`=`000000070002` |\n", + "summary": "Retrieve advice and guidance request summary (A024, FHIR STU3)", + "operationId": "a024-retrieve-advice-and-guidance", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "e-RS Communication Request (advice and guidance summary)", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CommunicationRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "category", + "subject", + "recipient", + "sender", + "requester", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "CommunicationRequest" + ], + "example": "CommunicationRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + }, + { + "title": "CareConnect-PractitionerRole", + "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "practitioner", + "organization" + ], + "properties": { + "id": { + "type": "string", + "example": "PractitionerRole-R69-000000000101" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "PractitionerRole" + ], + "example": "PractitionerRole" + }, + "practitioner": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "organization": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + "code": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + }, + "code": { + "type": "string", + "example": "REFERRING_CLINICIAN" + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ProviderConversionAuthorisation", + "description": "Extension to supply the conversion authorisation flag", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + }, + "code": { + "type": "string", + "enum": [ + "AUTHORISED_TO_CONVERT", + "NOT_AUTHORISED_TO_CONVERT" + ], + "example": "NOT_AUTHORISED_TO_CONVERT" + }, + "display": { + "type": "string", + "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" + } + } + } + } + }, + { + "title": "Extension-eRS-Specialty", + "description": "Extension to supply the specialty", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "category": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_RESPONSE_REQUIRED", + "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", + "REFERRER_TO_REVIEW_RESPONSE", + "CONVERSATION_ENDED_CANCELLED", + "CONVERSATION_ENDED_CLOSED", + "ADVICE_CONVERTED" + ], + "example": "PROVIDER_RESPONSE_REQUIRED" + } + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "recipient": { + "type": "array", + "items": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-HealthcareService-Reference", + "description": "Extension to supply the service id", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + } + }, + "sender": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + }, + "requester": { + "type": "object", + "required": [ + "agent" + ], + "properties": { + "agent": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + } + } + }, + "payload": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contentReference" + ], + "properties": { + "contentReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70002" + } + } + } + } + } + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "minimal": { + "summary": "Minimal `CommunicationRequest` example", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/MinimalExample.json" + } + }, + "with-attachment-file-reference": { + "summary": "`CommunicationRequest` with attachment file reference", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json" + } + }, + "with-unavailable-attachments": { + "summary": "`CommunicationRequest` with attachments unavailable for download", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an Advice and Guidance request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/CommunicationRequest/{ubrn}/_history/{version}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to retrieve a specific version of `CommunicationRequest`.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nThe pre-requisites for this endpoint are the same as for endpoint [[HYPERLINK_A024]].\n\nNote: e-RS only supports the retrieval of the most recent version of `CommunicationRequest`. You cannot retrieve earlier versions.\n\n## Important note\n\nThe Important notes for this endpoint are the same as for endpoint [[HYPERLINK_A024]].\n\n## Use case\n\nSee [[HYPERLINK_A005]].\n\n## Related endpoints\n\nSee [[HYPERLINK_A024]].\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ------------------------------------- |\n| Simple summary `CommunicationRequest` | `ubrn`=`000000070000`, `version`=`5` |\n| Attachment file reference present | `ubrn`=`000000070001`, `version`=`5` |\n| `CommunicationRequest` with attachments unavailable for download | `ubrn`=`000000070002`, `version`=`5` |\n", + "summary": "Retrieve advice and guidance request summary (versioned) (A024, FHIR STU3)", + "operationId": "a024-retrieve-advice-and-guidance-versioned", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "name": "version", + "in": "path", + "description": "The version of the resource to be retrieved. It must be the latest version of the resource otherwise\n`HISTORY_NOT_SUPPORTED` error will be returned (HTTP 404 Not Found).\n", + "required": true, + "schema": { + "type": "string", + "example": "5" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "e-RS Communication Request (advice and guidance summary)", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CommunicationRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "category", + "subject", + "recipient", + "sender", + "requester", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "CommunicationRequest" + ], + "example": "CommunicationRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + }, + { + "title": "CareConnect-PractitionerRole", + "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "practitioner", + "organization" + ], + "properties": { + "id": { + "type": "string", + "example": "PractitionerRole-R69-000000000101" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "PractitionerRole" + ], + "example": "PractitionerRole" + }, + "practitioner": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "organization": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + "code": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + }, + "code": { + "type": "string", + "example": "REFERRING_CLINICIAN" + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ProviderConversionAuthorisation", + "description": "Extension to supply the conversion authorisation flag", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + }, + "code": { + "type": "string", + "enum": [ + "AUTHORISED_TO_CONVERT", + "NOT_AUTHORISED_TO_CONVERT" + ], + "example": "NOT_AUTHORISED_TO_CONVERT" + }, + "display": { + "type": "string", + "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" + } + } + } + } + }, + { + "title": "Extension-eRS-Specialty", + "description": "Extension to supply the specialty", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "category": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_RESPONSE_REQUIRED", + "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", + "REFERRER_TO_REVIEW_RESPONSE", + "CONVERSATION_ENDED_CANCELLED", + "CONVERSATION_ENDED_CLOSED", + "ADVICE_CONVERTED" + ], + "example": "PROVIDER_RESPONSE_REQUIRED" + } + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "recipient": { + "type": "array", + "items": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-HealthcareService-Reference", + "description": "Extension to supply the service id", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + } + }, + "sender": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + }, + "requester": { + "type": "object", + "required": [ + "agent" + ], + "properties": { + "agent": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + } + } + }, + "payload": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contentReference" + ], + "properties": { + "contentReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70002" + } + } + } + } + } + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "minimal": { + "summary": "Minimal `CommunicationRequest` example", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/MinimalExample.json" + } + }, + "with-attachment-file-reference": { + "summary": "`CommunicationRequest` with attachment file reference", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json" + } + }, + "with-unavailable-attachments": { + "summary": "`CommunicationRequest` with attachments unavailable for download", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found - Resource not found for ID provided or Resource version does not match version requested." + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an Advice and Guidance request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/Communication": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve the advice and guidance conversation between the referring organisation \nand service providing organisation.\n\nA conversation takes the form of messages between a referrer (seeking advice) and a provider or specialist. Messages can include file attachments. These must be retrieved via [[HYPERLINK_A042]]\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of the advice and guidance request. For service provider users, \nyou may have identified the UBRN via [[HYPERLINK_A023]].\n\nYou need to use [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request. \nThis will importantly include the latest version of the request which must be used.\n\n## Application-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n## Healthcare worker, user-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve the conversation that is present on an advice and guidance request\n\nSo that I can review the conversation and potentially contribute further to it.\n\n## Important notes\n\nThe conversation returned includes links to any attachments associated with the conversation.\nThis can be done via endpoint [[HYPERLINK_A006]]. \nNote, dependent on how attachments were added they may be linked to the Advice and Guidance summary instead of the conversation. \nThese may be retrieved from [[HYPERLINK_A024]].\n\nIf the converted advice and guidance request is referred to a service outside of your organisation, \nthe subsequent referral information may not be accessible due to existing data-access rules. \nHowever, the advice and guidance summary ([[HYPERLINK_A024]]), attachments ([[HYPERLINK_A006]]), \nadvice and guidance conversation ([[HYPERLINK_A025]]) and \nclinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved.\nThe conversation also gets included in the form of a PDF file returned by [[HYPERLINK_A007]].\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A025]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE\t | The file is available for download. |\n| PENDING\t | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |\n| THREATS_FOUND\t | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n\n\n## Related endpoints\n\nAfter using this endpoint:\n - Use [[HYPERLINK_A006]] to retrieve any attachments associated with the advice and guidance request.\n - (For service provider users) Use [[HYPERLINK_A026]] to respond to the referrer supplying advice or requesting further information.\n - (For service provider users) Use [[HYPERLINK_A027]] to convert the advice and guidance request into a referral. This is only possible if the referrer has authorised the provider to do so.\n\nUse [[HYPERLINK_A043]] to generate a PDF file overview relating to an advice and guidance request.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| -------------------------------------------------------------- | --------------------------------------------------------- |\n| Single message from referrer | `based-on`=`CommunicationRequest/000000070000/_history/1` |\n| One message each way | `based-on`=`CommunicationRequest/000000070000/_history/2` |\n| Attachment present in each direction | `based-on`=`CommunicationRequest/000000070001/_history/6` |\n| Multi-way conversation | `based-on`=`CommunicationRequest/000000070002/_history/1` |\n| Attachment uploaded from RCS before A&G creation | `based-on`=`CommunicationRequest/000000070003/_history/7` | \n| Attachment files unavailable for download | `based-on`=`CommunicationRequest/000000070004/_history/3` | \n", + "summary": "Retrieve advice and guidance conversation (A025, FHIR STU3)", + "operationId": "a025-retrieve-advice-and-guidance-conversation", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "name": "based-on", + "in": "query", + "description": "The component describing the CommunicationRequest for which the communication is requested for.\n\nPattern:\n\n`CommunicationRequest/{ubrn}/_history/{version}`\n\n - The `ubrn` represents the unique booking reference number of the Advice and Guidance Request for which the caller is obtaining the 'Advice and Guidance Conversation'\n - The `version` is the version of the A&G Request to be retrieved (only the most current version will be retrievable)\n", + "required": true, + "schema": { + "type": "string", + "example": "CommunicationRequest/000000070000/_history/1" + } + }, + { + "in": "query", + "name": "_include", + "description": "Suppliers must request includes they rely on. The default includes behaviour is subject to change. \n\nPlease note that '_include' query parameter can be supplied multiple times for example:\n\n`GET /STU3/Communication\n?based-on=CommunicationRequest/{ubrn}/_history/{version}\n&_include=Communication:requester-practitionerrole:PractitionerRole\n&_include=Communication:sender-practitionerrole:PractionerRole\n&_include=Communication:content-reference:DocumentReference`\n", + "required": false, + "schema": { + "type": "string", + "enum": [ + "Communication:requester-practitionerrole:PractitionerRole", + "Communication:sender-practitionerrole:PractionerRole", + "Communication:content-reference:DocumentReference" + ], + "example": "Communication:requester-practitionerrole:PractitionerRole" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "e-RS Communication Request (advice and guidance summary)", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "Bundle resource containing advice and guidance conversation", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "type", + "total", + "link", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "08acc887-6a7b-4b38-8f50-022e41319efe" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated", + "profile" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" + ], + "example": "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Bundle" + ], + "example": "Bundle" + }, + "type": { + "type": "string", + "enum": [ + "searchset" + ], + "example": "searchset" + }, + "total": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 3 + }, + "link": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "relation", + "url" + ], + "properties": { + "relation": { + "type": "string", + "enum": [ + "self" + ], + "example": "self" + }, + "url": { + "type": "string", + "example": "_baseUrl_/STU3/Communication?based-on=CommunicationRequest%2F000000070000%2F_history%2F6&_include=Communication%3Arequester-practitionerrole%3APractitionerRole&_include=Communication%3Asender-practitionerrole%3APractionerRole&_include=Communication%3Acontent-reference%3ADocumentReference" + } + } + } + }, + "entry": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ----------------------- | ----------- | --------------------------------------------------- |\n| `CommunicationEntry` | `1..*` | |\n| `PractitionerRoleEntry` | `2..*` | |\n| `DocumentEntry` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "CommunicationEntry", + "description": "CommunicationEntry details a single chat entry.\n", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/STU3/Communication/70000" + }, + "resource": { + "title": "eRS-Communication-1", + "description": "A record of information transmitted from a sender to a receiver", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "category", + "recipient", + "sent", + "sender", + "note" + ], + "properties": { + "id": { + "type": "string", + "example": "appointment" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/eRS-Communication-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Communication" + ], + "example": "Communication" + }, + "status": { + "type": "string", + "enum": [ + "completed" + ], + "example": "completed" + }, + "category": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" + }, + "code": { + "type": "string", + "enum": [ + "REQUESTER", + "RESPONDER", + "REFERRER_CLINICAL_INFORMATION_UPDATED" + ], + "example": "REQUESTER" + } + } + } + } + } + } + }, + "recipient": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-HealthcareService-Reference", + "description": "Extension to supply the service id", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + ] + } + }, + "sent": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "sender": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + }, + "payload": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contentReference" + ], + "properties": { + "contentReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "DocumentReference/70000" + } + } + } + } + } + }, + "note": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string", + "example": "Example content...", + "description": "Maximum 8000 characters." + } + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "match" + ], + "example": "match" + } + } + } + } + }, + { + "title": "PractitionerRoleEntry", + "description": "PractitionerRoleEntry details practitioner involved in this conversation.\n", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/STU3/PractitionerRole/103264994981.R69.SERVICE-PROVIDER-CLINICIAN" + }, + "resource": { + "title": "CareConnect-PractitionerRole", + "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "practitioner", + "organization" + ], + "properties": { + "id": { + "type": "string", + "example": "PractitionerRole-R69-000000000101" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "PractitionerRole" + ], + "example": "PractitionerRole" + }, + "practitioner": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "organization": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + "code": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + }, + "code": { + "type": "string", + "example": "REFERRING_CLINICIAN" + } + } + } + } + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "include" + ], + "example": "include" + } + } + } + } + }, + { + "title": "DocumentEntry", + "description": "DocumentEntry contains the 'DocumentReference' associated with this advice and guidance conversation.\n", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/STU3/DocumentReference/70000" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "include" + ], + "example": "include" + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "single-message-from-referrer": { + "summary": "Single message from referrer", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/SingleMessageFromReferrer.json" + } + }, + "one-message-each-way": { + "summary": "One message each way", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/OneMessageEachWay.json" + } + }, + "attachment-present-in-each-direction": { + "summary": "Attachment present in each direction", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json" + } + }, + "multi-way-conversation": { + "summary": "Multi-way conversation", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/MultiWayConversation.json" + } + }, + "attachment-uploaded-from-rcs": { + "summary": "Attachment uploaded from RCS", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json" + } + }, + "unavailable-attachments": { + "summary": "Attachment files unavailable for download", + "value": { + "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/UnavailableAttachments.json" + } + } + } + } + } + }, + "400": { + "description": "Where status code 400 (Bad Request) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found - Resource not found for ID provided or Resource version does not match version requested." + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/CommunicationRequest/{ubrn}/$ers.sendCommunicationToRequester": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint, as a service provider, to respond to an advice and guidance request your service provider organisation has received. \nYou can either provide guidance back to the referrer or request further information from the referrer. \nThis will return the advice and guidance request back to the referrer for action.\n\nNote: If you want to convert an advice and guidance request into a referral, \nand provide a final guidance response back to the referrer at the same time, please \nuse [[HYPERLINK_A027]] instead. This option is only permissible \nif the referrer has authorised the provider to convert the advice and guidance request into a referral.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request.\n\nYou need to use [[HYPERLINK_A025]] to retrieve the conversation within an advice and guidance request.\n\nIf you want to include attachments with the response, you need to use [[HYPERLINK_A020]] so they are ready to be associated with the response.\n\n## Important notes\n \nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download.\nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n \nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use case\nAs an authenticated user\n\nI need to return an advice and guidance request back to the referrer with some guidance\n\nSo that I can progress the conversation regarding the patient's care.\n\n## Related endpoints\n\nYou can use [[HYPERLINK_A007]] to generate a PDF file that summarises \nthe advice and guidance request and associated conversation.\n\nYou can use [[HYPERLINK_A024]] to retrieve the latest summary of the advice and guidance request.\n\nYou can use [[HYPERLINK_A025]] to retrieve the latest conversation within the advice and guidance request.\n", + "summary": "Send advice and guidance response (A026, FHIR STU3)", + "operationId": "a026-send-a&g-response", + "tags": [ + "Review advice and guidance requests" + ], + "parameters": [ + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-SendCommunicationToRequester-Request-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Request-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Request-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------------------------------------------------ |\n| `guidanceOutcome` | `1..1` | |\n| `guidanceIntendedRecommendation` | `0..1` | Conditionally Mandatory if guidanceOutcome value is `RETURN_TO_REFERRER_WITH_ADVICE` |\n| `guidance` | `1..1` | Mandatory guidance response. Maximum 8000 characters. |\n| `updatedPriority` | `1..1` | | \n| `guidanceAttachmentFile` | `0..*` | Property defining files to be included with the supplied `guidance` text | \n", + "items": { + "anyOf": [ + { + "title": "guidanceOutcome", + "description": "Parameter indicating the expected outcome of the supplied guidance", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "guidanceOutcome" + ], + "example": "guidanceOutcome" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceResponseOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceResponseOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "RETURN_TO_REFERRER_WITH_ADVICE", + "REQUIRE_FURTHER_INFORMATION", + "PROVIDER_CONVERTED" + ], + "example": "RETURN_TO_REFERRER_WITH_ADVICE" + } + } + } + } + }, + { + "title": "guidanceIntendedRecommendation", + "description": "Parameter to supply the recommendation for a patient's care off the back of the provided guidance. Only available and mandatory when supplying a `guidanceOutcome` of `RETURN_TO_REFERRER_WITH_ADVICE`", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "guidanceIntendedRecommendation" + ], + "example": "guidanceIntendedRecommendation" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceIntendedRecommendation-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceIntendedRecommendation-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVICE_ONLY_NO_REFERRAL_RECOMMENDED", + "ADVICE_FOLLOWED_BY_REFERRAL_IF_REQUIRED", + "REFERRAL_RECOMMENDED", + "OTHER" + ], + "example": "ADVICE_ONLY_NO_REFERRAL_RECOMMENDED" + } + } + } + } + }, + { + "title": "guidance", + "description": "Parameter to supply the guidance", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "guidance" + ], + "example": "guidance" + }, + "valueString": { + "type": "string", + "example": "Please perform test B and send me back the results" + } + } + }, + { + "title": "updatedPriority", + "description": "Parameter to supply a updatedPriority", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "updatedPriority" + ], + "example": "updatedPriority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "guidanceAttachmentFile", + "description": "Parameter to supply an attachment file", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "guidanceAttachmentFile" + ], + "example": "guidanceAttachmentFile" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "GUIDANCE_RESPONSE" + ], + "example": "GUIDANCE_RESPONSE" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "require-further-information": { + "summary": "Require further information", + "value": { + "$ref": "../../examples/sendAdviceAndGuidanceResponse/requests/RequireFurtherInformation.json" + } + }, + "return-to-referrer-with-advice": { + "summary": "Return to referrer with advice", + "value": { + "$ref": "../../examples/sendAdviceAndGuidanceResponse/requests/ReturnToReferrerWithAdvice.json" + } + }, + "attachment-included": { + "summary": "Attachment included", + "value": { + "$ref": "../../examples/sendAdviceAndGuidanceResponse/requests/AttachmentIncluded.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Parameters resource containing updated communication request and newly created communication", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-SendCommunicationToRequester-Response-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Response-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Response-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `updatedCommunicationRequest` | `1..1` | |\n| `createdCommunication` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "updatedCommunicationRequest", + "description": "Parameter containing the updated `CommunicationRequest` detailing changes to the overall conversation (changes to priority, status, etc)", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "updatedCommunicationRequest" + ], + "example": "updatedCommunicationRequest" + }, + "resource": { + "title": "eRS-CommunicationRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "category", + "subject", + "recipient", + "sender", + "requester", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "CommunicationRequest" + ], + "example": "CommunicationRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + }, + { + "title": "CareConnect-PractitionerRole", + "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "practitioner", + "organization" + ], + "properties": { + "id": { + "type": "string", + "example": "PractitionerRole-R69-000000000101" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "PractitionerRole" + ], + "example": "PractitionerRole" + }, + "practitioner": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "organization": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + "code": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + }, + "code": { + "type": "string", + "example": "REFERRING_CLINICIAN" + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ProviderConversionAuthorisation", + "description": "Extension to supply the conversion authorisation flag", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + }, + "code": { + "type": "string", + "enum": [ + "AUTHORISED_TO_CONVERT", + "NOT_AUTHORISED_TO_CONVERT" + ], + "example": "NOT_AUTHORISED_TO_CONVERT" + }, + "display": { + "type": "string", + "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" + } + } + } + } + }, + { + "title": "Extension-eRS-Specialty", + "description": "Extension to supply the specialty", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "category": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_RESPONSE_REQUIRED", + "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", + "REFERRER_TO_REVIEW_RESPONSE", + "CONVERSATION_ENDED_CANCELLED", + "CONVERSATION_ENDED_CLOSED", + "ADVICE_CONVERTED" + ], + "example": "PROVIDER_RESPONSE_REQUIRED" + } + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "recipient": { + "type": "array", + "items": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-HealthcareService-Reference", + "description": "Extension to supply the service id", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + } + }, + "sender": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + }, + "requester": { + "type": "object", + "required": [ + "agent" + ], + "properties": { + "agent": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + } + } + }, + "payload": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contentReference" + ], + "properties": { + "contentReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70002" + } + } + } + } + } + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + } + } + }, + { + "title": "createdCommunication", + "description": "Parameter containing the newly created `Communication` detailing the guidance provided", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "createdCommunication" + ], + "example": "createdCommunication" + }, + "resource": { + "title": "eRS-Communication-1", + "description": "A record of information transmitted from a sender to a receiver", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "category", + "recipient", + "sent", + "sender", + "note" + ], + "properties": { + "id": { + "type": "string", + "example": "appointment" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/eRS-Communication-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Communication" + ], + "example": "Communication" + }, + "status": { + "type": "string", + "enum": [ + "completed" + ], + "example": "completed" + }, + "category": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" + }, + "code": { + "type": "string", + "enum": [ + "REQUESTER", + "RESPONDER", + "REFERRER_CLINICAL_INFORMATION_UPDATED" + ], + "example": "REQUESTER" + } + } + } + } + } + } + }, + "recipient": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-HealthcareService-Reference", + "description": "Extension to supply the service id", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + ] + } + }, + "sent": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "sender": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + }, + "payload": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contentReference" + ], + "properties": { + "contentReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "DocumentReference/70000" + } + } + } + } + } + }, + "note": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string", + "example": "Example content...", + "description": "Maximum 8000 characters." + } + } + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "require-further-information": { + "summary": "Response for 'Require further information'", + "value": { + "$ref": "../../../examples/sendAdviceAndGuidanceResponse/responses/RequireFurtherInformation.json" + } + }, + "return-to-referrer-with-advice": { + "summary": "Response for 'Return to referrer with advice'", + "value": { + "$ref": "../../../examples/sendAdviceAndGuidanceResponse/responses/ReturnToReferrerWithAdvice.json" + } + }, + "with-attachment": { + "summary": "Response with attachment", + "value": { + "$ref": "../../../examples/sendAdviceAndGuidanceResponse/responses/AttachmentIncluded.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNSUPPORTED_PRIORITY | The Priority submitted is not supported by the responsible Service. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/$ers.createFromCommunicationRequestActionLater": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint, as a service provider, to:\n - convert the advice and guidance request you have received into a referral, AND\n - create a task for the service provider admin team to select/shortlist appropriate services for the patient, AND\n - provide final guidance response details back to the referrer\n\nNote: This endpoint is only allowed to be used if the referrer has authorised the provider to convert the advice \nand guidance request into a referral.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request. \nThis will include whether or not the referrer has authorised the provider to be able to convert an \nadvice and guidance request into a referral, and thus dictate whether this endpoint can be used.\n\nYou need to use [[HYPERLINK_A025]] to retrieve the conversation within an advice and guidance request.\n\nIf you want to include attachments with the admin task and/or the response to the referrer, \nyou need to use [[HYPERLINK_A020]] so they are ready to be associated when this endpoint is called.\n\n## Use case\nAs an authenticated user\n\nI need to convert an inbound advice and guidance request into a referral \nand task my admin team to shortlist appropriate services for the patient\n\nSo that I can progress the patient's care along the most appropriate referral pathway.\n\n## Important notes\n\nWhen this endpoint is successfully used, an entry will be added to the service providers \nAppointments For Booking worklist for the admin team to action the task. The provider \nadmin team will currently only be able to progress the referral via the e-RS Professional \nApplication user interface (e.g. shortlisting appropriate services for the patient).\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Related endpoints\n\nYou can use [[HYPERLINK_A005]] to retrieve the details of the referral.\n\nYou can use [[HYPERLINK_A024]] to retrieve the latest summary of the advice and guidance request.\n\nYou can use [[HYPERLINK_A025]] to retrieve the latest conversation within the advice and guidance request.\n\nYou can use [[HYPERLINK_A006]] to retrieve the clinical attachments for a referral/advice request.\n\nYou can use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for a referral.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Convert advice and guidance request to referral (A027, FHIR STU3)", + "operationId": "a027-convert-a&g-to-referral", + "tags": [ + "Review advice and guidance requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CreateFromCommunicationRequestActionLater-Request-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateFromCommunicationRequestActionLater-Request-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateFromCommunicationRequestActionLater-Request-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------------- |\n| `createFrom` | `1..1` | |\n| `guidance` | `1..1` | Mandatory guidance response. Maximum 8000 characters. |\n| `newReferralPriority` | `1..1` | | \n| `reviewComments` | `1..1` | |\n| `guidanceAttachmentFile` | `0..*` | Property defining files to be included with the supplied `guidance` text | \n| `reviewAttachmentFile` | `0..*` | Property defining files to be associated with the created `ReferralRequest` | \n", + "items": { + "anyOf": [ + { + "title": "createFrom", + "description": "Parameter to supply a createFrom", + "type": "object", + "required": [ + "name", + "valueReference" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "createFrom" + ], + "example": "createFrom" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "CommunicationRequest/000000070000/_history/4" + } + } + } + } + }, + { + "title": "guidance", + "description": "Parameter to supply the guidance", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "guidance" + ], + "example": "guidance" + }, + "valueString": { + "type": "string", + "example": "I have converted this to send the patient to one of our services" + } + } + }, + { + "title": "newReferralPriority", + "description": "Parameter to supply a newReferralPriority", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "newReferralPriority" + ], + "example": "newReferralPriority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "reviewComments", + "description": "Parameter to supply the reviewComments", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "reviewComments" + ], + "example": "reviewComments" + }, + "valueString": { + "type": "string", + "example": "Refer this patient to our 'xxx' service please as soon as possible" + } + } + }, + { + "title": "guidanceAttachmentFile", + "description": "Parameter to supply a guidanceAttachmentFile", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "guidanceAttachmentFile" + ], + "example": "guidanceAttachmentFile" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "GUIDANCE_RESPONSE" + ], + "example": "GUIDANCE_RESPONSE" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + } + } + } + } + } + } + }, + { + "title": "reviewAttachmentFile", + "description": "Parameter to supply a reviewAttachmentFile", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "reviewAttachmentFile" + ], + "example": "reviewAttachmentFile" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER" + ], + "example": "PROVIDER" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "no-attachments": { + "summary": "No attachments", + "value": { + "$ref": "../../examples/convertAdviceAndGuidanceToReferral/requests/NoAttachments.json" + } + }, + "with-attachments": { + "summary": "With attachments", + "value": { + "$ref": "../../examples/convertAdviceAndGuidanceToReferral/requests/WithAttachments.json" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "A referral converted from A&G request.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "no-attachments": { + "summary": "No attachments", + "value": { + "$ref": "../../../examples/convertAdviceAndGuidanceToReferral/responses/NoAttachments.json" + } + }, + "with-attachments": { + "summary": "With attachments", + "value": { + "$ref": "../../../examples/convertAdviceAndGuidanceToReferral/responses/WithAttachments.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNSUPPORTED_PRIORITY | The Priority submitted is not supported by the responsible Service. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.recordReviewOutcome": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint, as a service provider, to record a triage outcome for the following referrals awaiting review:\n - referrals sent into a triage service\n - referrals deferred into a directly bookable service because of appointment slot unavailability\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Application-restricted, unattended access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nTo access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review. The only use case currently permitted is for non-clinical provider actions.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. \n[[HYPERLINK_A028]] can only be used for referrals sent into triage services, and not the referrals \nbooked into bookable services.\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Appointment Slot Issues' worklist. \nThis provides a list of referrals that have been deferred into directly bookable services.\n\n - Referrals from this worklist may already have been reviewed or may not have any referral clinical information associated, \n in which case [[HYPERLINK_A028]] cannot be used.\n - [[HYPERLINK_A028]] can only be used for those referrals, on the 'Appointment Slot Issues' worklist, which are pending review.\n - As such, you need to use [[HYPERLINK_A029]] to determine if [[HYPERLINK_A028]] is a permissible action.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\nIf you want to include attachments with the triage outcome, you need to use [[HYPERLINK_A020]] so \nthey are ready to be associated when this endpoint is called.\n\n## Use cases\nAs an authenticated user\n\nI need to return the referral back to the referrer with some advice\n\nSo that I can progress the patient's care appropriately with the referrer.\n\n\nAs an authenticated user\n\nI need to accept the referral and task my admin team to shortlist appropriate services for the patient\n\nSo that I can progress the patient's care along the most appropriate referral pathway.\n\n\n## Important notes\n\n - The only outcomes that are supported by this endpoint are 'Return to referrer with advice' and 'Accept and refer/book later'. 'Refer/book now' is not supported.\n - The triage comment text is mandatory. This comment provided will be sent to:\n - The initial referrer when the 'Return to referrer with advice' triage outcome is chosen.\n - An administrator at the receiving service provider when the 'Accept and refer/book later' outcome is chosen.\n - The priority of the referral can be changed as part of recording the triage outcome\n - When this endpoint is successfully used for recording an outcome of 'Accept and refer/book later', \n an entry will be added to the service providers Appointments For Booking worklist for the admin team to action the task. \n The provider admin team will only be able to progress the referral via the e-RS Professional Application user \n interface (e.g. shortlisting appropriate services for the patient).\n - In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \n The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n - Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Record triage outcome (A028, FHIR STU3)", + "operationId": "a028-record-triage-outcome", + "tags": [ + "Review referral requests" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-RecordReviewOutcome-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RecordReviewOutcome-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RecordReviewOutcome-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `reviewOutcome` | `1..1` | |\n| `reviewComments` | `1..1` | |\n| `reviewPriority` | `0..1` | | \n| `reviewAttachmentFile` | `0..*` | | \n", + "items": { + "anyOf": [ + { + "title": "reviewOutcome", + "description": "Parameter to supply a reviewOutcome", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "reviewOutcome" + ], + "example": "reviewOutcome" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "CANCEL_APPOINTMENT_ACTION_LATER", + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "RETURN_TO_REFERRER_WITH_ADVICE" + } + } + } + } + }, + { + "title": "reviewComments", + "description": "Parameter to supply the reviewComments", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "reviewComments" + ], + "example": "reviewComments" + }, + "valueString": { + "type": "string", + "example": "Condition not serious. No further action needed" + } + } + }, + { + "title": "reviewPriority", + "description": "Parameter to supply a reviewPriority", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "reviewPriority" + ], + "example": "reviewPriority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "reviewAttachmentFile", + "description": "Parameter to supply an attachment file", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "reviewAttachmentFile" + ], + "example": "reviewAttachmentFile" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER" + ], + "example": "PROVIDER" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "return-to-referrer-with-advice": { + "summary": "Return to referrer with advice", + "value": { + "$ref": "../../examples/recordTriageOutcome/requests/ReturnToReferrerWithAdvice.json" + } + }, + "accept-refer-book-later": { + "summary": "Accept refer book later", + "value": { + "$ref": "../../examples/recordTriageOutcome/requests/AcceptReferBookLater.json" + } + }, + "attachment-included": { + "summary": "Attachment included", + "value": { + "$ref": "../../examples/recordTriageOutcome/requests/AttachmentIncluded.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "return-to-referrer-with-advice": { + "summary": "Return to referrer with advice", + "value": { + "$ref": "../../../examples/recordTriageOutcome/responses/ReturnToReferrerWithAdvice.json" + } + }, + "accept-refer-book-later": { + "summary": "Accept refer book later", + "value": { + "$ref": "../../../examples/recordTriageOutcome/responses/AcceptReferBookLater.json" + } + }, + "attachment-included": { + "summary": "Attachment included", + "value": { + "$ref": "../../../examples/recordTriageOutcome/responses/AttachmentIncluded.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "412": { + "description": "Precondition Failed - Mandatory data is missing" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PRIORITY_NOT_CURRENT | 'Review Priority' value cannot be amended if Review Outcome value is RETURN_TO_REFERRER_WITH_ADVICE |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/R4/PractitionerRole": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to retrieve a list of available e-RS roles (i.e. business functions) at each organisation where the user works.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nIn order to use this endpoint you must be an authenticated user\n\n## Use case\n\nAs an authenticated user\n\nI need to retrieve a list of authorised e-RS roles for organisations I work for\n\nSo I can choose the appropriate role and organisation to work under when performing tasks.\n\n## Related endpoints\n\nYou can then use the e-RS roles to perform specific tasks using other e-RS endpoints e.g. to satisfy Role and Organisation validation.\n\n### Role and Organisation Validation\n\nThe response from a successful call to [[HYPERLINK_A030]] represents a Practitioner Role Bundle. \nEach Practitioner Role represents an e-RS Role at a specific Organisation. \n\nFor most e-RS endpoints requests are made in the context of a specific authorised e-RS Role at a specific Organisation for the authenticated user. \nThis is accomplished by setting the values of the `NHSD-eRS-Business-Function` and `NHSD-End-User-Organisation-ODS` request headers. \n\nThe e-RS Role is supplied to the endpoint via the `NHSD-eRS-Business-Function` request header. \n\nThe Organisation is supplied to the endpoint via the `NHSD-End-User-Organisation-ODS` request header. \n\nThe `entry` field in the response from [[HYPERLINK_A030]] is an array of PractitionerRole resources. An example of a PractitionerRole resource is: \n```\n\"resource\": {\n \"id\": \"PractitionerRole-R69-000000000101\",\n \"meta\": {\n \"lastUpdated\": \"2021-05-24T16:09:32.252Z\"\n },\n \"resourceType\": \"PractitionerRole\",\n \"practitioner\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/sds-user-id\",\n \"value\": \"000000000101\"\n }\n },\n \"organization\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"R69\"\n }\n },\n \"code\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1\",\n \"code\": \"SERVICE_DEFINER\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1\",\n \"code\": \"SERVICE_PROVIDER_CLINICIAN\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1\",\n \"code\": \"SERVICE_PROVIDER_ADMIN\"\n }\n ]\n }\n ]\n},\n```\nEach PractitionerRole resource has a `code` field which is an array of codings. \nThe authorised e-RS Roles for the authenticated user at a particular Organisation are represented by the `value` fields in the `https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1` code system. \nThe `NHSD-eRS-Business-Function` request header value should be the `code` field value from the relevant eRS-Business-Function-1 coding in the PractitionerRole resource e.g. `SERVICE_PROVIDER_CLINICIAN`.\n\nEach PractitionerRole resource also has an `organization` field which has an identifier in the `https://fhir.nhs.uk/Id/ods-organization-code` code system.\nThe `NHSD-End-User-Organisation-ODS` request header value should be the `value` field value from the organization identifier in the PractitionerRole resource e.g. \"R69\".\n", + "summary": "Retrieve user business functions (A030, FHIR R4)", + "operationId": "a030-retrieve-business-functions", + "tags": [ + "Retrieve user information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "The response body is a `Bundle` that contains `PractitionerRole` entries which define the [[HYPERLINK_ERS_BUS_FUNCTIONS]] that the user has available at each `Organisation` where they have a role.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "Bundle resource containing practitioner roles", + "description": "The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle \n", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "type", + "total", + "link" + ], + "properties": { + "id": { + "type": "string", + "example": "08acc887-6a7b-4b38-8f50-022e41319efe" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Bundle" + ], + "example": "Bundle" + }, + "type": { + "type": "string", + "enum": [ + "searchset" + ], + "example": "searchset" + }, + "total": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 1 + }, + "link": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "relation", + "url" + ], + "properties": { + "relation": { + "type": "string", + "enum": [ + "self" + ], + "example": "self" + }, + "url": { + "type": "string", + "example": "_baseUrl_/R4/PractitionerRole" + } + } + } + }, + "entry": { + "type": "array", + "items": { + "type": "object", + "required": [ + "fullUrl", + "search", + "resource" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/R4/PractitionerRole/PractitionerRole-R69-000000000101" + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "match" + ], + "example": "match" + } + } + }, + "resource": { + "type": "object", + "description": "A UKCore-Practitioner Role. The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole", + "required": [ + "id", + "meta", + "resourceType", + "practitioner", + "organization", + "code" + ], + "properties": { + "id": { + "type": "string", + "example": "PractitionerRole-R69-000000000101" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "PractitionerRole" + ], + "example": "PractitionerRole" + }, + "practitioner": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/sds-user-id" + ], + "example": "https://fhir.nhs.uk/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "organization": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + "code": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1" + ], + "example": "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1" + }, + "code": { + "type": "string", + "example": "REFERRING_CLINICIAN" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "examples": { + "example-response-body": { + "summary": "Example response body", + "value": { + "$ref": "../../../examples/retrieveBusinessFunctions/responses/PractitionerRoleBundle.json" + } + } + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "ACCESS_DENIED" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_FORBIDDEN" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-supported", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_ACCEPTABLE" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "429": { + "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "throttled", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "TOO_MANY_REQUESTS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "500": { + "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_SERVER_ERROR" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_UNAVAILABLE" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.changeShortlist": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to change the shortlist of bookable and/or triage services on an existing referral.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Important notes\n\nThe maximum amount of services allowed on a given shortlist is 20.\n\nThe act of changing a shortlist alone will not result in a referral being sent/booked to any of the shortlisted services (even if only one service is shortlisted). \nA shortlist of a single triage service should be avoided as this relies on the patient to progress the referral, potentially leading to a delay to care. Especially if the referral priority is 2WW or Urgent.\n\nUse [[HYPERLINK_A016]] if there is a need to support the sending/booking of the referral into a shortlisted service.\n\nA patient can request assistance at a service (e.g. a translator, transport or advocacy) when a shortlist is created within the e-RS web application, meaning that all services shortlisted would support the patient's additional requirements to attend.\n\nThe e-RS APIs do not currently support patients' additional requirements so you can neither specify services that support patients' additional requirements, arrange additional requirements for a patient, or view comments associated with the request for additional requirements.\n\nYou must consider if you are fully meeting the patient's additional requirement needs if there are additional requirements associated with the referral.\n\nIf you do not know whether the patient has an existing additional requirement need and the referral may have been shortlisted within the e-RS web application, be mindful that if you chose to amend the shortlist via changing the services, you could remove this patient need.\n\nIf you are changing services to send the patient to a triage service, the triaging service will not support additional requirements but will need to consider if the patient has any additional requirements as part of their decision for future care.\n\nYou can view additional requirements on a referral via the e-RS web application or by fetching [[HYPERLINK_A005]].\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Use case\nAs an authenticated user\n\nI need to change the shortlist of bookable services and/or triage services on an existing referral\n\nSo that I can adequately manage my patients referral pathway, allowing the patient to book into an appropriate service.\n\n## Related endpoints\nTo allow the patient to book their appointment in their own time, you can generate a letter for the patient by using [[HYPERLINK_A019]]. The letter summarises the current state of the referral and any steps the patient may need to follow (e.g. appointment booking instructions).\n\nYou can book an appointment for the patient into a shortlisted directly bookable service using [[HYPERLINK_A015]] and [[HYPERLINK_A016]].\n\nYou can send the referral into a shortlisted triage service using [[HYPERLINK_A016]].\n\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Change shortlist (A031, FHIR STU3)", + "operationId": "a031-change-shortlist", + "tags": [ + "Manage referral" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ChangeShortlist-Parameters", + "type": "object", + "description": "Parameters provided when looking to change the services a referral has currently shortlisted", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlist-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlist-Parameters-1" + } + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `Shortlist` | `1..1` | Shortlist indicating the new services a referral should have shortlisted |\n| `IntentionToAddReferralLetter` | `1..1` | Flag indicating whether a referral letter is going to be added later or is already added | \n| `FirstReminderLetterFollowUpDays` | `1..1` | Time at which a reminder should be sent to remind the patient about the referral |\n", + "items": { + "anyOf": [ + { + "title": "Shortlist", + "description": "Parameter to supply a shortlist", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "shortlist" + ], + "example": "shortlist" + }, + "resource": { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + } + } + }, + { + "title": "IntentionToAddReferralLetter", + "description": "Parameter to supply the intention to add referral letter flag", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "intentionToAddReferralLetter" + ], + "example": "intentionToAddReferralLetter" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + }, + "code": { + "type": "string", + "enum": [ + "NEED_TO_ADD_LATER", + "NOT_INTENDING_TO_ADD" + ], + "example": "NEED_TO_ADD_LATER" + } + } + } + } + }, + { + "title": "FirstReminderLetterFollowUpDays", + "description": "Parameter to supply the first reminder follow up days", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "firstReminderLetterFollowUpDays" + ], + "example": "firstReminderLetterFollowUpDays" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 0 + } + } + } + ] + } + } + } + }, + "examples": { + "unbookedReferralRequest": { + "summary": "Unbooked ReferralRequest", + "description": "Changing the shortlist of an unbooked `ReferralRequest` (single service shortlist)", + "value": { + "$ref": "../../examples/changeShortlist/requests/UnbookedReferral.json" + } + }, + "unbookedReferralRequestMultipleServices": { + "summary": "Unbooked ReferralRequest with Multiple Services", + "description": "Changing the shortlist of an unbooked `ReferralRequest` (multiple services shortlist)", + "value": { + "$ref": "../../examples/changeShortlist/requests/UnbookedReferralMultipleServices.json" + } + }, + "unbookedReferralRequestMixedShortlist": { + "summary": "Unbooked ReferralRequest with Bookable and Triage Services", + "description": "Changing the shortlist of an unbooked `ReferralRequest` (multiple services shortlist)", + "value": { + "$ref": "../../examples/changeShortlist/requests/UnbookedReferralMixedShortlist.json" + } + }, + "nonMixedShortlistWithDocument": { + "summary": "ReferralRequest with non Mixed service and Document Reference", + "description": "Changing the shortlist of an `ReferralRequest` with document reference.", + "value": { + "$ref": "../../examples/changeShortlist/requests/NonMixedShortlistWithDocument.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Referral updated with new service list", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + }, + "examples": { + "unbookedReferralRequest": { + "summary": "Unbooked ReferralRequest", + "description": "Changing the shortlist of an unbooked `ReferralRequest` (single service shortlist)", + "value": { + "$ref": "../../../examples/changeShortlist/responses/UnbookedReferral.json" + } + }, + "unbookedReferralRequestMultipleServices": { + "summary": "Unbooked ReferralRequest with Multiple Services", + "description": "Changing the shortlist of an unbooked `ReferralRequest` (multiple services shortlist)", + "value": { + "$ref": "../../../examples/changeShortlist/responses/UnbookedReferralMultipleServices.json" + } + }, + "unbookedReferralRequestMixedShortlist": { + "summary": "Unbooked ReferralRequest with Mixed Services", + "description": "Changing the shortlist of an unbooked `ReferralRequest` (bookable and triage service shortlist)", + "value": { + "$ref": "../../../examples/changeShortlist/responses/UnbookedReferralMixedShortlist.json" + } + }, + "nonMixedShortlistWithDocument": { + "summary": "ReferralRequest with non Mixed service and Document Reference", + "description": "Changing the shortlist of an `ReferralRequest` with document reference.", + "value": { + "$ref": "../../../examples/changeShortlist/responses/NonMixedShortlistWithDocument.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostic property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.changeShortlistAndSendForTriage": { + "post": { + "deprecated": true, + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n**This endpoint has now been deprecated please use [[HYPERLINK_A031]] instead.**\n\nUse this endpoint to change the shortlist to a single triage service and refer the patient directly to that triage service.\n\nPlease note: this endpoint cannot be used to shortlist bookable services. In order to shortlist bookable services on an existing referral please use [[HYPERLINK_A031]].\n\nA patient can request assistance at a service (e.g. a translator, transport or advocacy) when a shortlist is created within the e-RS web application, meaning that all services shortlisted would support the patient's additional requirements to attend.\n\nThe e-RS APIs do not currently support patients' additional requirements so you can neither specify services that support patients' additional requirements, arrange additional requirements for a patient, or view comments associated with the request for additional requirements.\n\nYou must consider if you are fully meeting the patient's additional requirement needs if there are additional requirements associated with the referral.\n\nIf you do not know whether the patient has an existing additional requirement need and the referral may have been shortlisted within the e-RS web application, be mindful that if you chose to amend the shortlist via changing the services, you could remove this patient need.\n\nIf you are changing services to send the patient to a triage service, the triaging service will not support additional requirements but will need to consider if the patient has any additional requirements as part of their decision for future care.\n\nYou can view additional requirements on a referral via the e-RS web application or by fetching [[HYPERLINK_A005]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Important Notes\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use case\nAs an authenticated user\n\nI need to change the shortlist and refer the patient to a triage service for assessment\n\nSo that I can put the patient on the appropriate clinical pathway for the chosen service provider.\n\n## Related endpoints\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A006]], and [[HYPERLINK_A007]] endpoints where necessary.\n\nYou can calculate the date when the patient will need to be contacted (by the triage service) using reference data from [[HYPERLINK_A004]].\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Change shortlist and send for triage (A032, FHIR STU3) [deprecated]", + "operationId": "a032-change-shortlist-and-send-for-triage", + "tags": [ + "Manage referral" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ChangeShortlistAndSendForTriage-Request-Parameters", + "type": "object", + "description": "Parameters provided when looking to change the services a referral has currently shortlisted", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Request-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Request-Parameters-1" + } + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `Shortlist` | `1..1` | Shortlist indicating the new service a referral should have shortlisted |\n| `IntentionToAddReferralLetter` | `1..1` | Flag indicating whether a referral letter is going to be added later or is already added | \n| `FirstReminderLetterFollowUpDays` | `1..1` | Time at which a reminder should be sent to remind the patient about the referral |\n", + "items": { + "anyOf": [ + { + "title": "Shortlist", + "description": "Parameter to supply a shortlist. When sending for triage, \nthe shortlist must contain exactly one service, and this must support the 'triage request flow'.\n", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "shortlist" + ], + "example": "shortlist" + }, + "resource": { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + } + } + }, + { + "title": "IntentionToAddReferralLetter", + "description": "Parameter to supply the intention to add referral letter flag", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "intentionToAddReferralLetter" + ], + "example": "intentionToAddReferralLetter" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" + }, + "code": { + "type": "string", + "enum": [ + "NEED_TO_ADD_LATER", + "NOT_INTENDING_TO_ADD" + ], + "example": "NEED_TO_ADD_LATER" + } + } + } + } + }, + { + "title": "FirstReminderLetterFollowUpDays", + "description": "Parameter to supply the first reminder follow up days. When sending for triage, \nthe only acceptable value is 0, which means no follow up letter will be sent, \nas the patient does not need to book an appointment.\n", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "firstReminderLetterFollowUpDays" + ], + "example": "firstReminderLetterFollowUpDays" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 0 + } + } + } + ] + } + } + } + }, + "examples": { + "parameters": { + "summary": "Unbooked ReferralRequest", + "description": "Changing the service list of an unbooked `ReferralRequest` and sending to Triage", + "value": { + "$ref": "../../examples/changeShortlistAndSendForTriage/requests/MinimalRequest.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Referral updated with new service and sent for Triage", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-ChangeShortlistAndSendForTriage-Response-Parameters", + "type": "object", + "description": "Parameters provided when looking to change the services a referral has currently shortlisted", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Response-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Response-Parameters-1" + } + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `updatedReferralRequest` | `1..1` | |\n| `createdAppointment` | `1..1` | | \n", + "items": { + "anyOf": [ + { + "title": "updatedReferralRequest", + "description": "Parameter containing the updated referral request", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "updatedReferralRequest" + ], + "example": "updatedReferralRequest" + }, + "resource": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + } + } + }, + { + "title": "createdAppointment", + "description": "Parameter containing the newly created appointment", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "createdAppointment" + ], + "example": "createdAppointment" + }, + "resource": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "unbookedReferralRequest": { + "summary": "TriagedReferralRequest", + "description": "Changing the service list of an unbooked `ReferralRequest` and send for Triage", + "value": { + "$ref": "../../../examples/changeShortlistAndSendForTriage/responses/MinimalRequest.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostic property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/R4/HealthcareService/{id}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nA patient may have 0 to 20 services associated with a single referral. A service is a place where a referrer can send a patient or obtain clinical \nadvice concerning a specific patient. Services have attributes that can be used to understand a services functionality, terms of use, and contact \ninformation. \nYou can use this endpoint to obtain the current version and attributes of a single service.\n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified one service ID in order to use this endpoint.\n\n## Use case\nAs an authenticated user\n\nI would like to be able to see current service information\n\nSo that I can trust that the service information is correct for my patient's referral\n\n## Related endpoints\n - You can retrieve service IDs on a referral via [[HYPERLINK_A005]] as long as the referral has a shortlist containing at least a single service.\n - You can check if a cached service has changed via [[HYPERLINK_A037]].\n - You can retrieve the attributes of an entire shortlist of services (1-20) via [[HYPERLINK_A035]].\n\n## Known Issues\nThe HealthcareService.type attribute is being returned as a singular object by this endpoint. As per the [FHIR standard](https://hl7.org/fhir/R4/), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Service Id |\n| ------------------------------------------------------------------------ | ---------- |\n| `Service` and minimal attributes | `1` |\n| `Service` and its attributes | `2` |\n", + "summary": "Retrieve healthcare service (A033, FHIR R4)", + "operationId": "a033-retrieve-healthcare-service", + "tags": [ + "Retrieve healthcare service information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "name": "id", + "in": "path", + "description": "The ID of the service to be retrieved. It must be valid and relate to an existing Healthcare Service otherwise a HTTP 404 response will be returned.\n", + "required": true, + "schema": { + "type": "string", + "example": "1" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "Response contains the Healthcare Service requested.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Cache-Control": { + "description": "To specify the caching policies in client requests and server responses\n", + "required": false, + "schema": { + "type": "string", + "example": "no-cache" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-HealthcareService", + "description": "A e-referral service. The canonical URL: https://fhir.nhs.uk/StructureDefinition/eRS-HealthcareService", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "location", + "name" + ], + "properties": { + "id": { + "type": "string", + "example": "1" + }, + "meta": { + "type": "object", + "required": [ + "versionId" + ], + "properties": { + "versionId": { + "type": "string", + "example": "1" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "HealthcareService" + ], + "example": "HealthcareService" + }, + "extension": { + "type": "array", + "nullable": false, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| Extension-eRS-HoursOfOperation | 0..1 | Details the hours the current HealthcareService is operational |\n| Extension-eRS-HealthcareService-Contact | 0..* | Details any contact information for the HealthcareService |\n| Extension-eRS-ServiceInstructions | 0..1 | Outlines any specific instructions that should be followed around the HealthcareService |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-HoursOfOperation", + "description": "Extension to detail the hours of operation outlined for a HealthcareService.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" + ], + "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" + }, + "valueString": { + "type": "string", + "example": "9-5 Monday to Friday" + } + } + }, + { + "title": "Extension-eRS-HealthcareService-Contact", + "description": "Extension detailing the contact details for a HealthcareService", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" + ], + "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| purpose | 1..1 | Details who should be using the current contact method |\n| telecom | 1..* | Outlines the contact details to be used |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "purpose", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "purpose" + ], + "example": "purpose" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "enum": [ + "http://terminology.hl7.org/CodeSystem/contactentity-type", + "https://fhir.nhs.uk/CodeSystem/eRS-Purpose" + ], + "example": "http://terminology.hl7.org/CodeSystem/contactentity-type" + }, + "code": { + "type": "string", + "enum": [ + "BILL", + "ADMIN", + "HR", + "PAYOR", + "PATINF", + "PRESS", + "HEALTHCARE_PROFESSIONALS" + ], + "example": "PATINF" + }, + "display": { + "type": "string", + "enum": [ + "Billing", + "Administrative", + "Human Resource", + "Payor", + "Patient", + "Press", + "Healthcare Professionals" + ], + "example": "Patient" + } + } + } + } + } + } + } + }, + { + "type": "object", + "title": "telecom", + "required": [ + "url", + "valueContactPoint" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "telecom" + ], + "example": "telecom" + }, + "valueContactPoint": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "phone", + "email" + ], + "example": "phone" + }, + "value": { + "type": "string", + "example": "01235 209823" + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-ServiceInstructions", + "description": "Extension to detail any service instructions for a HealthcareService.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" + ], + "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" + }, + "valueString": { + "type": "string" + } + } + } + ] + } + }, + "location": { + "type": "array", + "items": { + "type": "object", + "properties": { + "identifier": { + "description": "Reference detailing the location a service is based within.", + "type": "object", + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-site-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-site-code" + }, + "value": { + "type": "string", + "example": "R6901" + } + } + } + } + } + }, + "name": { + "type": "string", + "example": "Direct SVC 1", + "description": "Name of the current HealthcareService within eRS" + }, + "type": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" + ], + "example": "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" + }, + "code": { + "type": "string", + "enum": [ + "DAY_CASE", + "FIRST_OUTPATIENT", + "ASSESSMENT_SERVICE", + "GPSI", + "AHP_CLINIC", + "DIAGNOSTIC", + "NURSE_CLINIC", + "OPHTHALMOLOGIST", + "TELEPHONE_ASSESSMENT" + ], + "example": "DAY_CASE" + }, + "display": { + "type": "string", + "enum": [ + "Day Case", + "First Outpatient", + "Assessment Service", + "GPSI", + "AHP Clinic", + "Diagnostic", + "Nurse Clinic", + "Ophthalmologist", + "Telephone Assessment" + ], + "example": "Day Case" + } + } + } + } + } + } + }, + "characteristic": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-RequestFlowType", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" + ], + "example": "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" + }, + "code": { + "type": "string", + "enum": [ + "BOOKABLE", + "REVIEW", + "ADVICE_AND_GUIDANCE" + ], + "example": "BOOKABLE" + }, + "display": { + "enum": [ + "A service which supports a patient appointment", + "A service that reviews referrals, without the support or need for any appointment with the patient to be made", + "A service which can discuss the patient and receive guidance rather than a patient attending an appointment" + ], + "example": "A service which supports a patient appointment" + } + } + }, + { + "type": "object", + "title": "eRS-BookableType", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" + ], + "example": "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" + }, + "code": { + "type": "string", + "enum": [ + "DIRECTLY_BOOKABLE", + "INDIRECTLY_BOOKABLE" + ], + "example": "DIRECTLY_BOOKABLE" + }, + "display": { + "enum": [ + "Directly Bookable", + "Indirectly Bookable" + ], + "example": "Directly Bookable" + } + } + } + ] + } + } + } + } + } + } + }, + "examples": { + "single-service-minimal": { + "summary": "Service and minimal attributes.", + "value": { + "$ref": "../../../examples/getService/responses/sampleServiceWithMinimumAttributes.json" + } + }, + "single-service": { + "summary": "Service and its attributes.", + "value": { + "$ref": "../../../examples/getService/responses/sampleServiceWithFullAttributes.json" + } + } + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "ACCESS_DENIED" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_FORBIDDEN" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-found", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_FOUND" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-supported", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_ACCEPTABLE" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "429": { + "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "throttled", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "TOO_MANY_REQUESTS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "500": { + "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_SERVER_ERROR" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_UNAVAILABLE" + } + ] + } + } + ] + } + } + } + } + } + }, + "head": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nA Patient may have 0 to 20 services associated with a single referral. \nA service is a place where a referrer can send a patient or obtain clinical advice concerning a specific patient.\n\nYou can use this endpoint to obtain the current service's \"version\" held in e-RS, in order to compare to a locally cached version. \n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified one service ID in order to use this endpoint.\n\n## Use case\nAs an authenticated user\n\nI would like to be able to see the current information about a service on my patients current shortlist\n\nSo that I can review and trust the information is still valid within the context of my patients needs\n\n## Related endpoints\n - You can obtain Service IDs on a referral via [[HYPERLINK_A005]] as long as the referral has a shortlist containing at least one service.\n - You can retrieve a set of services and their attributes via [[HYPERLINK_A035]].\n - You can fetch the attributes of a single service via [[HYPERLINK_A033]].\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Service Id |\n| ------------------------------------------------------------------------ | ---------- |\n| Get `Service` Version | `1` |\n", + "summary": "Retrieve healthcare service version (A037, FHIR R4)", + "operationId": "a037-retrieve-healthcare-service-version", + "tags": [ + "Retrieve healthcare service information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "name": "id", + "in": "path", + "description": "The ID of the service to be retrieved. It must be valid and relate to an existing Healthcare Service otherwise a HTTP 404 response will be returned.\n", + "required": true, + "schema": { + "type": "string", + "example": "1" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "responses": { + "200": { + "description": "Response doesn't contain the payload. But the current version of the Healthcare Service is in the ETag Response Header.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "cache-control": { + "description": "To specify the caching policies in client requests and server responses\n", + "required": false, + "schema": { + "type": "string", + "example": "no-cache" + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "ACCESS_DENIED" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_RELATIONSHIP | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The caller has no legitimate relationship with the resource. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_FORBIDDEN" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-found", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_FOUND" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "429": { + "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "throttled", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "TOO_MANY_REQUESTS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "500": { + "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_SERVER_ERROR" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_UNAVAILABLE" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/Appointment/{id}": { + "put": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to cancel an appointment that is booked into a directly-bookable service. Appointments made to directly-bookable services always have a date and time. You can only ever update the current appointment, i.e. an appointment that is related to a service on the current shortlist *and* the most recent appointment made.\n\nCurrently, this endpoint only allows cancellation of an appointment as an update. Future developments may permit further updates.\n\nTo cancel the referral, use [[HYPERLINK_A036]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n\nYou must use [[HYPERLINK_A004]] to retrieve reference data from the set `APPOINTMENT-CANCELLATION-REASON`.\n\nTo find out which reference data from this set can be used to cancel an appointment, filter as follows:\n\n - *usage* must be `CANCEL`,\n - *businessFunction* must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action),\n - *effectiveFrom* must be in the past, and\n - *effectiveTo* must not be in the past\n\nBoth the appointment reference, and version, are needed to update an appointment:\n\nYou must use [[HYPERLINK_A005]] to obtain the current appointment reference (via *Extension-eRS-Appointment-Reference-1*).\n\nYou must use [[HYPERLINK_A038]] to obtain the current appointment and get the current appointment's version. \n\n## Use case\nAs an authenticated user\n\nI need to update the current appointment\n\nSo that I can manage the patients care appropriately. \n\n## Related endpoints\nYou can retrieve the reference data needed to cancel an appointment by using [[HYPERLINK_A004]]. This contains \"reasons\" for cancellation.\n\nYou can check if you currently can cancel the appointment by checking [[HYPERLINK_A029]].\n\nYou must use [[HYPERLINK_A005]] to obtain the current appointment reference (via *Extension-eRS-Appointment-Reference-1*) .\n\nYou must use [[HYPERLINK_A038]] to obtain the current appointment and get the current appointment's version. \n\nYou can use [[HYPERLINK_A031]] after updating an appointment, to create a new shortlist of services. After changing a shortlist, you may be able to [[HYPERLINK_A016]]. \n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", + "summary": "Update appointment (A034, FHIR STU3)", + "operationId": "a034-update-appointment", + "tags": [ + "Change appointment" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "id", + "in": "path", + "description": "The ID of the appointment to be supplied. It must be valid and relate to an existing Appointment Id otherwise a HTTP 404 response will be returned.\n", + "required": true, + "schema": { + "type": "string", + "example": "70000" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + "examples": { + "minimal-cancellation-reason-only": { + "summary": "Minimal Cancellation - Only Reason Provided (when a cancellation comment is not mandatory)", + "value": { + "$ref": "../../examples/updateAppointment/requests/MinimalCancellationReasonOnlyCommentNotMandatory.json" + } + }, + "cancellation-reason-and-comment": { + "summary": "Reason and Comment Provided", + "value": { + "$ref": "../../examples/updateAppointment/requests/CancellationReasonAndMandatoryComment.json" + } + }, + "cancellation-reason-only-comment-mandatory": { + "summary": "Only Reason Provided (when a cancellation comment is mandatory)", + "value": { + "$ref": "../../examples/updateAppointment/requests/CancellationReasonOnlyCommentMandatory.json" + } + }, + "unauthorised-cancellation-reason": { + "summary": "Unauthorised Cancellation Reason", + "value": { + "$ref": "../../examples/updateAppointment/requests/CancellationInvalidReason.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "An appointment within e-RS.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + "examples": { + "minimal-cancellation-reason-only": { + "summary": "Minimal Cancellation - Only Reason Provided (when a cancellation comment is not mandatory)", + "value": { + "$ref": "../../../examples/updateAppointment/responses/MinimalCancellationReasonOnlyCommentNotMandatory.json" + } + }, + "cancellation-reason-and-comment": { + "summary": "Reason and Comment Provided", + "value": { + "$ref": "../../../examples/updateAppointment/responses/CancellationReasonAndMandatoryComment.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "412": { + "description": "Precondition Failed - Mandatory data is missing" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_STATE | A note describing that the Request is not in the correct state should be returned to the caller. |\n| INVALID_VALUE | Reason provided is not a valid Cancellation Reason. |\n| INAPPROPRIATE_VALUE | Reason provided is not a valid in this case. |\n| MISSING_VALUE | Part of early validation that checks that the input conforms with the specifications of the FHIR profiles. A field defined as Mandatory on the FHIR profile is not provided. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| NO_RELATIONSHIP | No legitimate relationship with referral (UBRN). |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| UNABLE_TO_CANCEL_APPOINTMENT | Unable to cancel the appointment. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "examples": { + "cancellation-reason-only-comment-mandatory": { + "summary": "Only Reason Provided (when a cancellation comment is mandatory)", + "value": { + "$ref": "../../../examples/updateAppointment/responses/CancellationReasonOnlyCommentMandatory.json" + } + }, + "unauthorised-cancellation-reason": { + "summary": "Unauthorised Cancellation Reason", + "value": { + "$ref": "../../../examples/updateAppointment/responses/CancellationInvalidReason.json" + } + } + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "502": { + "description": "Where status code 502 (Bad Gateway) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_RESPONDED_WITH_ERROR | Error received from PAS. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "PAS_RESPONDED_WITH_ERROR", + "display": "Error received from PAS" + } + ] + }, + "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: ERROR" + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + }, + "504": { + "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "timeout", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "PAS_NOT_RESPONDING", + "display": "No response from PAS" + } + ] + }, + "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" + } + ] + } + } + } + } + } + }, + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to retrieve the current version of an appointment. An appointment is made to a service so a patient can be seen or for the referral to be reviewed, prior to care.\n\nA referral may, or may not, have an appointment and an appointment will always relate to a specific referral.\n\nIt is possible to have more than one appointment during the life of the referral, but never concurrent appointments. This endpoint only returns the current appointment and does not support historic views.\n\nThe outcome of a referral review can be recorded on an appointment. Cancellation or maintenance of an appointment (such as the intent to cancel the current appointment and book another one later) are recorded against the current appointment.\n\ne-RS currently supports a number of appointment scenarios:\n\n - Where a booking has been made to a directly-bookable service (DBS)\n - Where a deferred booking is made when a slot could not be found at a directly-bookable service. In this case, the service \"books\" the appointment\n - Where a booking has been made to a indirectly-bookable service (IBS)\n - Where a review is required by a triage service\n - Where a review has been conducted by a triage service\n - Where a service has rejected, or accepted an appointment\n - Where an appointment has been cancelled, and no further action is possible\n - Where an appointment is currently cancelled, but a future appointment may be made by a service later\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral in order to retrieve details of an appointment that it relates to.\n\nNote: e-RS only supports the retrieval of the most recent version of Appointment. You cannot retrieve earlier versions.\n\n## Use case\n\nAs an authenticated user\n\nI want to read details of an appointment\n\nSo that I can decide what further action may be needed.\n\n## Related endpoints\nNote that in some cases below, an appointment forms part of the referral returned.\n\nYou can always retrieve the current version of an existing appointment via [[HYPERLINK_A005]].\n\nWhen successfully accepting an appointment, the accepted appointment is returned via [[HYPERLINK_A013]].\n\nWhen successfully rejecting an appointment, the rejected appointment is returned via [[HYPERLINK_A014]].\n\nWhen booking an appointment to a directly bookable service, deferring the booking responsibility to a directly bookable service, or referring a patient into a triage service, an \"appointment\" is returned via [[HYPERLINK_A016]].\n\nWhen successfully cancelling an appointment, to action it later, the cancelled appointment is returned via [[HYPERLINK_A022]].\n\nWhen converting an advice and guidance to a referral, if the referral has an appointment, it will be returned via [[HYPERLINK_A027]].\n\nHaving successfully reviewed a referral, details of that review are shown on the appointment returned via [[HYPERLINK_A028]].\n\nYou will need the appointment version when using [[HYPERLINK_A034]], which can be obtained from [[HYPERLINK_A038]].\n\nIf an appointment is cancelled as part of [[HYPERLINK_A036]], an appointment will be returned as part of a successful response.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| --------------------------------------------------------------------------------------------------------- | ----------------------- |\n| `Appointment` booked to directly-bookable service | `appointmentId`=`70000` |\n| `Appointment` booked to indirectly-bookable service | `appointmentId`=`70001` |\n| `Appointment` deferred to service provider for booking | `appointmentId`=`70002` |\n| `Appointment` sent for triage | `appointmentId`=`70003` |\n| `Appointment` triage response (Record Triage Outcome) | `appointmentId`=`70004` |\n| `Appointment` Cancel Appointment, Action Later | `appointmentId`=`70005` |\n| `Appointment` cancelled | `appointmentId`=`70006` |\n| `Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service | `appointmentId`=`70007` |\n", + "summary": "Retrieve appointment (A038, FHIR STU3)", + "operationId": "a038-retrieve-appointment", + "tags": [ + "Change appointment" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "id", + "in": "path", + "description": "The ID of the appointment to be supplied. It must be valid and relate to an existing Appointment Id otherwise a HTTP 404 response will be returned.\n", + "required": true, + "schema": { + "type": "string", + "example": "70000" + } + } + ], + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + "examples": { + "booked-dbs": { + "summary": "`Appointment` booked to directly-bookable service", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/BookedDBS.json" + } + }, + "booked-ibs": { + "summary": "`Appointment` booked to indirectly-bookable service", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/BookedIBS.json" + } + }, + "deferred-to-provider": { + "summary": "`Appointment` deferred to service provider for booking", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/AppointmentDeferral.json" + } + }, + "deferred-to-triage": { + "summary": "`Appointment` sent for triage", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/TriageDeferral.json" + } + }, + "triage-response": { + "summary": "`Appointment` triage response (Record Triage Outcome)", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/TriageResponse.json" + } + }, + "cancel-appointment-action-later": { + "summary": "`Appointment` Cancel Appointment, Action Later", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/CAAL.json" + } + }, + "cancelled": { + "summary": "`Appointment` cancelled", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/Cancelled.json" + } + }, + "converted-and-booked": { + "summary": "`Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/AandGConvertedToDBS.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/Appointment/{id}/_history/{version}": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to retrieve a specific version of an `Appointment`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nThe pre-requisites for this endpoint are the same as for endpoint [[HYPERLINK_A038]].\n\nNote: e-RS only supports the retrieval of the most recent version of an `Appointment`. You cannot retrieve earlier versions.\n\n## Use case\n\nSee [[HYPERLINK_A038]].\n\n## Related endpoints\n\nSee [[HYPERLINK_A038]].\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| --------------------------------------------------------------------------------------------------------- | -------------------------------------- |\n| `Appointment` booked to directly-bookable service | `appointmentId`=`70000`, `version`=`5` |\n| `Appointment` booked to indirectly-bookable service | `appointmentId`=`70001`, `version`=`5` |\n| `Appointment` deferred to service provider for booking | `appointmentId`=`70002`, `version`=`5` |\n| `Appointment` sent for triage | `appointmentId`=`70003`, `version`=`5` |\n| `Appointment` triage response (Record Triage Outcome) | `appointmentId`=`70004`, `version`=`5` |\n| `Appointment` Cancel Appointment, Action Later | `appointmentId`=`70005`, `version`=`5` |\n| `Appointment` cancelled | `appointmentId`=`70006`, `version`=`5` |\n| `Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service | `appointmentId`=`70007`, `version`=`5` |\n", + "summary": "Retrieve appointment (versioned) (A038, FHIR STU3)", + "operationId": "a038-retrieve-appointment-versioned", + "tags": [ + "Change appointment" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "id", + "in": "path", + "description": "The ID of the appointment to be supplied. It must be valid and relate to an existing Appointment Id otherwise a HTTP 404 response will be returned.\n", + "required": true, + "schema": { + "type": "string", + "example": "70000" + } + }, + { + "name": "version", + "in": "path", + "description": "The version of the resource to be retrieved. It must be the latest version of the resource otherwise\n`HISTORY_NOT_SUPPORTED` error will be returned (HTTP 404 Not Found).\n", + "required": true, + "schema": { + "type": "string", + "example": "5" + } + } + ], + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "ETag": { + "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"2\"" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + "examples": { + "booked-dbs": { + "summary": "`Appointment` booked to directly-bookable service", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/BookedDBS.json" + } + }, + "booked-ibs": { + "summary": "`Appointment` booked to indirectly-bookable service", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/BookedIBS.json" + } + }, + "deferred-to-provider": { + "summary": "`Appointment` deferred to service provider for booking", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/AppointmentDeferral.json" + } + }, + "deferred-to-triage": { + "summary": "`Appointment` sent for triage", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/TriageDeferral.json" + } + }, + "triage-response": { + "summary": "`Appointment` triage response (Record Triage Outcome)", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/TriageResponse.json" + } + }, + "cancel-appointment-action-later": { + "summary": "`Appointment` Cancel Appointment, Action Later", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/CAAL.json" + } + }, + "cancelled": { + "summary": "`Appointment` cancelled", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/Cancelled.json" + } + }, + "converted-and-booked": { + "summary": "`Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service", + "value": { + "$ref": "../../../examples/retrieveAppointment/responses/AandGConvertedToDBS.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/R4/HealthcareService": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nA Patient may have 0 to 20 Services associated with a single referral. \nA service is a place where a referrer can send a patient or obtain clinical advice concerning a specific patient. \nYou can use this endpoint to obtain a set of services (up to 20) and their associated attributes, in a single call. \n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified at least one service ID in order to use this endpoint.\n\n## Use case\nAs an authenticated user\n\nI would like to obtain information about all services on my patient's current shortlist\n\nSo that I can review the entire shortlist of services and each service's current attributes\n\n## Related endpoints\n - You can retrieve service IDs on a referral via [[HYPERLINK_A005]] as long as the referral has a shortlist of at least one service.\n - You can check if a cached service has changed via [[HYPERLINK_A037]].\n - You can fetch the attributes of a single service via [[HYPERLINK_A033]].\n\n## Known Issues\nThe HealthcareService.type attribute is being returned as a singular object by this endpoint. As per the [FHIR standard](https://hl7.org/fhir/R4/), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Service Id |\n| ------------------------------------------------------------------------------------------------------------- | ---------- |\n| Search for multiple service with minimal attributes | `1,2` |\n| Search for multiple service max and min attributes | `3`,`4` |\n| Search for multiple service, where the service IDs are formatted correctly, but none of the service IDs match | `5`,`6` |\n", + "summary": "Search for healthcare services (A035, FHIR R4)", + "operationId": "a035-search-for-healthcare-services", + "tags": [ + "Retrieve healthcare service information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "query", + "name": "_id", + "description": "One or many service ID(s) to include as part of the search. Must be supplied, otherwise a 400 response will be returned.\n", + "required": true, + "schema": { + "type": "string", + "example": "1,2" + } + } + ], + "responses": { + "200": { + "description": "Bundle resource containing the `eRS-HealthcareService` resources associated to the supplied search criteria. \nThe canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle \n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "Bundle resource containg healthcare services", + "type": "object", + "required": [ + "id", + "meta", + "type", + "timestamp", + "total", + "link" + ], + "properties": { + "id": { + "type": "string", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "type": { + "type": "string", + "enum": [ + "searchset" + ], + "example": "searchset" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.00Z" + }, + "total": { + "description": "The total number of HeatlhcareServices that matched the supplied search critera", + "type": "integer", + "example": 1 + }, + "link": { + "type": "array", + "items": { + "type": "object", + "required": [ + "relation", + "url" + ], + "properties": { + "relation": { + "type": "string", + "enum": [ + "self" + ], + "example": "self" + }, + "url": { + "type": "string", + "example": "_baseUrl_/R4/HealthcareService?_id=1,2" + } + } + } + }, + "entry": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `HealthcareService` | `0..*` | | \n", + "items": { + "title": "HealthcareService", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/R4/HealthcareService/1" + }, + "resource": { + "title": "eRS-HealthcareService", + "description": "A e-referral service. The canonical URL: https://fhir.nhs.uk/StructureDefinition/eRS-HealthcareService", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "location", + "name" + ], + "properties": { + "id": { + "type": "string", + "example": "1" + }, + "meta": { + "type": "object", + "required": [ + "versionId" + ], + "properties": { + "versionId": { + "type": "string", + "example": "1" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "HealthcareService" + ], + "example": "HealthcareService" + }, + "extension": { + "type": "array", + "nullable": false, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| Extension-eRS-HoursOfOperation | 0..1 | Details the hours the current HealthcareService is operational |\n| Extension-eRS-HealthcareService-Contact | 0..* | Details any contact information for the HealthcareService |\n| Extension-eRS-ServiceInstructions | 0..1 | Outlines any specific instructions that should be followed around the HealthcareService |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-HoursOfOperation", + "description": "Extension to detail the hours of operation outlined for a HealthcareService.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" + ], + "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" + }, + "valueString": { + "type": "string", + "example": "9-5 Monday to Friday" + } + } + }, + { + "title": "Extension-eRS-HealthcareService-Contact", + "description": "Extension detailing the contact details for a HealthcareService", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" + ], + "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" + }, + "extension": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| purpose | 1..1 | Details who should be using the current contact method |\n| telecom | 1..* | Outlines the contact details to be used |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "purpose", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "purpose" + ], + "example": "purpose" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "enum": [ + "http://terminology.hl7.org/CodeSystem/contactentity-type", + "https://fhir.nhs.uk/CodeSystem/eRS-Purpose" + ], + "example": "http://terminology.hl7.org/CodeSystem/contactentity-type" + }, + "code": { + "type": "string", + "enum": [ + "BILL", + "ADMIN", + "HR", + "PAYOR", + "PATINF", + "PRESS", + "HEALTHCARE_PROFESSIONALS" + ], + "example": "PATINF" + }, + "display": { + "type": "string", + "enum": [ + "Billing", + "Administrative", + "Human Resource", + "Payor", + "Patient", + "Press", + "Healthcare Professionals" + ], + "example": "Patient" + } + } + } + } + } + } + } + }, + { + "type": "object", + "title": "telecom", + "required": [ + "url", + "valueContactPoint" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "telecom" + ], + "example": "telecom" + }, + "valueContactPoint": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "phone", + "email" + ], + "example": "phone" + }, + "value": { + "type": "string", + "example": "01235 209823" + } + } + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-ServiceInstructions", + "description": "Extension to detail any service instructions for a HealthcareService.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" + ], + "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" + }, + "valueString": { + "type": "string" + } + } + } + ] + } + }, + "location": { + "type": "array", + "items": { + "type": "object", + "properties": { + "identifier": { + "description": "Reference detailing the location a service is based within.", + "type": "object", + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-site-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-site-code" + }, + "value": { + "type": "string", + "example": "R6901" + } + } + } + } + } + }, + "name": { + "type": "string", + "example": "Direct SVC 1", + "description": "Name of the current HealthcareService within eRS" + }, + "type": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" + ], + "example": "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" + }, + "code": { + "type": "string", + "enum": [ + "DAY_CASE", + "FIRST_OUTPATIENT", + "ASSESSMENT_SERVICE", + "GPSI", + "AHP_CLINIC", + "DIAGNOSTIC", + "NURSE_CLINIC", + "OPHTHALMOLOGIST", + "TELEPHONE_ASSESSMENT" + ], + "example": "DAY_CASE" + }, + "display": { + "type": "string", + "enum": [ + "Day Case", + "First Outpatient", + "Assessment Service", + "GPSI", + "AHP Clinic", + "Diagnostic", + "Nurse Clinic", + "Ophthalmologist", + "Telephone Assessment" + ], + "example": "Day Case" + } + } + } + } + } + } + }, + "characteristic": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-RequestFlowType", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" + ], + "example": "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" + }, + "code": { + "type": "string", + "enum": [ + "BOOKABLE", + "REVIEW", + "ADVICE_AND_GUIDANCE" + ], + "example": "BOOKABLE" + }, + "display": { + "enum": [ + "A service which supports a patient appointment", + "A service that reviews referrals, without the support or need for any appointment with the patient to be made", + "A service which can discuss the patient and receive guidance rather than a patient attending an appointment" + ], + "example": "A service which supports a patient appointment" + } + } + }, + { + "type": "object", + "title": "eRS-BookableType", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" + ], + "example": "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" + }, + "code": { + "type": "string", + "enum": [ + "DIRECTLY_BOOKABLE", + "INDIRECTLY_BOOKABLE" + ], + "example": "DIRECTLY_BOOKABLE" + }, + "display": { + "enum": [ + "Directly Bookable", + "Indirectly Bookable" + ], + "example": "Directly Bookable" + } + } + } + ] + } + } + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "match" + ], + "example": "match" + } + } + } + } + } + } + } + }, + "examples": { + "multiple-services-minimal": { + "summary": "Search for multiple service with minimal attributes.", + "value": { + "$ref": "../../../examples/searchForServices/responses/searchServiceWithMinmumalAttributes.json" + } + }, + "multiple-services-max-min": { + "summary": "Search for multiple service max and min attributes.", + "value": { + "$ref": "../../../examples/searchForServices/responses/searchServiceWithMaxAndMinAttributes.json" + } + }, + "multiple-services-empty": { + "summary": "Search for multiple service, where the service IDs are formatted correctly, but none of the service IDs match", + "value": { + "$ref": "../../../examples/searchForServices/responses/searchServiceWithEmptyResponse.json" + } + } + } + } + } + }, + "400": { + "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------|\n| REC_BAD_REQUEST | invalid | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | Incorrect or missing expected value. For example; Service Id is invalid or missing, or an an attempt to request more than 20 Service Ids |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "invalid", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_BAD_REQUEST" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "ACCESS_DENIED" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_RELATIONSHIP | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The caller has no legitimate relationship with the resource. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_FORBIDDEN" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-found", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_FOUND" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-supported", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_ACCEPTABLE" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "429": { + "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "throttled", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "TOO_MANY_REQUESTS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "500": { + "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_SERVER_ERROR" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_UNAVAILABLE" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/ReferralRequest/{ubrn}/$ers.cancelReferral": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\nUse this endpoint to cancel a referral and the current appointment, if there is one. Cancelling a referral is a one-way process and results in an end-state. No further progression of care can occur once this action has been performed.\n\nA reason for cancelling an appointment must be provided. A comment on the cancellation is conditionally mandatory depending on the reason selected. See pre-requisites and related referrals for more information.\n\nYou can check if you can cancel a referral by calling [[HYPERLINK_A029]].\n\ne-RS does not allow a referral to be cancelled, without also cancelling the current appointment. Therefore, if there is a current appointment associated with the referral, this *must* be cancelled in advance, or at the same time.\n\nIn order to cancel (only) an appointment you must use [[HYPERLINK_A034]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Application-restricted, unattended access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nTo access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review. The only use case currently permitted is for non-clinical provider actions.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n- `SERVICE_PROVIDER_CLINICIAN`\n- `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou must use [[HYPERLINK_A004]] to retrieve a list of reference data, which detail the reason the cancellation is being performed. You can only use reference data from the set `REFERRAL-CANCELLATION-REASON`.\n\n\nTo find out which reference data from this set can be used, the following filters can be used depending on the cancellation scenario:\n\n***1. I want to cancel the referral and the current appointment as a Referrer***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `canCancelAppointment` must be true, and\n\n * `effectiveFrom` must be in the past, and \n\n * if provided, `effectiveTo` must **not** be in the past\n\n\n***2. I want to cancel a referral, for which there is no current appointment as a Referrer***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `canCancelAppointment` could be true or false, and\n\n * `effectiveFrom` must be in the past, and\n\n * if provided, `effectiveTo` must **not** be in the past\n\n***3. I want to cancel the referral and the current appointment as a Service Provider***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `SERVICE_PROVIDER_CLINICIAN` or `SERVICE_PROVIDER_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `appointmentRequestCancellationReasonType` must be `PROVIDER` and `PATIENT`, and\n\n * `canCancelAppointment` must be true, and\n\n * `effectiveFrom` must be in the past, and \n\n * `effectiveTo` must **not** be in the past\n\n***4. I want to cancel a referral, for which there is no current appointment as a Service Provider***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `SERVICE_PROVIDER_CLINICIAN` or `SERVICE_PROVIDER_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `appointmentRequestCancellationReasonType` must be `PROVIDER` and `PATIENT`, and\n\n * `canCancelAppointment` could be true or false, and\n\n * `effectiveFrom` must be in the past, and \n\n * `effectiveTo` must **not** be in the past\n\n***5. I want to cancel the triage referral as a Service Provider***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `SERVICE_PROVIDER_CLINICIAN` or `SERVICE_PROVIDER_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `appointmentRequestCancellationReasonType` must be `PROVIDER_TRIAGE`, and\n\n * `effectiveFrom` must be in the past, and \n\n * `effectiveTo` must **not** be in the past\n\nYou need to use [[HYPERLINK_A005]] to retrieve details of the referral in order to make this clinical decision.\n\n## Important note when retrieving attachments\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. \n\n## Important notes when providing an appointment request cancellation reason\n\nWhen cancelling a referral as a Service Provider Clinician:\n\n * If the referral is in the **\"Triaged - Provider to action\"** state, the cancellation reason must be an **Appointment Request End Triage Reason** type.\n\n * If the referral is **not** in that state, the cancellation reason must be a **Provider Appointment Request Cancellation Reason** or **Patient Appointment Request Cancellation Reason** type.\n\n## Use case\nAs an authenticated user\n\nI need to cancel a referral, and any active appointments\n\nSo that the referral is no longer processed\n\n## Related endpoints\nYou can retrieve the reference data needed to cancel a referral by using [[HYPERLINK_A004]]. This contains \"reasons\" for cancellation.\n\nYou can check if you can cancel the referral by checking [[HYPERLINK_A029]].\n\nYou can use [[HYPERLINK_A005]] to obtain a current appointment reference, if there is one. This endpoint will also provide you with the current UBRN version.\n\nYou can use [[HYPERLINK_A038]] to view the current appointment (where applicable).\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request details |\n| ------------------------------------------------------------------------ | ------------------------------------- |\n| Reason for Cancellation without Comment (Comment Not Mandatory) | Intend Private With No Comment |\n| Reason for Cancellation with Comment (Comment Mandatory) | Patient Cancellation With Comment |\n| Cancelled Referral | Raised in Error |\n| Cancelled Appointment and Referral | Referrer Cancellation |\n| Cancelled Referral After Prior Appointment Cancellation | Treatment No Longer Required |\n| Cancelled Referral with Existing Review Outcome | Intend Private With Comment |\n| Cancelled Referral (Provider) without Comment (Comment Not Mandatory) | Provider Cancellation With No Comment |\n| Cancelled Referral with Triage Response | Provider Cancellation via End Triage |\n", + "summary": "Cancel referral (A036, FHIR STU3)", + "operationId": "a036-cancel-referral", + "tags": [ + "Manage referral" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the referral request\n", + "required": true, + "schema": { + "type": "string", + "example": "000000070000" + } + }, + { + "in": "header", + "name": "If-Match", + "description": "The version of the resource to be updated\n", + "required": true, + "schema": { + "type": "string", + "pattern": "^W/\"[0-9]+\"$", + "example": "W/\"4\"" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CancelReferral-Request-Parameters", + "type": "object", + "description": "Parameters containing the cancellation reason and comment for referral cancellation request.", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Request-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Request-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `cancellationReason` | `1..1` | The reason why the referral is being cancelled |\n| `cancellationComments` | `0..1` | This may be mandatory if mandatory comment indicator is set to 'Yes' for the Cancellation Reason Type selected. Maximum 2000 characters. |\n", + "items": { + "anyOf": [ + { + "title": "cancellationReason", + "description": "Parameter to supply a cancellationReason", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "cancellationReason" + ], + "example": "cancellationReason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "INTEND_PRIVATE" + } + } + } + } + }, + { + "title": "cancellationComments", + "description": "Parameter to supply the cancellationComments", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "cancellationComments" + ], + "example": "cancellationComments" + }, + "valueString": { + "type": "string", + "example": "Patient will go to a private clinic" + } + } + } + ] + } + } + } + }, + "examples": { + "cancel-referral-without-comment": { + "summary": "Reason for Cancellation without Comment (Comment Not Mandatory)", + "value": { + "$ref": "../../examples/cancelReferral/requests/IntendPrivateWithoutComment.json" + } + }, + "cancel-referral-patient-cancellation": { + "summary": "Reason for Cancellation with Comment (Comment Mandatory)", + "value": { + "$ref": "../../examples/cancelReferral/requests/PatientRequestCancellationOther.json" + } + }, + "cancel-referral-raised-in-error": { + "summary": "Cancelled Referral", + "value": { + "$ref": "../../examples/cancelReferral/requests/RaisedInError.json" + } + }, + "cancel-referral-referrer-cancellation": { + "summary": "Cancelled Appointment and Referral", + "value": { + "$ref": "../../examples/cancelReferral/requests/ReferrerCancellation.json" + } + }, + "cancel-referral-no-longer-required": { + "summary": "Cancelled Referral After Prior Appointment Cancellation", + "value": { + "$ref": "../../examples/cancelReferral/requests/NoLongerRequired.json" + } + }, + "cancel-referral-with-reason-and-comment": { + "summary": "Cancelled Referral with Existing Review Outcome", + "value": { + "$ref": "../../examples/cancelReferral/requests/IntendPrivateWithComment.json" + } + }, + "cancel-referral-provider-without-comment": { + "summary": "Cancelled Referral (Provider) without Comment (Comment Not Mandatory)", + "value": { + "$ref": "../../examples/cancelReferral/requests/bookedOutsideCabWithoutComment.json" + } + }, + "cancel-referral-with-triage-response": { + "summary": "Cancelled Referral with Triage Response", + "value": { + "$ref": "../../examples/cancelReferral/requests/outpatientService.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "e-RS Referral Request", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CancelReferral-Response-Parameters", + "type": "object", + "description": "Parameters containing for the cancelled referral with/without cancelled appointment.", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Response-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Response-Parameters-1" + } + } + } + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `updatedReferralRequest` | `1..1` | Cancelled Referral Request . |\n| `updatedAppointment` | `0..1` | The cancelled appointment resource is only returned if appointment was cancelled part of this cancel referral operation.|\n", + "items": { + "anyOf": [ + { + "title": "updatedReferralRequest", + "description": "Parameter containing the cancelled referral request", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "updatedReferralRequest" + ], + "example": "updatedReferralRequest" + }, + "resource": { + "title": "eRS-ReferralRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "subject", + "supportingInfo", + "intent", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ReferralRequest" + ], + "example": "ReferralRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-Commissioning-Rule-Org", + "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", + "type": "object", + "required": [ + "url", + "valueIdentifier" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralState", + "description": "Extension to outline the current state of a ReferralRequest within e-RS.", + "type": "object", + "required": [ + "url", + "extension" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" + }, + "extension": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", + "items": { + "anyOf": [ + { + "title": "Extension - Referral State", + "description": "Extension to provide the Referral State.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "state" + ], + "example": "state" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" + }, + "code": { + "type": "string", + "enum": [ + "REJECTED", + "CANCELLED_REFERRAL", + "DID_NOT_ATTEND", + "ASSESSMENT_RESULT", + "TRIAGE_RESPONSE", + "APPT_CANCELLED_BY_PROVIDER", + "APPT_CANCELLED_BY_PATIENT", + "AWAITING_TRIAGE", + "NOT_BOOKED", + "DEFERRED_TO_PROVIDER", + "BOOKED", + "TRIAGED_PROVIDER_TO_ACTION" + ], + "example": "APPT_CANCELLED_BY_PATIENT" + }, + "display": { + "type": "string", + "enum": [ + "Rejected", + "Cancelled Referral", + "Did Not Attend", + "Assessment Result", + "Triage Response", + "Appointment Cancelled By Provider", + "Appointment Cancelled By Patient", + "Awaiting Triage", + "Not Booked", + "Deferred To Provider", + "Booked", + "Triaged - Provider To Action" + ], + "example": "Appointment Cancelled By Patient" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason", + "description": "Extension to provide the Referral State Reason.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "reason" + ], + "example": "reason" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" + }, + "code": { + "type": "string", + "example": "PATIENT_ILL" + }, + "display": { + "type": "string", + "example": "Patient Ill" + } + } + } + } + }, + { + "title": "Extension - Referral State Reason Comment", + "description": "Extension to provide the Referral State Reason Comment.", + "type": "object", + "required": [ + "url", + "valueString" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "comments" + ], + "example": "comments" + }, + "valueString": { + "type": "string", + "example": "Patient could not attend appointment due to them being ill." + } + } + } + ] + } + } + } + }, + { + "title": "Extension-eRS-Appointment", + "description": "Extension to supply the appointment for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#appointment" + } + } + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoFirstSubmitted", + "description": "Date and time the clinical information was first submitted", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-ClinicalInfoLastUpdated", + "description": "Date and time the clinical information was last updated", + "type": "object", + "required": [ + "url", + "valueDateTime" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + { + "title": "Extension-eRS-Appointment-Reference", + "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Appointment/70000" + } + } + } + } + }, + { + "title": "Extension-eRS-AdditionalRequirement", + "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVOCACY", + "INTERPRETER", + "TRANSPORT" + ], + "example": "ADVOCACY" + }, + "display": { + "type": "string", + "enum": [ + "Advocacy", + "Interpreter", + "Transport" + ], + "example": "Advocacy" + } + } + } + } + }, + { + "title": "Extension-eRS-eReferralPathwayStart", + "description": "Date and time of the pathway start", + "type": "object", + "required": [ + "url", + "valueInstant" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" + }, + "valueDateTime": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "specialty": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "maxItems": 1, + "minItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "supportingInfo": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70000" + } + } + } + }, + "intent": { + "type": "string", + "enum": [ + "plan" + ], + "example": "plan" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + } + } + }, + { + "title": "updatedAppointment", + "description": "Parameter containing the cancelled appointment", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "updatedAppointment" + ], + "example": "updatedAppointment" + }, + "resource": { + "title": "eRS-Appointment", + "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "description", + "incomingReferral", + "participant" + ], + "properties": { + "id": { + "type": "string", + "example": "'appointment'\n'70001'\n" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" + } + }, + "versionId": { + "type": "string", + "nullable": true, + "example": "3" + } + } + }, + "language": { + "type": "string", + "example": "en" + }, + "resourceType": { + "type": "string", + "enum": [ + "Appointment" + ], + "example": "Appointment" + }, + "status": { + "type": "string", + "enum": [ + "proposed", + "pending", + "booked", + "arrived", + "fulfilled", + "cancelled", + "noshow" + ], + "example": "proposed" + }, + "reason": { + "nullable": true, + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "title": "eRS-ReviewReason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" + }, + "code": { + "type": "string", + "enum": [ + "NO_SLOTS_AT_SERVICE", + "SLOT_NOT_AVAILABLE", + "BOOKING_ATTEMPT_PROBLEM", + "TRIAGE" + ], + "example": "NO_SLOTS_AT_SERVICE" + } + } + }, + { + "type": "object", + "title": "eRS-ReviewOutcome", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", + "CANCEL_APPOINTMENT_ACTION_LATER", + "RETURN_TO_REFERRER_WITH_ADVICE", + "ACCEPT_REFER_BOOK_LATER" + ], + "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Provider Converted Advice and Guidance, Admin to Refer" + } + } + }, + { + "type": "object", + "title": "eRS-Cancellation-Reason", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" + }, + "code": { + "type": "string", + "example": "PATIENT_HOLIDAY" + }, + "display": { + "type": "string", + "nullable": true, + "example": "Patient on holiday" + } + } + } + ] + } + } + } + } + }, + "description": { + "type": "string", + "enum": [ + "e-Referral Appointment" + ], + "example": "e-Referral Appointment" + }, + "start": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T08:30:00.000Z" + }, + "end": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "slot": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "Slot/11002001" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "comment": { + "type": "string", + "nullable": true + }, + "incomingReferral": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "ReferralRequest/000000070000/_history/14" + } + } + }, + "minItems": 0, + "maxItems": 1 + }, + "participant": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", + "items": { + "anyOf": [ + { + "type": "object", + "title": "Patient", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "Service", + "properties": { + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "nullable": true, + "example": "Cardiology Triage Business Service" + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + }, + { + "type": "object", + "title": "AllocatedClinician", + "required": [ + "type", + "actor", + "status" + ], + "properties": { + "type": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://hl7.org/fhir/ValueSet/encounter-participant-type" + ], + "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" + }, + "code": { + "type": "string", + "enum": [ + "CON" + ], + "example": "CON" + } + } + } + } + } + }, + "actor": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "accepted" + ], + "example": "accepted" + } + } + } + ] + }, + "minItems": 2, + "maxItems": 3 + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "cancelled-referral-intend-private-without-comment": { + "summary": "Cancelled Referral without Booking with Reason 'Patient will go to a private clinic' without Comment (Comment Not Mandatory)", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledReferralIntendPrivateWithoutComment.json" + } + }, + "cancelled-referral-patient-other-reason": { + "summary": "Cancelled Referral without Booking with Reason 'Other' with Comment (Comment Mandatory)", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledReferralPatientOther.json" + } + }, + "cancelled-referral-raised-in-error": { + "summary": "Cancelled Referral without Booking with Reason 'Referral created by mistake'", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledReferralRaisedInError.json" + } + }, + "cancelled-referral-with-booking-referrer-cancellation": { + "summary": "Cancelled Referral with Booking with Reason 'Other - Referrer request cancellation'", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledBookedReferralReferrerCancellation.json" + } + }, + "cancelled-referral-with-cancelled-booking-no-longer-required": { + "summary": "Cancelled Referral with Cancelled Booking with Reason 'Referral no longer needed'", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledReferralWithCancelledBookingNoLongerRequired.json" + } + }, + "cancelled-referral-with-deferral-intend-private-with-comment": { + "summary": "Cancelled Referral with Existing Review Outcome with Reason 'Patient will go to a private clinic'", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledReferralResolvedDeferralIntendPrivateWithComment.json" + } + }, + "cancelled-referral-provider-booked-outside": { + "summary": "Cancelled Referral without Booking with Reason 'Patient booked outside NHS e-Referral Service' without Comment (Comment Not Mandatory)'", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledReferralBookedOutsideCabWithoutComment.json" + } + }, + "cancelled-referral-provider-triaged-and-sent-to-outpatient-service": { + "summary": "Cancelled Referral with Triage Response with Reason 'Sent to outpatient service not available in this system' with Comment (Comment Mandatory)'", + "value": { + "$ref": "../../../examples/cancelReferral/responses/CancelledReferralOutpatientService.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" + }, + "412": { + "description": "Precondition Failed - Mandatory data is missing" + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNABLE_TO_CANCEL_APPOINTMENT | System is unable to cancel the appointment. |\n| INAPPROPRIATE_VALUE\t | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "423": { + "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "502": { + "description": "Where status code 502 (Bad Gateway) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_RESPONDED_WITH_ERROR | Error received from PAS. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "PAS_RESPONDED_WITH_ERROR", + "display": "Error received from PAS" + } + ] + }, + "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: ERROR" + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + }, + "504": { + "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "timeout", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "PAS_NOT_RESPONDING", + "display": "No response from PAS" + } + ] + }, + "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" + } + ] + } + } + } + } + } + } + }, + "/R4/Practitioner": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to determine which e-RS users a `SERVICE_PROVIDER_CLINICIAN_ADMIN` is allowed to work \"on-behalf-of\".\n\nNote: In e-RS, `SERVICE_PROVIDER_CLINICIAN_ADMIN` users always act \"on-behalf-of\" a `SERVICE_PROVIDER_CLINICIAN`. This endpoint specifically helps `SERVICE_PROVIDER_CLINICIAN_ADMIN` identify who they are allowed to log in as.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nTo use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles depending on the query being invoked:\n\n| Query | e-RS Role(s) |\n| -------------------------------------------------------------------- | --------------------------------- |\n| onBehalfOf | `SERVICE_PROVIDER_CLINICIAN_ADMIN` |\n\n## Use case\n\nAs an authenticated user who has the `SERVICE_PROVIDER_CLINICIAN_ADMIN` role\n\nI need to know which provider clinical users I am allowed to work \"on-behalf-of\" at my provider organisation\n\nSo I can log in as a `SERVICE_PROVIDER_CLINICIAN_ADMIN` user and complete tasks on behalf of a chosen `SERVICE_PROVIDER_CLINICIAN` user.\n\n## Related endpoints\n\nTo perform actions as a `SERVICE_PROVIDER_CLINICIAN_ADMIN` user, you must provide one of the returned Practitioner IDs, in the `NHSD-eRS-On-Behalf-Of-User-ID` header parameter, to indicate which `SERVICE_PROVIDER_CLINICIAN` the call is on-behalf-of.\n", + "summary": "Retrieve \"on-behalf-of\" practitioner user information (A040, FHIR R4)", + "operationId": "a040-retrieve-practitioner-info", + "tags": [ + "Retrieve user information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "query", + "name": "_query", + "description": "A mandatory URL parameter where \"onBehalfOf\" is the name of the query operation.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "onBehalfOf" + ], + "example": "onBehalfOf" + } + } + ], + "responses": { + "200": { + "description": "The response body is a `Bundle` that contains `Practitioner` entries which define the [[HYPERLINK_ERS_BUS_FUNCTIONS]] that the user has available at each `Organisation` where they have a role.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "Bundle resource containing On-Behalf-Of practitioners", + "description": "The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle \n", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "type", + "total", + "timestamp", + "link" + ], + "properties": { + "id": { + "type": "string", + "example": "08acc887-6a7b-4b38-8f50-022e41319efe" + }, + "resourceType": { + "type": "string", + "enum": [ + "Bundle" + ], + "example": "Bundle" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + "type": { + "type": "string", + "enum": [ + "searchset" + ], + "example": "searchset" + }, + "total": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 1 + }, + "timestamp": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "link": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "relation", + "url" + ], + "properties": { + "relation": { + "type": "string", + "enum": [ + "self" + ], + "example": "self" + }, + "url": { + "type": "string", + "example": "_baseUrl_/R4/Practitioner?_query=onBehalfOf" + } + } + } + }, + "entry": { + "type": "array", + "items": { + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "Practitioner/111111111111" + }, + "resource": { + "type": "object", + "description": "A UKCore-Practitioner. The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner", + "required": [ + "id", + "meta", + "resourceType", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "111111111111" + }, + "resourceType": { + "type": "string", + "enum": [ + "Practitioner" + ], + "example": "Practitioner" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + } + } + }, + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/sds-user-id" + ], + "example": "https://fhir.nhs.uk/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "111111111111" + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "match" + ], + "example": "match" + } + } + } + } + } + } + } + }, + "examples": { + "example-response-body": { + "summary": "Example response body", + "value": { + "$ref": "../../../examples/retrieveOboUsers/responses/PractitionerBundle.json" + } + } + } + } + } + }, + "400": { + "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------|\n| REC_BAD_REQUEST | invalid | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The query parameter _query is missing or has an invalid value. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "invalid", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_BAD_REQUEST" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "ACCESS_DENIED" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_FORBIDDEN" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-supported", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_ACCEPTABLE" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "429": { + "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "throttled", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "TOO_MANY_REQUESTS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "500": { + "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_SERVER_ERROR" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_UNAVAILABLE" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/CommunicationRequest/{ubrn}/$ers.generateCRI": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to generate a PDF file that summarises an advice and guidance request including the conversation. \nThis endpoint cannot be used to obtain a PDF file for a referral request.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of an advice and guidance request.\n\n## Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n## Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Important note\n\nAn advice and guidance request may have been converted to a referral (with the same UBRN), \nand in addition a referral pathway in e-RS can be made up of more than one UBRN. \nAs such, it is important that all clinical information is obtained across all the related UBRNs in the pathway. \nThese can be identified using [[HYPERLINK_A005]].\n\nIf the converted advice and guidance request is referred to a service outside of your organisation, \nthe subsequent referral information may not be accessible due to legitimate relationship rules. \nHowever, the advice and guidance summary ([[HYPERLINK_A024]]), \nattachments ([[HYPERLINK_A006]]), advice and guidance conversation ([[HYPERLINK_A025]]) and \nclinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved.\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve a PDF file overview of the advice and guidance request\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\nYou can retrieve a PDF overview for an advice and guidance request that has been converted to a referral using [[HYPERLINK_A007]].\n\nYou can retrieve structured information about advice and guidance using [[HYPERLINK_A024]] and [[HYPERLINK_A025]].\n\nYou can retrieve a referral using [[HYPERLINK_A005]].\n\nYou can retrieve clinical attachments that are associated with a referral using [[HYPERLINK_A006]].\n", + "summary": "Retrieve advice and guidance overview PDF (A043, FHIR STU3)", + "operationId": "a043-retrieve-advice-and-guidance-overview-pdf", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "name": "ubrn", + "in": "path", + "description": "The unique booking reference number of the advice and guidance request\n", + "required": true, + "schema": { + "type": "string", + "example": "000049146177" + } + } + ], + "responses": { + "200": { + "description": "Response contains the binary stream of the advice and guidance overview PDF.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Disposition": { + "description": "The description of the type of content provided.\n", + "required": true, + "schema": { + "type": "string", + "example": "attachment; filename=\"000049146177_Advice_And_Guidance_20220610143044.pdf\"" + } + }, + "Content-Length": { + "description": "The length of the response.\n", + "required": true, + "schema": { + "type": "string", + "example": "3111" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/pdf" + ], + "example": "application/pdf" + } + } + }, + "content": { + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "404": { + "description": "Not Found" + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an advice and guidance request. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the advice and guidance request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/STU3/CommunicationRequest/$ers.createAdviceAndGuidance": { + "post": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\nUse this endpoint to create an advice and guidance request from a referring organisation to a service providing organisation.\n\nAn advice and guidance request includes important contextual information. For example, the service and specialty to which advice has been requested. Creating the request also starts the conversation between a referrer seeking advice and a provider from whom the advice is sought.\n\nConversation messages can include attachments.\n\n## Supported security patterns\n\nHealthcare worker, user-restricted access\n\n## Important notes\n\nThe maximum number of services allowed on a given shortlist is 1.\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A024]], [[HYPERLINK_A025]] and [[HYPERLINK_A042]] specifications.\n\n## Pre-requisites\nTo use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a patient, for example via [[HYPERLINK_PDS]].\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\nIf you want to include attachments with the request, you need to use [[HYPERLINK_A020]] so they are ready to be associated with the request.\n\n## Use case\n\nAs an authenticated user \n\nI need to request some advice from a given service\n\nSo I can either initiate my patient's referral pathway or provide recommended treatment.\n\n## Related endpoints\n\nProviders are able to respond to an advice and guidance request via [[HYPERLINK_A026]] or convert the advice and guidance request into a referral via [[HYPERLINK_A027]].\n\nReferrers and providers can use:\n\n[[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request\n\n[[HYPERLINK_A025]] to retrieve the advice and guidance conversation.\n", + "summary": "Create advice and guidance request (A044, FHIR STU3)", + "operationId": "a044-create-advice-and-guidance-request", + "tags": [ + "Request advice" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "REFERRING_CLINICIAN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CreateAdviceAndGuidance-Request-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Request-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Request-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient the Advice request relates to. |\n| `providerConversionAuthorisation` | `1..1` | A flag detailing whether or not the provider who deals with this advice request is authorised to convert this Advice Request into a Referral |\n| `shortlist` | `1..1` | A list of services where the Advice Request should be sent to. Note currently only shortlists with a single Service included are supported. |\n| `request` | `1..1` | An initial message outlining the request. Maximum 8000 characters. |\n| `referringClinician` | `0..1` | Detail the Referring Clinician that a Referring Clinician Admin is acting on behalf off. Only permitted when creating an Advice Request as a user using the Referring Clinician Admin business function where it is also mandatory. |\n| `requestAttachmentFile` | `0..*` | A set of attachments to be included with the initial request. |\n", + "items": { + "anyOf": [ + { + "title": "Patient", + "description": "Parameter to supply a patient", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "patient" + ], + "example": "patient" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + { + "title": "ProviderConversionAuthorisation", + "description": "Parameter to define the Provider's conversion authorisation", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "providerConversionAuthorisation" + ], + "example": "providerConversionAuthorisation" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + }, + "code": { + "type": "string", + "enum": [ + "AUTHORISED_TO_CONVERT", + "NOT_AUTHORISED_TO_CONVERT" + ], + "example": "AUTHORISED_TO_CONVERT" + } + } + } + } + }, + { + "title": "Shortlist", + "description": "Parameter to supply a shortlist", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "shortlist" + ], + "example": "shortlist" + }, + "resource": { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + } + } + }, + { + "title": "request", + "description": "Parameter to supply a request", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "request" + ], + "example": "request" + }, + "valueString": { + "type": "string", + "example": "Please provide some advice around this case." + } + } + }, + { + "title": "ReferringClinician", + "description": "Parameter to supply a referring clinician", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "referringClinician" + ], + "example": "referringClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "requestAttachmentFile", + "description": "Parameter to supply an attachment alongside a request", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "requestAttachmentFile" + ], + "example": "requestAttachmentFile" + }, + "resource": { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "ADVICE_REQUEST" + ], + "example": "ADVICE_REQUEST" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + } + } + } + } + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "rca-with-attachments": { + "summary": "Example created by RCA with attachments authorising the provider to convert to a referral request.", + "value": { + "$ref": "../../examples/createAdviceAndGuidance/requests/ExampleRCAWithAttachments.json" + } + }, + "rc-without-attachments": { + "summary": "Example created by RC without attachments not authorising the provider to convert to a referral request.", + "value": { + "$ref": "../../examples/createAdviceAndGuidance/requests/ExampleRCWithoutAttachments.json" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "An Advice And Guidance Request created within e-RS.", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-CreateAdvice-Response-Parameters", + "type": "object", + "required": [ + "resourceType", + "meta", + "parameter" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ] + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Response-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Response-Parameters-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "parameter": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | -------------------------------------------------------------|\n| `createdCommunicationRequest` | `1..1` | The created Advice And Guidance Request summary resource. |\n| `createdCommunication` | `1..1` | The created Initial Request message within the conversation. |\n", + "items": { + "anyOf": [ + { + "title": "createdCommunicationRequest", + "description": "The created Advice Request summary resource.", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "createdCommunicationRequest" + ], + "example": "createdCommunicationRequest" + }, + "resource": { + "title": "eRS-CommunicationRequest", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "contained", + "extension", + "status", + "category", + "subject", + "recipient", + "sender", + "requester", + "identifier" + ], + "properties": { + "id": { + "type": "string", + "example": "000000070000" + }, + "meta": { + "type": "object", + "required": [ + "profile", + "versionId" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" + } + }, + "versionId": { + "type": "string", + "example": "3" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "CommunicationRequest" + ], + "example": "CommunicationRequest" + }, + "contained": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", + "items": { + "anyOf": [ + { + "title": "eRS-Shortlist-List", + "description": "A list of services representing the services available to the patient to have treatment at", + "type": "object", + "required": [ + "status", + "mode", + "meta", + "resourceType", + "entry" + ], + "properties": { + "id": { + "type": "string", + "example": "shortlist" + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "mode": { + "type": "string", + "enum": [ + "snapshot" + ], + "example": "snapshot" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" + } + } + } + }, + "contained": { + "type": "array", + "items": { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + } + }, + "extension": { + "type": "array", + "nullable": true, + "maxItems": 1, + "minItems": 1, + "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-Shortlist-SearchCriteria", + "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#serviceSearchCriteria" + } + } + } + } + } + ] + } + }, + "resourceType": { + "type": "string", + "enum": [ + "List" + ], + "example": "List" + }, + "entry": { + "type": "array", + "items": { + "title": "Singular entry with service details", + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + }, + "display": { + "type": "string", + "example": "Good Cardiology Business Service" + } + } + } + } + }, + "minItems": 1, + "maxItems": 20 + } + } + }, + { + "title": "eRS-ServiceSearchCriteria-Parameters", + "description": "The criteria used to search for services", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "parameter" + ], + "properties": { + "id": { + "type": "string", + "example": "serviceSearchCriteria" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Parameters" + ], + "example": "Parameters" + }, + "parameter": { + "type": "array", + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", + "items": { + "anyOf": [ + { + "title": "Priority", + "description": "Details the priority parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "priority" + ], + "example": "priority" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + }, + { + "title": "Specialty", + "description": "Details the specialty parameter", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "specialty" + ], + "example": "specialty" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + } + } + } + } + }, + { + "title": "ClinicType", + "description": "Details the clinic type that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicType" + ], + "example": "clinicType" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" + }, + "code": { + "type": "string", + "example": "HEART_FAILURE" + } + } + } + } + }, + { + "title": "IndicativeAppointmentWaitTimeLimit", + "description": "Details the indicative appointment wait time limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "indicativeAppointmentWaitTimeLimit" + ], + "example": "indicativeAppointmentWaitTimeLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 50 + } + } + }, + { + "title": "Postcode", + "description": "Details the postcode value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "postcode" + ], + "example": "postcode" + }, + "valueString": { + "type": "string", + "example": "LS1 2UT" + } + } + }, + { + "title": "DistanceLimit", + "description": "Details the distance limit value specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueUnsignedInt" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "distanceLimit" + ], + "example": "distanceLimit" + }, + "valueUnsignedInt": { + "type": "integer", + "minimum": 0, + "format": "int32", + "example": 123 + } + } + }, + { + "title": "ClinicalTerm", + "description": "Details the clinical term that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "clinicalTerm" + ], + "example": "clinicalTerm" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://snomed.info/sct" + ], + "example": "http://snomed.info/sct" + }, + "code": { + "type": "string", + "example": "1003" + } + } + } + } + }, + { + "title": "NamedClinician", + "description": "Details the named clinician that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "namedClinician" + ], + "example": "namedClinician" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + { + "title": "AgeAndGenderAppropriate", + "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", + "type": "object", + "required": [ + "name", + "valueBoolean" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "ageAndGenderAppropriate" + ], + "example": "ageAndGenderAppropriate" + }, + "valueBoolean": { + "type": "boolean", + "example": true + } + } + }, + { + "title": "CommissioningProvisioning", + "description": "Details the commissioning provisioning flag detailed in a search criteria", + "type": "object", + "required": [ + "name", + "valueCoding" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "commissioningProvisioning" + ], + "example": "commissioningProvisioning" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" + }, + "code": { + "type": "string", + "enum": [ + "ALL_AVAILABLE_FOR_BOOKING", + "ALL_SERVICES", + "LOCALLY_COMMISSIONABLE", + "NATIONALLY_AVAILABLE" + ], + "example": "ALL_AVAILABLE_FOR_BOOKING" + } + } + } + } + }, + { + "title": "Organisation", + "description": "Details the organisation that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueIdentifier" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "organisation" + ], + "example": "organisation" + }, + "valueIdentifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://directory.spineservices.nhs.uk/STU3/Organization" + ], + "example": "https://directory.spineservices.nhs.uk/STU3/Organization" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + { + "title": "Place", + "description": "Details the place that was specified in a search criteria", + "type": "object", + "required": [ + "name", + "valueString" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "place" + ], + "example": "place" + }, + "valueString": { + "type": "string", + "example": "Leeds" + } + } + } + ] + } + } + } + }, + { + "title": "DocumentReference", + "description": "A reference to a document", + "type": "object", + "required": [ + "meta", + "resourceType", + "type", + "status", + "indexed", + "content" + ], + "properties": { + "id": { + "type": "string", + "example": "DocumentReference-70002" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "DocumentReference" + ], + "example": "DocumentReference" + }, + "type": { + "type": "object", + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" + }, + "code": { + "type": "string", + "enum": [ + "REFERRER", + "PROVIDER", + "ADVICE_REQUEST", + "GUIDANCE_RESPONSE" + ], + "example": "REFERRER" + }, + "display": { + "type": "string", + "enum": [ + "Referrer", + "Provider", + "Advice Request", + "Guidance Response" + ], + "example": "Referrer" + } + } + } + } + } + }, + "status": { + "type": "string", + "enum": [ + "current" + ], + "example": "current" + }, + "indexed": { + "type": "string", + "format": "date-time", + "example": "2021-04-22T10:00:00.000Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "upload png" + }, + "content": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "attachment" + ], + "properties": { + "attachment": { + "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", + "type": "object", + "required": [ + "contentType", + "url", + "size", + "title", + "creation" + ], + "properties": { + "id": { + "type": "string", + "example": "70002" + }, + "contentType": { + "type": "string", + "example": "image/png" + }, + "url": { + "type": "string", + "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" + }, + "size": { + "type": "integer", + "example": 6 + }, + "title": { + "type": "string", + "example": "upload.png" + }, + "creation": { + "type": "string", + "format": "date", + "example": "2021-04-22" + }, + "extension": { + "type": "array", + "minItems": 2, + "maxItems": 4, + "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", + "items": { + "oneOf": [ + { + "title": "Extension-eRS-AvailabilityStatus", + "description": "Details whether a file is available to be downloaded. See the Important note section for further information", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "AVAILABLE", + "PENDING", + "THREATS_FOUND", + "VALIDATION_FAILED" + ], + "example": "AVAILABLE" + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedBy", + "description": "Extension to indicate the individual who attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-AttachedByOrganisation", + "description": "Extension to indicate the organisation that attached a file within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-OnBehalfOf", + "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + } + } + } + ] + } + } + } + } + } + } + } + } + }, + { + "title": "CareConnect-PractitionerRole", + "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "practitioner", + "organization" + ], + "properties": { + "id": { + "type": "string", + "example": "PractitionerRole-R69-000000000101" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + ], + "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "PractitionerRole" + ], + "example": "PractitionerRole" + }, + "practitioner": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/sds-user-id" + ], + "example": "http://fhir.nhs.net/Id/sds-user-id" + }, + "value": { + "type": "string", + "example": "021600556514" + } + } + } + } + }, + "organization": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + }, + "code": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" + }, + "code": { + "type": "string", + "example": "REFERRING_CLINICIAN" + } + } + } + } + } + } + } + } + } + ] + } + }, + "extension": { + "type": "array", + "nullable": true, + "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", + "items": { + "anyOf": [ + { + "title": "Extension-eRS-ReferralShortlist", + "description": "Extension to supply the current shortlist for a ReferralRequest", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#shortlist" + } + } + } + } + }, + { + "title": "Extension-eRS-ReferralPriority", + "description": "Extension to supply the current priority of a ReferralRequest within e-RS", + "type": "object", + "required": [ + "url", + "valueCodeableConcept" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" + }, + "valueCodeableConcept": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" + }, + "code": { + "type": "string", + "enum": [ + "ROUTINE", + "URGENT", + "TWO_WEEK_WAIT" + ], + "example": "URGENT" + }, + "display": { + "description": "display value is returned in response from the server", + "nullable": true, + "type": "string", + "example": "Urgent" + } + } + } + } + } + } + } + }, + { + "title": "Extension-eRS-ProviderConversionAuthorisation", + "description": "Extension to supply the conversion authorisation flag", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" + }, + "code": { + "type": "string", + "enum": [ + "AUTHORISED_TO_CONVERT", + "NOT_AUTHORISED_TO_CONVERT" + ], + "example": "NOT_AUTHORISED_TO_CONVERT" + }, + "display": { + "type": "string", + "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" + } + } + } + } + }, + { + "title": "Extension-eRS-Specialty", + "description": "Extension to supply the specialty", + "type": "object", + "required": [ + "url", + "valueCoding" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" + }, + "valueCoding": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" + }, + "code": { + "type": "string", + "example": "CARDIOLOGY" + }, + "display": { + "type": "string", + "example": "Cardiology" + } + } + } + } + } + ] + } + }, + "status": { + "type": "string", + "enum": [ + "active", + "cancelled", + "completed" + ], + "example": "active" + }, + "category": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" + }, + "code": { + "type": "string", + "enum": [ + "PROVIDER_RESPONSE_REQUIRED", + "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", + "REFERRER_TO_REVIEW_RESPONSE", + "CONVERSATION_ENDED_CANCELLED", + "CONVERSATION_ENDED_CLOSED", + "ADVICE_CONVERTED" + ], + "example": "PROVIDER_RESPONSE_REQUIRED" + } + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/nhs-number" + ], + "example": "http://fhir.nhs.net/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + }, + "recipient": { + "type": "array", + "items": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-HealthcareService-Reference", + "description": "Extension to supply the service id", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + } + }, + "sender": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + }, + "requester": { + "type": "object", + "required": [ + "agent" + ], + "properties": { + "agent": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + } + } + }, + "payload": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contentReference" + ], + "properties": { + "contentReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#DocumentReference-70002" + } + } + } + } + } + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "enum": [ + "https://fhir.nhs.uk/Id/ers-request-id" + ], + "example": "https://fhir.nhs.uk/Id/ers-request-id" + }, + "value": { + "type": "string", + "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + } + } + } + } + } + } + } + }, + { + "title": "createdCommunication", + "description": "The created initial request message within the conversation.", + "type": "object", + "required": [ + "name", + "resource" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "createdCommunication" + ], + "example": "createdCommunication" + }, + "resource": { + "title": "eRS-Communication-1", + "description": "A record of information transmitted from a sender to a receiver", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "status", + "category", + "recipient", + "sent", + "sender", + "note" + ], + "properties": { + "id": { + "type": "string", + "example": "appointment" + }, + "meta": { + "type": "object", + "required": [ + "profile" + ], + "properties": { + "profile": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1", + "https://fhir.hl7.org.uk/STU3/StructureDefinition/eRS-Communication-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" + } + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "Communication" + ], + "example": "Communication" + }, + "status": { + "type": "string", + "enum": [ + "completed" + ], + "example": "completed" + }, + "category": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" + }, + "code": { + "type": "string", + "enum": [ + "REQUESTER", + "RESPONDER", + "REFERRER_CLINICAL_INFORMATION_UPDATED" + ], + "example": "REQUESTER" + } + } + } + } + } + } + }, + "recipient": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "anyOf": [ + { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-HealthcareService-Reference", + "description": "Extension to supply the service id", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "http://fhir.nhs.net/Id/ers-service" + ], + "example": "http://fhir.nhs.net/Id/ers-service" + }, + "value": { + "type": "string", + "example": "11002" + } + } + } + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/ods-organization-code" + ], + "example": "https://fhir.nhs.uk/Id/ods-organization-code" + }, + "value": { + "type": "string", + "example": "R69" + } + } + } + } + } + ] + } + }, + "sent": { + "type": "string", + "format": "date-time", + "example": "2021-04-20T12:17:35.128Z" + }, + "sender": { + "type": "object", + "required": [ + "extension" + ], + "properties": { + "extension": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "title": "Extension-PractitionerRole-Reference", + "description": "Extension to supply practitioner details", + "type": "object", + "required": [ + "url", + "valueReference" + ], + "properties": { + "url": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" + }, + "valueReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" + } + } + } + } + } + } + } + }, + "payload": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contentReference" + ], + "properties": { + "contentReference": { + "type": "object", + "required": [ + "reference" + ], + "properties": { + "reference": { + "type": "string", + "example": "DocumentReference/70000" + } + } + } + } + } + }, + "note": { + "type": "array", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "required": [ + "text" + ], + "properties": { + "text": { + "type": "string", + "example": "Example content...", + "description": "Maximum 8000 characters." + } + } + } + } + } + } + } + } + ] + } + } + } + }, + "examples": { + "rca-with-attachments": { + "summary": "Example created by RCA with attachments authorising the provider to convert to a referral request.", + "value": { + "$ref": "../../../examples/createAdviceAndGuidance/responses/ExampleRCAWithAttachments.json" + } + }, + "rc-without-attachments": { + "summary": "Example created by RC without attachments not authorising the provider to convert to a referral request.", + "value": { + "$ref": "../../../examples/createAdviceAndGuidance/responses/ExampleRCWithoutAttachments.json" + } + } + } + } + } + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "NO_ACCESS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "FORBIDDEN", + "display": "Forbidden" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Not Acceptable", + "headers": { + "Content-Type": { + "description": "Indicates the media type of the associated resource. \n", + "schema": { + "type": "string", + "enum": [ + "text/plain;charset=utf-8" + ], + "example": "text/plain;charset=utf-8" + } + } + }, + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "415": { + "description": "Unsupported Media Type", + "content": { + "text/plain;charset=utf-8": { + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "value", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "UNEXPECTED_FIELD", + "display": "Unexpected field" + } + ] + }, + "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" + } + ] + } + } + } + }, + "429": { + "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "eRS-OperationOutcome", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "properties": { + "profile": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ], + "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + }, + "minItems": 1, + "maxItems": 1 + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "example": "error" + }, + "code": { + "type": "string", + "example": "business-rule" + }, + "diagnostics": { + "type": "string", + "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code", + "display" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + ], + "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" + }, + "code": { + "type": "string", + "example": "DUPLICATE_SERVICE" + }, + "display": { + "type": "string", + "example": "Duplicate service found in shortlist" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "meta": { + "profile": [ + "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" + ] + }, + "resourceType": "OperationOutcome", + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", + "code": "SYSTEM_UNAVAILABLE", + "display": "System Unavailable" + } + ] + } + } + ] + } + } + } + } + } + } + }, + "/R4/ServiceRequest": { + "get": { + "security": [ + { + "bearerAuth": [] + } + ], + "description": "## Overview\n\n

\nWarning: This endpoint is part of a new suite of APIs currently in development. We currently advise against integrating with this endpoint as its definition may be subject to change. If you would still like to use this endpoint please contact us before you start integration.\n

\n\nThe e-RS FHIR API represents an advice and guidance request and a referral in FHIR R4 as a ServiceRequest. This endpoint allows you to search for attributes about a ServiceRequest.\n\nAt present the following is the only permitted use case for using this endpoint, but it is expected that additional use cases will be added as future needs are identified and prioritised.\n- For FHIR R4 endpoints, the e-RS FHIR API requires a unique identifier for the ServiceRequest, instead of the UBRN, to identify an advice and guidance request or referral request. To support partners to transition from previous FHIR versions, and utilise the newer FHIR endpoints, this endpoint can be used as a bridging mechanism so that you can search for the required unique identifiers using a UBRN. \n\n## Supported security patterns\n\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nTo use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles:\n\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n- `SERVICE_PROVIDER_CLINICIAN`\n- `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the Unique Booking Reference Number (UBRN) of an advice and guidance request or referral request.\n\n\n## Important notes\n\nWhen searching for a unique identifier for a ServiceRequest, it's important to note that one UBRN can relate to both an advice and guidance request and a referral. In this case, the response could contain two unique identifiers: one relating to the advice and guidance request and one relating to the referral.\n\n## Use case\n\nAs an authenticated user\n\nI need the unique identifier for a given advice and guidance request or referral request\n\nSo that I can view or action an advice and guidance request or referral\n\n## Related endpoints\n\nOnce the ServiceRequest's unique identifier has been retrieved it can then be used to call the following endpoints to manage its clinical attachments:\n- [[HYPERLINK_A012]]\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | UBRN |\n| --------------------------------------------------------------------------------------- | -------------- |\n| A response containing a single Request ID for a `ServiceRequest` of category `referral` | `000000070000` |\n| A response containing a single Request ID for a `ServiceRequest` of category `request` | `000000070001` |\n| A response containing two Request IDs | `000000070002` |\n| A response containing an empty bundle | `000000070003` |\n", + "summary": "Search for service requests (A041, FHIR R4)", + "operationId": "a041-search-service-request", + "tags": [ + "Retrieve clinical information" + ], + "parameters": [ + { + "in": "header", + "name": "Authorization", + "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", + "required": true, + "schema": { + "type": "string", + "format": "^Bearer\\ [[:ascii:]]+$", + "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" + } + }, + { + "in": "header", + "name": "NHSD-eRS-Business-Function", + "description": "The e-RS Business Function of the caller\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "REFERRING_CLINICIAN", + "REFERRING_CLINICIAN_ADMIN", + "REFERRING_ADMIN", + "COMMISSIONER", + "SERVICE_PROVIDER_CLINICIAN_ADMIN", + "SERVICE_PROVIDER_CLINICIAN", + "SERVICE_PROVIDER_ADMIN", + "INFORMATION_ANALYST", + "BOOKING_MANAGER", + "ADDITIONAL_REQUIREMENTS_MANAGER" + ], + "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" + } + }, + { + "in": "header", + "name": "X-Correlation-ID", + "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + { + "in": "header", + "name": "NHSD-End-User-Organisation-ODS", + "description": "The ODS code of the caller's Organisation\n", + "required": true, + "schema": { + "type": "string", + "example": "R69" + } + }, + { + "in": "header", + "name": "NHSD-eRS-On-Behalf-Of-User-ID", + "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", + "required": false, + "schema": { + "type": "string", + "example": "021600556514" + } + }, + { + "name": "identifier", + "in": "query", + "description": "The Unique Booking Reference Number (UBRN) used to search for `ServiceRequest` resources.\nThe format follows that of a [token](https://www.hl7.org/fhir/r4/search.html#token), with `code` (UBRN) being mandatory and `system` being optional.\nIn this case, the code system will be eRS UBRN (https://fhir.nhs.uk/Id/UBRN).\n- [parameter]=[code]\n- [parameter]=[system]|[code]\n", + "required": true, + "style": "form", + "explode": false, + "schema": { + "type": "string", + "format": "token" + }, + "examples": { + "system_and_ubrn": { + "value": "https://fhir.nhs.uk/Id/UBRN|000000070000", + "summary": "Code system and UBRN" + }, + "ubrn": { + "value": "000000070000", + "summary": "UBRN only" + } + } + } + ], + "responses": { + "200": { + "description": "Bundle resource containing the `ServiceRequest` resources associated to the supplied UBRN. \nThe canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "type": "object", + "required": [ + "id", + "meta", + "type", + "timestamp", + "total", + "link" + ], + "properties": { + "id": { + "type": "string", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "type": { + "type": "string", + "enum": [ + "searchset" + ], + "example": "searchset" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + }, + "total": { + "type": "integer", + "example": 1 + }, + "link": { + "type": "array", + "items": { + "type": "object", + "required": [ + "relation", + "url" + ], + "properties": { + "relation": { + "type": "string", + "enum": [ + "self" + ], + "example": "self" + }, + "url": { + "type": "string", + "example": "_baseUrl_/FHIR/R4/ServiceRequest?identifier=https://fhir.nhs.uk/Id/UBRN%7C000000070000" + } + } + } + }, + "entry": { + "type": "array", + "description": "| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `ServiceRequest` | `0..*` | |\n", + "items": { + "title": "ServiceRequest", + "type": "object", + "required": [ + "fullUrl", + "resource", + "search" + ], + "properties": { + "fullUrl": { + "type": "string", + "example": "_baseUrl_/FHIR/R4/ServiceRequest/r.123e4567-e89b-12d3-a456-426614174000" + }, + "resource": { + "title": "eRS-ServiceRequest", + "description": "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.\nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest\n", + "type": "object", + "required": [ + "id", + "meta", + "resourceType", + "identifier", + "status", + "intent", + "category", + "subject" + ], + "properties": { + "id": { + "type": "string", + "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" + }, + "meta": { + "type": "object", + "required": [ + "versionId" + ], + "properties": { + "versionId": { + "type": "string", + "example": "5" + } + } + }, + "resourceType": { + "type": "string", + "enum": [ + "ServiceRequest" + ], + "example": "ServiceRequest" + }, + "identifier": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/UBRN" + ], + "example": "https://fhir.nhs.uk/Id/UBRN" + }, + "value": { + "type": "string", + "example": "000000070000" + } + } + } + }, + "status": { + "type": "string", + "description": "Whilst a potential value to return is `draft`, we are not currently returning this value, but may choose to do so in the future.\n\n| ServiceRequest.status | Description |\n|-----------------------|---------------------------------------------------------------------------------- |\n| active | The `ServiceRequest` is ready to be acted upon. |\n| completed | The `ServiceRequest` has been fully performed and no further activity will occur. |\n| draft | The `ServiceRequest` is incomplete and is not yet ready to be processed. |\n| revoked | The `ServiceRequest` has been terminated and no further activity will occur. |\n", + "enum": [ + "active", + "completed", + "draft", + "revoked" + ], + "example": "active" + }, + "intent": { + "type": "string", + "enum": [ + "order" + ], + "example": "order" + }, + "category": { + "type": "array", + "items": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest" + ] + }, + "code": { + "type": "string", + "enum": [ + "referral", + "request" + ], + "example": "referral" + } + } + } + } + } + } + }, + "code": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/servicerequest-code" + ], + "example": "https://fhir.nhs.uk/CodeSystem/servicerequest-code" + }, + "code": { + "type": "string", + "enum": [ + "advice-and-guidance" + ], + "example": "advice-and-guidance" + } + } + } + } + } + }, + "subject": { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "type": "object", + "required": [ + "system", + "value" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/Id/nhs-number" + ], + "example": "https://fhir.nhs.uk/Id/nhs-number" + }, + "value": { + "type": "string", + "example": "9912003888" + } + } + } + } + } + } + }, + "search": { + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "match" + ], + "example": "match" + } + } + } + } + } + } + } + }, + "examples": { + "minimal-example-empty": { + "summary": "An empty bundle might be returned when the search completes but matches no requests.", + "value": { + "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleEmpty.json" + } + }, + "minimal-example-referral": { + "summary": "A response containing a single Request ID for a `ServiceRequest` of category `referral`.", + "value": { + "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleReferral.json" + } + }, + "minimal-example-advice": { + "summary": "A response containing a single Request ID for a `ServiceRequest` of category `request`.", + "value": { + "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleAdvice.json" + } + }, + "complex-example-referral-and-advice": { + "summary": "A response containing two Request IDs.", + "value": { + "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleReferralAndAdvice.json" + } + } + } + } + } + }, + "400": { + "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------ |\n| REC_BAD_REQUEST | required | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | Incorrect or missing expected value. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "invalid", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_BAD_REQUEST" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "401": { + "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "login", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "ACCESS_DENIED" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "403": { + "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "forbidden", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_FORBIDDEN" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "406": { + "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "not-supported", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_NOT_ACCEPTABLE" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "429": { + "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "throttled", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "code": "TOO_MANY_REQUESTS" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "500": { + "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "exception", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_SERVER_ERROR" + } + ] + }, + "diagnostics": "Example diagnostics message." + } + ] + } + } + } + }, + "503": { + "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", + "headers": { + "X-Correlation-ID": { + "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", + "required": false, + "schema": { + "type": "string", + "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" + } + }, + "X-Request-ID": { + "description": "The e-RS transaction id\n", + "required": false, + "schema": { + "type": "string", + "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" + } + }, + "Content-Type": { + "description": "Indicates the media type of the associated resource.\n", + "required": true, + "schema": { + "type": "string", + "enum": [ + "application/fhir+json" + ], + "example": "application/fhir+json" + } + }, + "Retry-After": { + "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", + "required": false, + "schema": { + "type": "string", + "example": "120" + } + } + }, + "content": { + "application/fhir+json": { + "schema": { + "title": "NHSDigital-OperationOutcome", + "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", + "type": "object", + "required": [ + "resourceType", + "meta", + "issue" + ], + "properties": { + "resourceType": { + "type": "string", + "enum": [ + "OperationOutcome" + ], + "example": "OperationOutcome" + }, + "meta": { + "type": "object", + "required": [ + "lastUpdated" + ], + "properties": { + "lastUpdated": { + "type": "string", + "format": "date-time", + "example": "2021-08-04T14:35:00.000Z" + } + } + }, + "issue": { + "type": "array", + "items": { + "type": "object", + "required": [ + "severity", + "code", + "details" + ], + "properties": { + "severity": { + "type": "string", + "enum": [ + "fatal", + "error", + "warning", + "information" + ], + "example": "error" + }, + "code": { + "type": "string", + "example": "required" + }, + "diagnostics": { + "type": "string", + "example": "Incorrect or missing expected value." + }, + "details": { + "type": "object", + "required": [ + "coding" + ], + "properties": { + "coding": { + "type": "array", + "items": { + "type": "object", + "required": [ + "system", + "code" + ], + "properties": { + "system": { + "type": "string", + "enum": [ + "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", + "https://fhir.nhs.uk/CodeSystem/ers-error-codes" + ], + "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" + }, + "code": { + "type": "string", + "example": "REC_BAD_REQUEST" + } + } + } + } + } + } + } + } + } + } + }, + "example": { + "resourceType": "OperationOutcome", + "meta": { + "lastUpdated": "2022-03-01T10:00:00.42Z" + }, + "issue": [ + { + "severity": "error", + "code": "transient", + "details": { + "coding": [ + { + "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", + "code": "REC_UNAVAILABLE" + } + ] + } + } + ] + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + }, + "mediaTypes": { + "FileContentTypeSchemaDownload": { + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + }, + "example": "This is some example text." + }, + "text/html": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/rtf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/basic": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/gif": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/tiff": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/msword": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/dicom": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "FileContentTypeSchemaUpload": { + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + }, + "example": "This is some example text." + }, + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/rtf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/basic": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/gif": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/tiff": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/msword": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/dicom": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "x-nhsd-api-platform": { + "meta": { + "service_name": "e-referrals-service-api", + "short_service_name": "ers", + "service_base_path": "referrals", + "product_display_name": "e-Referrals-Service", + "product_description": "The NHS e-RS vision is to enable local innovation and adoption of paperless referrals. To support this vision NHS Digital have created a set of APIs which provide a well-defined, simple to use data interface to the NHS e-Referral Service (e-RS). See https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir", + "pipeline_name_prefix": "E-Referrals-Service" + } + } +} \ No newline at end of file From dd84bbf7cb38d9977db25ebc53f74d15fc943192 Mon Sep 17 00:00:00 2001 From: EdwardWills-nhs Date: Mon, 30 Mar 2026 15:11:54 +0100 Subject: [PATCH 2/2] Delete test-output.json --- test-output.json | 100528 -------------------------------------------- 1 file changed, 100528 deletions(-) delete mode 100644 test-output.json diff --git a/test-output.json b/test-output.json deleted file mode 100644 index 296c6b43e..000000000 --- a/test-output.json +++ /dev/null @@ -1,100528 +0,0 @@ -[1] redocly.yaml:6:3 at #/rules/info-license-url - -Property `info-license-url` is not expected here. - -4 | no-invalid-media-type-examples: -5 | severity: off -6 | info-license-url: off - | ^^^^^^^^^^^^^^^^ -7 | tag-description: off -8 | - -Warning was generated by the configuration struct rule. - - -{ - "openapi": "3.0.0", - "info": { - "version": "0.0.1", - "title": "e-Referrals Service", - "description": "## Overview\nUse this API to create paperless referrals from primary to secondary care with the [e-Referral Service (e-RS)](https://digital.nhs.uk/services/e-referral-service).\n\nFor an overview of how you can plan and prepare for your integration with e-RS, see our [API onboarding guide](https://digital.nhs.uk/services/e-referral-service/api).\n\n**As a primary care referrer, you can:**\n\n -\tcreate a new e-referral\n - search for relevant patient services to create a shortlist\n -\taccess existing e-referrals\n -\tcreate a triage request for the Referral Assessment Service (RAS)\n -\tupload and manage a patient letter or attachments, linking them to a referral\n -\tretrieve appointment slots and book appointments\n -\tdefer a booking to a provider if an appointment slot is unavailable\n - create a new advice and guidance request\n\n**As a secondary care provider, you can:**\n\n -\taccess referrals as a worklist\n -\tretrieve non-clinical information (meta-data) about the referral\n -\tretrieve attachments which are linked to a referral or triage (RAS) request\n -\tretrieve clinical information which has been provided by a referrer\n -\taccept or reject a referral request\n -\tretrieve Advice & Guidance (A&G) conversations and send responses\n -\tconvert Advice & Guidance (A&G) conversations into a referral\n - cancel a referral\n\n**You cannot use this API to:**\n\n -\tget patient details - instead, use the [[HYPERLINK_PDS]]\n\n**You can access the following data:**\n\n -\treferral attachments\n -\treferral letters\n -\tappointment slots\n -\tworklists for referral requests\n -\tworklists for triage (RAS) requests\n -\tworklists for Advice and Guidance (A&G) requests\n -\tconversation histories for Advice and Guidance (A&G) requests\n\n
\n
\n
\n
\n \n \"\"\n \n
\n
\n
\n
\n

To discover the most common use cases, see our Building Healthcare Software guides.

\n
\n
\n
\n
\n\n### Access modes\n\nThis API has two access modes:\n\n| Access mode | Authentication via | Functions | Availability |\n| ----------------------------- | -------------------------- | ----------------------- | ------------------------------- |\n| Application-restricted,
unattended access | [[HYPERLINK_SIGNED_JWT]] | | [[HYPERLINK_PRODUCTION]] |\n| Healthcare worker,
user-restricted access | [[HYPERLINK_CIS_AUTH_SHORT]] | All Endpoints | [[HYPERLINK_PRODUCTION]] |\n\n##### Application-restricted, unattended access\n\nThis access mode has been introduced to allow a Partner application which has been [registered with us](https://portal.developer.nhs.uk/create-a-developer-account) and [authenticated via signed JWT](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication) to interact with a subset of e-RS FHIR API endpoints in an unattended and read-only fashion.\nApplication-restricted, unattended access should only be used when authenticating a human user (for example via smartcard) is not possible.\n\nWrite operations are currently supported for specific use cases via:\n- [[HYPERLINK_A028]]\n- [[HYPERLINK_A013]]\n- [[HYPERLINK_A036]]\n\nYou will be required to submit your use case for review when using these endpoints via application-restricted, unattended access.\n\n##### Healthcare worker, user-restricted access\n\nThis access mode allows Partner applications to access e-RS FHIR API endpoints by authenticating users with [[HYPERLINK_CIS_AUTH_LONG]].\n\nThis access mode must be used for writing changes (such as Create Referral).\n\n## Who can use this API\n\nYou can use this API if you are a software developer wishing to interact with the e-referrals service (e-RS) data, for use in a professional, clinical setting. \n\nTo use this API you must:\n\n -\thave justification for doing so\n -\t[register with us](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1-design#1-8-register-with-us)\n -\tensure you have a [valid use case](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1-design#1-2-validate-your-use-case) before you go too far with your development\n -\t[assure](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-3-assure) your solution before we grant access to live data\n\n## Related APIs\n\n[HL7 V3 API](https://digital.nhs.uk/developer/api-catalogue/e-referral-service-hl7-v3) - this API allows you to manage appointment slots for a Patient Administration System (PAS). \n\n\n## API status and roadmap\n\n### This API has two access modes:\n - Application-restricted, unattended access\n - Healthcare worker, user-restricted access\n\n### Application-restricted, unattended access\n\nThis access mode is [[HYPERLINK_PRODUCTION]], meaning:\n - we avoid making routine [breaking changes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy#breaking-changes), except in exceptional circumstances\n - if we need to deprecate an endpoint, we will give advance notice on our [board](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/deprecation-notices). Our [sunsetting page](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy) details our deprecation and retirement policy.\n \n### Healthcare worker, user-restricted access\n\nThis access mode is [[HYPERLINK_PRODUCTION]], meaning:\n - we avoid making routine [breaking changes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy#breaking-changes), except in exceptional circumstances\n - if we need to deprecate an endpoint, we will give advance notice on our [board](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/deprecation-notices). Our [sunsetting page](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/sunsetting-policy) details our deprecation and retirement policy.\n\n### Roadmap\n\nVisit our [roadmap page](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/roadmap) for details of what we are working on.\n\nTo suggest, comment or vote on features for this API, see our [interactive product backlog](https://portal.productboard.com/qhpkcqgctqtk3ujk8jyoajp8/tabs/4-new-requests).\n\n## Service level\nThis API is a gold service, meaning it is operational and supported 24 hours a day, 365 days a year.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Technology\n\nThis API is primarily [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest) \nand based on [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir) global standards for health care data exchange.\n\nThis API supports FHIR STU3 and FHIR R4.\n\n### FHIR STU3\n\nThe e-RS FHIR STU3 API is built against the set of profiles called [CareConnect](https://nhsconnect.github.io/CareConnectAPI/).\n\n### FHIR R4\n\nThe e-RS FHIR R4 API is built alongside the [NHS England FHIR Implementation Guide](https://simplifier.net/guide/nhsdigital), which is built on top of [FHIR UK Core](https://digital.nhs.uk/services/fhir-uk-core). The canonical URLs listed in the schema can be resolved with [https://simplifier.net/resolve](https://simplifier.net/resolve).\n\n## Network access\n\nThis API is available on the internet and, indirectly, on the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network).\n\nTo use this API with NHS smartcards you do need an HSCN connection, although internet-facing alternatives are available.\n\nFor more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n\n## Security and authorisation\n\nThis API has two access modes:\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n### Application-restricted, unattended access\n\nThis access mode is [application-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#application-restricted-apis), meaning we authenticate the calling application but not the end user.\n\nYou can only use this access mode when authenticating a human user (for example via smartcard) is not possible.\n\nWrite operations are currently only supported by [[HYPERLINK_A028]] for non-clinical use cases. You will be required to submit your use case for review when using this endpoint via application-restricted, unattended access.\n\nTo use this access mode, use the following security pattern:\n- [Application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)\n\n### Healthcare worker, user-restricted access\n\nThis access mode is [user-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis), meaning an end user must be present, authenticated and authorised.\n\nThe end user must be:\n- present\n- a healthcare worker\n- strongly authenticated and authorised by [[HYPERLINK_CIS_AUTH_LONG]]\n\nIn order to successfully authenticate with CIS2, the NHS e-Referral Service requires end users to be authenticated to the following standards:\n - an [Identity Assurance Level (IAL)](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication/guidance-for-developers/detailed-guidance/scopes-and-claims#claims ) of IAL3\n - an [Authenticator Assurance Level (AAL)](https://digital.nhs.uk/services/care-identity-service/applications-and-services/cis2-authentication/guidance-for-developers/detailed-guidance/acr-values#authentication-methods) of AAL2 or AAL3\n\nTo use this access mode, use one of the following security patterns:\n- [user-restricted RESTful API - using NHS CIS2 - combined authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-combined-authentication-and-authorisation)\n- [user-restricted RESTful API - using NHS CIS2 - separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-separate-authentication-and-authorisation)\n\nWe strongly recommend the use of separate authentication and authorisation. This mode will provide you access to the healthcare workers identity, allowing you to reuse it across multiple applications such as PDS.\n\nYou can [learn more](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1.4---select-your-authentication-level#1-access-modes) about each access mode option on our onboarding guide.\n\n#### Role and Organisation Validation\nFor most e-RS endpoints requests are made in the context of a specific authorised e-RS Role at a specific Organisation for the authenticated user. \n\nThe e-RS Role is supplied to the endpoint via the `NHSD-eRS-Business-Function` request header. \n\nThe Organisation is supplied to the endpoint via the `NHSD-End-User-Organisation-ODS` request header. \n\nSuitable values for these request headers can be obtained from the Practitioner Role Bundle returned by [[HYPERLINK_A030]].\n\n#### On Behalf Of User\nIf the `SERVICE_PROVIDER_CLINICIAN_ADMIN` role is used then the User ID of the Service Provider Clinician that the Admin is acting on behalf of must be supplied via the `NHSD-eRS-On-Behalf-Of-User-ID` header.\n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC).\n\n## Environments and testing\n\n| Environment | Base URL |\n| ----------------- | ---------------------------------------------------------------------- |\n| Sandbox | `https://sandbox.api.service.nhs.uk/referrals/FHIR` |\n| Integration test | `https://int.api.service.nhs.uk/referrals/FHIR` |\n| Production | `https://api.service.nhs.uk/referrals/FHIR` |\n\n### Sandbox testing\n\nOur [sandbox](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing) environment:\n-\tis for developer education and early testing\n-\tonly covers a limited set of scenarios\n-\tis stateless, so does not actually persist any updates\n-\tis open access, so does not allow you to test authorisation\n\nTry out the sandbox using our 'Try this API' feature, see the documentation for each endpoint.\n\nThe sandbox will only respond to an input which exactly matches one of the examples provided; it is otherwise stateless.\n\n### Integration testing\n\nOur [integration test](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis) environment:\n -\tis where the majority of your integration efforts will take place\n - is where we conduct witness testing for your application\n -\tis stateful, so data will be persisted\n\n\n## Onboarding\n\nYou need to get your software approved by us before you 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\nWe use the Supplier Conformance Assessment List (SCAL) process. [Learn more](https://digital.nhs.uk/services/e-referral-service/api/integration-process/stage-1-design#1-7-learn-how-to-onboard) about onboarding.\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* 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 Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n", - "contact": { - "url": "https://digital.nhs.uk/developer/help-and-support", - "email": "api.management@nhs.net" - }, - "license": { - "name": "MIT" - } - }, - "servers": [ - { - "url": "https://sandbox.api.service.nhs.uk/referrals/FHIR", - "description": "Sandbox environment." - }, - { - "url": "https://int.api.service.nhs.uk/referrals/FHIR", - "description": "Integration test environment." - }, - { - "url": "https://api.service.nhs.uk/referrals/FHIR", - "description": "Production environment. Not yet available." - } - ], - "tags": [ - { - "name": "Retrieve user information" - }, - { - "name": "Refer patient" - }, - { - "name": "Arrange appointment" - }, - { - "name": "Arrange triage" - }, - { - "name": "Request advice" - }, - { - "name": "Retrieve healthcare service information" - }, - { - "name": "Change appointment" - }, - { - "name": "Manage referral" - }, - { - "name": "Retrieve clinical information" - }, - { - "name": "Review referral requests" - }, - { - "name": "Review advice and guidance requests" - } - ], - "paths": { - "/STU3/CodeSystem/{codeSystemType}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve a list of reference data codes along with the user-friendly display values used in the e-RS Professional Application.\n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider or Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Use case\nAs an authenticated user or application\n\nI need to retrieve e-RS reference data\n\nSo I can use it with other endpoints or display the reference data in a user-friendly format to my users.\n\n## Related endpoints\nReference data may be needed for other endpoints, for example when including Specialty and Clinic Type reference data to:\n- find services that meet the referral needs of a patient using [[HYPERLINK_A010]], and\n- create a referral using [[HYPERLINK_A011]]\n\nYou can use the Priority reference data to calculate when a patient can expect to be contacted by the service. \n\nThis is important because when a patient's appointment is deferred to a service to book, the patient may be informed of the date by which they can expect to be contacted. \nSimilarly, in the case of a triage service, a letter may inform the patient of the date by which they can expect to be contacted.\n\nYou can calculate this date by:\n\n1. Obtaining the current priority of the referral (via [[HYPERLINK_A005]]) and its associated \"deferToProviderContactDays\" (for deferred-to services) or \"triageContactDays\" (for triage services). These represent the number of \"working days\" and do not include weekends\n2. Obtaining the datetime of the appointment resource, e.g. \"created\" : \"2021-05-06T11:21:45.652Z\"\n3. Adding the \"working days\" to the datetime of the appointment resource\n\n For example:\n\n1. Given a referral with a priority of `TWO_WEEK_WAIT` and a \"deferToProviderContactDays\" of \"2\" for priority `TWO_WEEK_WAIT`\n2. If the appointment was created on Monday 03/01/2022 for a deferred-to service \n3. The calculated date when a patient can expect to be contacted by the service would be on or before 05/01/2022\n\nNote that the \"deferToProviderContactDays\" and \"triageContactDays\" values are dynamic, and may change independently from one another, so the above calculation is for illustration purposes only.\n\nYou may also wish to present the user-friendly names for the reference data, for example when viewing the referral using [[HYPERLINK_A005]] and [[HYPERLINK_A038]].\n\nDocumentation for other endpoints will reference this endpoint, where specific reference data is required.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request | Response |\n| --------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------- |\n| Retrieve speciality reference data | `codeSystemType`=`SPECIALTY` | Specialty details |\n| Retrieve clinic type reference data | `codeSystemType`=`CLINIC-TYPE` | Clinic type details |\n| Retrieve appointment cancellation reason reference data | `codeSystemType`=`APPOINTMENT-CANCELLATION-REASON` | Appointment reason type details |\n| Retrieve referral cancellation reason reference data | `codeSystemType`=`REFERRAL-CANCELLATION-REASON` | ReferralRequest reason type details |\n| Retrieve appointment non-attendance reason reference data | `codeSystemType`=`APPOINTMENT-NON-ATTENDANCE-REASON` | Appointment non-attendance reason details |\n| Retrieve priority reference data | `codeSystemType`=`PRIORITY` | Priority details |\n", - "summary": "Retrieve reference data (A004, FHIR STU3)", - "operationId": "a004-retrieve-reference-data", - "tags": [ - "Refer patient", - "Request advice" - ], - "parameters": [ - { - "name": "codeSystemType", - "in": "path", - "description": "The requested code system\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "SPECIALTY", - "APPOINTMENT-CANCELLATION-REASON", - "CLINIC-TYPE", - "REFERRAL-CANCELLATION-REASON", - "APPOINTMENT-NON-ATTENDANCE-REASON", - "PRIORITY" - ], - "example": "SPECIALTY" - } - }, - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "e-RS Reference Data", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "url", - "name", - "status", - "date", - "description", - "content", - "property", - "concept" - ], - "properties": { - "id": { - "title": "Identifier of this code system", - "type": "string", - "enum": [ - "SPECIALTY", - "APPOINTMENT-CANCELLATION-REASON", - "CLINIC-TYPE", - "REFERRAL-CANCELLATION-REASON", - "APPOINTMENT-NON-ATTENDANCE-REASON", - "PRIORITY" - ], - "example": "SPECIALTY" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/StructureDefinition/shareablecodesystem", - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Specialty-CodeSystem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Specialty-CodeSystem-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "CodeSystem" - ], - "example": "CodeSystem" - }, - "url": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "name": { - "title": "Description of the code system", - "type": "string", - "enum": [ - "e-RS Appointment Cancellation Reason", - "e-RS Specialty", - "e-RS Clinic Type", - "e-RS ReferralRequest Cancellation Reason", - "e-RS Appointment Non-attendance Reason", - "e-RS Priority" - ], - "example": "e-RS Specialty" - }, - "status": { - "type": "string", - "enum": [ - "active" - ], - "example": "active" - }, - "date": { - "type": "string", - "format": "date-time" - }, - "publisher": { - "type": "string", - "enum": [ - "e-Referral Service" - ], - "example": "e-Referral Service" - }, - "description": { - "type": "string", - "example": "e-RS Specialty" - }, - "copyright": { - "type": "string", - "example": "Copyright (c) 2016 HL7 UK" - }, - "content": { - "type": "string", - "enum": [ - "complete" - ], - "example": "complete" - }, - "property": { - "title": "Code System Properties", - "description": "\nSome properties are only returned for certain code systems\n \n| Property | Code System |\n| -----------------------------------------| ------------------------------------------------------------- |\n| EffectiveFrom | All Code Systems |\n| EffectiveTo | All Code Systems |\n| Specialty | CLINIC-TYPE |\n| AppointmentBookingCancellationReasonType | APPOINTMENT-CANCELLATION-REASON |\n| WillCancelWholeRequest | APPOINTMENT-CANCELLATION-REASON |\n| Usage | APPOINTMENT-CANCELLATION-REASON |\n| CommentIsMandatory | APPOINTMENT-CANCELLATION-REASON / REFERRAL-CANCELLATION-REASON |\n| BusinessFunction | APPOINTMENT-CANCELLATION-REASON / REFERRAL-CANCELLATION-REASON |\n| AppointmentRequestCancellationReasonType | REFERRAL-CANCELLATION-REASON |\n| CanCancelAppointment | REFERRAL-CANCELLATION-REASON |\n| ReferrerUsage | REFERRAL-CANCELLATION-REASON |\n| DeferToProviderContactDays | PRIORITY |\n| TriageContactDays | PRIORITY |\n", - "type": "array", - "items": { - "anyOf": [ - { - "title": "Effective from date", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "effectiveFrom" - ], - "example": "effectiveFrom" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveFrom" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveFrom" - }, - "type": { - "type": "string", - "enum": [ - "dateTime" - ], - "example": "dateTime" - } - } - }, - { - "title": "Effective to date", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "effectiveTo" - ], - "example": "effectiveTo" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveTo" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#effectiveTo" - }, - "type": { - "type": "string", - "enum": [ - "dateTime" - ], - "example": "dateTime" - } - } - }, - { - "title": "Specialty", - "description": "This will only be returned when codeSystemType is CLINIC-TYPE", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#specialty" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#specialty" - }, - "type": { - "type": "string", - "enum": [ - "Coding" - ], - "example": "Coding" - } - } - }, - { - "title": "Appointment Booking Cancellation Reason Type", - "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "appointmentBookingCancellationReasonType" - ], - "example": "appointmentBookingCancellationReasonType" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentBookingCancellationReasonType" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentBookingCancellationReasonType" - }, - "type": { - "type": "string", - "enum": [ - "Coding" - ], - "example": "Coding" - } - } - }, - { - "title": "Will Cancel Whole Request", - "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", - "type": "object", - "deprecated": true, - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "willCancelWholeRequest" - ], - "example": "willCancelWholeRequest" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#willCancelWholeRequest" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#willCancelWholeRequest" - }, - "type": { - "type": "string", - "enum": [ - "boolean" - ], - "example": "boolean" - } - } - }, - { - "title": "Usage", - "description": "Details how the current code system should be used", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "usage" - ], - "example": "usage" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#usage" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#usage" - }, - "type": { - "type": "string", - "enum": [ - "Coding" - ], - "example": "Coding" - } - } - }, - { - "title": "Comment Is Mandatory", - "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON or REFERRAL-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "commentIsMandatory" - ], - "example": "commentIsMandatory" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#commentIsMandatory" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#commentIsMandatory" - }, - "type": { - "type": "string", - "enum": [ - "boolean" - ], - "example": "boolean" - } - } - }, - { - "title": "BusinessFunction", - "description": "Details which Business functions are able to use the current code system", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "businessFunction" - ], - "example": "businessFunction" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#businessFunction" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#businessFunction" - }, - "type": { - "type": "string", - "enum": [ - "Coding" - ], - "example": "Coding" - } - } - }, - { - "title": "Appointment Request Cancellation Reason Type", - "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "appointmentRequestCancellationReasonType" - ], - "example": "appointmentRequestCancellationReasonType" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentRequestCancellationReasonType" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#appointmentRequestCancellationReasonType" - }, - "type": { - "type": "string", - "enum": [ - "Coding" - ], - "example": "Coding" - } - } - }, - { - "title": "CanCancelAppointment", - "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "canCancelAppointment" - ], - "example": "canCancelAppointment" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#canCancelAppointment" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#canCancelAppointment" - }, - "type": { - "type": "string", - "enum": [ - "boolean" - ], - "example": "boolean" - } - } - }, - { - "title": "ReferrerUsage", - "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "referrerUsage" - ], - "example": "referrerUsage" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#referrerUsage" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#referrerUsage" - }, - "type": { - "type": "string", - "enum": [ - "Coding" - ], - "example": "Coding" - } - } - }, - { - "title": "Defer to Provider Contact Days", - "description": "This will only be returned when codeSystemType is PRIORITY", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "deferToProviderContactDays" - ], - "example": "deferToProviderContactDays" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#deferToProviderContactDays" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#deferToProviderContactDays" - }, - "type": { - "type": "string", - "enum": [ - "integer" - ], - "example": "integer" - } - } - }, - { - "title": "Triage Contact Days", - "description": "This will only be returned when codeSystemType is PRIORITY", - "type": "object", - "required": [ - "code", - "uri", - "type" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "triageContactDays" - ], - "example": "triageContactDays" - }, - "uri": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#triageContactDays" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Concept-Properties-1#triageContactDays" - }, - "type": { - "type": "string", - "enum": [ - "integer" - ], - "example": "integer" - } - } - } - ] - } - }, - "concept": { - "title": "Details of the code system", - "type": "array", - "items": { - "type": "object", - "required": [ - "code", - "display", - "property" - ], - "properties": { - "extension": { - "title": "Effective Date Range Extensions", - "type": "array", - "nullable": true, - "items": { - "anyOf": [ - { - "title": "Extension-eRS-EffectivefromDate", - "description": "Extension to supply the effective From Date, this will only be returned for specialty", - "type": "object", - "required": [ - "url", - "valueDate" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivefromDate-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivefromDate-1" - }, - "valueDate": { - "type": "string", - "format": "date" - } - } - }, - { - "title": "Extension-eRS-EffectivetoDate", - "description": "Extension to supply the effective To Date, this will only be returned for specialty", - "type": "object", - "required": [ - "url", - "valueDate" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivetoDate-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-EffectivetoDate-1" - }, - "valueDate": { - "type": "string", - "format": "date" - } - } - } - ] - } - }, - "code": { - "title": "Value of the code system", - "description": "\n| Code System | Example Value |\n| ------------------------------------- | ----------------------------- |\n| Specialty | UROLOGY |\n| Clinic Type | GENERAL_UROLOGY |\n| Appointment Cancellation Reason | SERVICE_INAPPROPRIATE |\n| Referral Cancellation Reason | INTEND_PRIVATE |\n| Appointment Non-attendance Reason | PATIENT_ILL |\n| Priority | ROUTINE |\n", - "type": "string" - }, - "display": { - "title": "Display value of the code system", - "description": "\n| Code System | Example Display Value |\n| ------------------------------------- | ----------------------------------- |\n| Specialty | Urology |\n| Clinic Type | General Urology |\n| Appointment Cancellation Reason | Inappropriate service |\n| Referral Cancellation Reason | Patient will go to a private clinic |\n| Appointment Non-attendance Reason | Patient ill |\n| Priority | Routine |\n", - "type": "string" - }, - "property": { - "description": "\nSome properties are only returned for certain code systems\n\n| Property | Code System |\n| -----------------------------------------| ----------------------------------------------------------- |\n| EffectiveFrom | All Code Systems |\n| EffectiveTo | All Code Systems |\n| Specialty | CLINIC-TYPE |\n| AppointmentBookingCancellationReasonType | APPOINTMENT-CANCELLATION-REASON |\n| WillCancelWholeRequest | APPOINTMENT-CANCELLATION-REASON |\n| Usage | APPOINTMENT-CANCELLATION-REASON |\n| CommentIsMandatory | APPOINTMENT-CANCELLATION-REASON/REFERRAL-CANCELLATION-REASON |\n| businessFunction | APPOINTMENT-CANCELLATION-REASON/REFERRAL-CANCELLATION-REASON |\n| AppointmentRequestCancellationReasonType | REFERRAL-CANCELLATION-REASON |\n| CanCancelAppointment | REFERRAL-CANCELLATION-REASON |\n| RequestCancellationReferrerUsage | REFERRAL-CANCELLATION-REASON |\n| DeferToProviderContactDays | PRIORITY |\n| TriageContactDays | PRIORITY |\n", - "type": "array", - "nullable": true, - "items": { - "anyOf": [ - { - "title": "Will cancel whole request value", - "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", - "type": "object", - "deprecated": true, - "required": [ - "code", - "valueBoolean" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "willCancelWholeRequest" - ] - }, - "valueBoolean": { - "type": "boolean" - } - } - }, - { - "title": "Effective from date", - "type": "object", - "required": [ - "code", - "valueDateTime" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "effectiveFrom" - ] - }, - "valueDateTime": { - "type": "string", - "format": "date-time" - } - } - }, - { - "title": "Effective to date", - "type": "object", - "required": [ - "code", - "valueDateTime" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "effectiveTo" - ] - }, - "valueDateTime": { - "type": "string", - "format": "date-time" - } - } - }, - { - "title": "Specialty value", - "description": "This will only be returned when codeSystemType is CLINIC-TYPE", - "type": "object", - "required": [ - "code", - "valueCoding" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "specialty" - ] - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "Appointment cancellation reason type", - "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "valueCoding" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "appointmentBookingCancellationReasonType" - ] - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentBookingCancellationReasonType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentBookingCancellationReasonType-1" - }, - "code": { - "type": "string", - "example": "PROVIDER_REJECT" - } - } - } - } - }, - { - "title": "AppointmentCancellationUsage", - "description": "This will only be returned when `codeSystemType` is `APPOINTMENT-CANCELLATION-REASON`", - "type": "object", - "required": [ - "code", - "valueCoding" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "usage" - ], - "example": "usage" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentCancellationReasonUsage-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentCancellationReasonUsage-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECT", - "CANCEL" - ], - "example": "REJECT" - } - } - } - } - }, - { - "title": "Comment is mandatory value", - "description": "This will only be returned when codeSystemType is APPOINTMENT-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "valueBoolean" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "commentIsMandatory" - ] - }, - "valueBoolean": { - "type": "boolean" - } - } - }, - { - "title": "BusinessFunction", - "description": "This will only be returned when `codeSystemType` is `APPOINTMENT-CANCELLATION-REASON` or `REFERRAL-CANCELLATION-REASON`", - "type": "object", - "required": [ - "code", - "valueCoding" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "businessFunction" - ], - "example": "businessFunction" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - }, - "code": { - "type": "string", - "example": "REFERRING_CLINICIAN" - } - } - } - } - }, - { - "title": "Appointment request cancellation reason type", - "description": "This will only be returned when codeSystemType is REFERRAL-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "valueCoding" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "appointmentRequestCancellationReasonType" - ] - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentRequestCancellationReasonType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentRequestCancellationReasonType-1" - }, - "code": { - "type": "string", - "example": "PROVIDER" - } - } - } - } - }, - { - "title": "CanCancelAppointment", - "description": "This will only be returned when `codeSystemType` is REFERRAL-CANCELLATION-REASON", - "type": "object", - "required": [ - "code", - "valueBoolean" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "canCancelAppointment" - ], - "example": "canCancelAppointment" - }, - "valueBoolean": { - "type": "boolean" - } - } - }, - { - "title": "RequestCancellationReferrerUsage", - "description": "This will only be returned when `codeSystemType` is `REFERRAL-CANCELLATION-REASON`", - "type": "object", - "required": [ - "code", - "valueCoding" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "referrerUsage" - ], - "example": "referrerUsage" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralRequestCancellationReasonUsage-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralRequestCancellationReasonUsage-1" - }, - "code": { - "type": "string", - "enum": [ - "CANCEL_REFERRAL" - ], - "example": "CANCEL_REFERRAL" - } - } - } - } - }, - { - "title": "Defer to provider contact days", - "description": "This will only be returned when codeSystemType is PRIORITY", - "type": "object", - "required": [ - "code", - "valueInteger" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "deferToProviderContactDays" - ] - }, - "valueInteger": { - "type": "integer", - "example": 10 - } - } - }, - { - "title": "Triage contact days", - "description": "This will only be returned when codeSystemType is PRIORITY", - "type": "object", - "required": [ - "code", - "valueInteger" - ], - "properties": { - "code": { - "type": "string", - "enum": [ - "triageContactDays" - ] - }, - "valueInteger": { - "type": "integer", - "example": 10 - } - } - } - ] - } - } - } - } - } - } - }, - "examples": { - "specialty": { - "summary": "Specialty Reference Data", - "description": "This is example data only and should not be taken as the real reference data. Specialty data may have 'effectiveTo' dates in the past", - "value": { - "$ref": "../../../examples/getCodeSystem/responses/SpecialtyCodeSystem.json" - } - }, - "clinic-type": { - "summary": "Clinic Type Reference Data", - "description": "This is example data only and should not be taken as the real reference data.", - "value": { - "$ref": "../../../examples/getCodeSystem/responses/ClinicTypeCodeSystem.json" - } - }, - "appointment-cancellation-reason-code": { - "summary": "Appointment Cancellation Reason Reference Data", - "description": "This is example data only and should not be taken as the real reference data.", - "value": { - "$ref": "../../../examples/getCodeSystem/responses/AppointmentCancellationReasonCodeSystem.json" - } - }, - "referral-request-cancellation-reason-code": { - "summary": "ReferralRequest Cancellation Reason Reference Data", - "description": "This is example data only and should not be taken as the real reference data.", - "value": { - "$ref": "../../../examples/getCodeSystem/responses/ReferralCancellationReasonCodeSystem.json" - } - }, - "appointment-non-attendance-reason": { - "summary": "Appointment Non-attendance Reason Reference Data", - "description": "This is example data only and should not be taken as the real reference data.", - "value": { - "$ref": "../../../examples/getCodeSystem/responses/AppointmentNonAttendanceReasonCodeSystem.json" - } - }, - "priority": { - "summary": "Priority Reference Data", - "description": "This is example data only and should not be taken as the real reference data.", - "value": { - "$ref": "../../../examples/getCodeSystem/responses/PriorityCodeSystem.json" - } - } - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/$ers.fetchworklist": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to retrieve available worklists of referral requests. \nService Providers can use [[HYPERLINK_A023]] to retrieve available worklists of advice and guidance requests. \nThere are currently no worklists of advice and guidance requests for Referrers.\n\nWorklists provide lists of referral/advice requests that meet certain criteria, \ntypically where a user needs to be aware of something important, or to undertake an action, in order to avoid delays to patient care.\n\n## Referring Organisations\nReferring organisations can currently access the following referral related worklists:\n - The 'Letters Outstanding' worklist contains referrals which require a referral letter to be added.\n - The 'Rejected / Triage Response' worklist contains referrals which have had an appointment rejected or have been returned to the referrer with a response as part of a triage outcome.\n - The 'Assessment Returned / Cancelled / DNA' worklist contains referrals which have a clinical assessment outcome of 'advise referrer' recorded, or referrals which have been cancelled by someone outside the initial referring organisation, or referrals where the patient did not attend the appointment booking and the provider has returned the referral back to the referrer for action.\n - The 'Awaiting Booking' worklist contains referrals for which an appointment booking could be made but they do not currently have an appointment booking. This includes referrals that are currently awaiting triage, deferred to provider, or have had their appointment booking cancelled.\n\nFilters can be used in requests for service provider organisation worklists, however, filters cannot be used in requests for referring organisation worklists.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint and retrieve the referring organisation worklists, you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `REFERRING_ADMIN`\n\n### Use case\nAs an authenticated user\n\nI need to retrieve a referral worklist for my referring organisation\n\nSo that I can determine which referrals I need to take further action on\n\n### Related endpoints\nTo retrieve pertinent details relating to a referral:\n - Use [[HYPERLINK_A005]] to retrieve the details of the referral\n - Use [[HYPERLINK_A006]] to retrieve the clinical attachments for a referral\n - Use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for a referral\n\nYou can use [[HYPERLINK_A029]] to determine what endpoints an authenticated user is permitted to use for a referral in it's current state.\n\n## Service Providing Organisations\nService provider organisations can currently access the following referral related worklists:\n - The 'Referrals for Review' worklist contains booked and RAS (triage) referrals that require review by the service provider organisation. The version of each referral in the worklist will also be returned. Note that the version can change due to admin/clinical changes as well as internal e-RS processes.\n - The 'Appointment Slot Issues' worklist contains referrals which have been 'deferred to provider' because of a lack of appointment availability (e.g. no appointment slots). \n The referrals need to be reviewed and if appropriate booked into a service at the service provider organisation.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nSupported Worklists:\n- Referrals for Review\n- Appointment Slot Issues\n\nThe Service filter is mandatory when using this security pattern.\n\nThis endpoint must only be used to retrieve the worklist for a given service up to two times per day. If this does not meet your requirements, please [[HYPERLINK_CONTACT_US]] to discuss your use case.\n\nIf a worklist response exceeds 10MB, a successful response will not be returned. This is due to the size limitation on the APIM platform.\n\n### User-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nSupported Worklists:\n - Referrals for Review\n - Appointment Slot Issues\n\nIf a worklist response exceeds 10MB, a successful response will not be returned. This is due to the size limitation on the APIM platform.\n\n### Use case\nAs an authenticated user\n\nI need to retrieve a referral worklist for my service providing organisation\n\nSo that I can determine which referrals I need to take further action on\n\n### Related endpoints\n\nTo retrieve pertinent details relating to a referral:\n - Use [[HYPERLINK_A005]] to retrieve the details of the referral\n - Use [[HYPERLINK_A006]] to retrieve the clinical attachments for a referral\n - Use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for a referral\n\nFor service providing organisations reviewing booked referrals on the 'Referrals for review' worklist:\n - Use [[HYPERLINK_A013]] to accept a referral into a bookable service\n - Use [[HYPERLINK_A014]] to reject a referral from a bookable service\n - Use [[HYPERLINK_A022]] to request an admin team to rebook or redirect a referral\n\nFor service providing organisations reviewing triage (RAS) referrals on the 'Referrals for review' worklist:\n - Use [[HYPERLINK_A028]] to record the triage outcome based on the available clinical information and attachments\n\nFor service providing organisations reviewing referrals that have been deferred to provider on the 'Appointment slot issues' worklist:\n - Use [[HYPERLINK_A028]] to record the triage outcome based on the available clinical information and attachments\n", - "summary": "Retrieve referral worklist (A008, FHIR STU3)", - "operationId": "a008-retrieve-worklist", - "tags": [ - "Retrieve clinical information", - "Review referral requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-FetchWorklist-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `listType` | `1..1` | |\n| `service` | `0..1` | Mandatory for the application-restricted security pattern |\n| `specialtyAssignedIndicator` | `0..1` | |\n| `specialty` | `0..1` | | \n| `location` | `0..1` | | \n| `clinicianAssignedIndicator` | `0..1` | | \n| `clinician` | `0..1` | | \n", - "items": { - "anyOf": [ - { - "title": "listType", - "description": "Indicates the type of list requested", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "listType" - ], - "example": "listType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| -------------------------------- | ----------- | -------------------------------------- |\n| `eRS-ReferralListSelector` | `0..1` | |\n| `eRS-CommunicationListSelector` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-ReferralListSelector", - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRALS_FOR_REVIEW", - "APPOINTMENT_SLOT_ISSUES", - "REJECTED_TRIAGE_RESPONSE", - "ASSESSMENT_RETURNED_CANCELLED_DNA", - "AWAITING_BOOKING", - "LETTERS_OUTSTANDING" - ], - "example": "REFERRALS_FOR_REVIEW" - } - } - }, - { - "title": "eRS-CommunicationListSelector", - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVICE_AND_GUIDANCE_REQUESTS" - ], - "example": "ADVICE_AND_GUIDANCE_REQUESTS" - } - } - } - ] - } - } - } - } - } - }, - { - "title": "service", - "description": "The service identifier", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - }, - { - "title": "specialtyAssignedIndicator", - "description": "Indicates whether filtering on Specialty is required or not\n", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialtyAssignedIndicator" - ], - "example": "specialtyAssignedIndicator" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - }, - "code": { - "type": "string", - "enum": [ - "ASSIGNED", - "NOT_ASSIGNED" - ], - "example": "NOT_ASSIGNED" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "location", - "description": "The service location identifier", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "location" - ], - "example": "location" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "clinicianAssignedIndicator", - "description": "Indicates whether filtering on Clinician is required or not\n", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicianAssignedIndicator" - ], - "example": "clinicianAssignedIndicator" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - }, - "code": { - "type": "string", - "enum": [ - "ASSIGNED", - "NOT_ASSIGNED" - ], - "example": "NOT_ASSIGNED" - } - } - } - } - } - } - } - }, - { - "title": "clinician", - "description": "The clinician assigned to the Referral Request. If present, the 'clinicianAssignedIndicator' parameter must be set to 'Assigned'", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinician" - ], - "example": "clinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "referrals-for-review": { - "summary": "Referrals for review", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/MinimalReferralsForReview.json" - } - }, - "appointment-slot-issues": { - "summary": "Appointment slot issues", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/MinimalAppointmentSlotIssues.json" - } - }, - "filtered-by-specialty": { - "summary": "Filter by specialty", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/FilteringBySpecialty.json" - } - }, - "filtered-by-clinician": { - "summary": "Filter by clinician", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/FilteringByClinician.json" - } - }, - "filtered-by-service": { - "summary": "Filter by service", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/FilteringByService.json" - } - }, - "rejected-triage-responses": { - "summary": "Rejected Triage Responses", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/MinimalRejectedTriageResponse.json" - } - }, - "assessment-returned-cancelled-dna": { - "summary": "Assessment Returned Cancelled DNA", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/MinimalAssessmentReturnedCancelledDna.json" - } - }, - "awaiting-booking": { - "summary": "Awaiting Booking", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/MinimalAwaitingBooking.json" - } - }, - "letters-outstanding": { - "summary": "Letters Outstanding", - "value": { - "$ref": "../../examples/retrieveWorklist/requests/MinimalLettersOutstanding.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "The response body contains the list of referrals (if any) that match the search criteria provided", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-FetchWorklist-List", - "description": "A list of referrals representing the available worklist items", - "type": "object", - "required": [ - "meta", - "resourceType", - "status", - "mode" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------------------------------------------- |\n| `Practitioner` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n| `Patient` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n", - "items": { - "anyOf": [ - { - "title": "Practitioner", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "Practitioner-021600556514" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Practitioner" - ], - "example": "Practitioner" - }, - "identifier": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - }, - { - "title": "Patient", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "Patient-9912003888" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Patient" - ], - "example": "Patient" - }, - "identifier": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with referral details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070002" - } - } - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ----------------------------------------------------------- | ----------- | ------------------------------------------------------------- |\n| `Extension-eRS-ReferralsforReview-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AppointmentSlotIssues-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested | \n| `Extension-eRS-AdviceAndGuidanceRequests-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-RejectedTriageResponse-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AwaitingBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-LettersOutstanding-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralsforReview-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `requestContextStatus` | `1..1` | |\n| `clinicalInfoFirstSubmitted` | `0..1` | |\n| `clinicalInfoLastUpdated` | `0..1` | |\n| `appointmentStart` | `0..1` | |\n| `allocatedClinician` | `0..1` | |\n| `service` | `1..1` | |\n| `referralRequestVersion` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#Patient-9462979626" - } - } - } - } - }, - { - "title": "namedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#Practitioner-021600556514" - } - } - } - } - }, - { - "title": "eReferralPathwayStart", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "eReferralPathwayStart" - ], - "example": "eReferralPathwayStart" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "clinicalInfoPrinted", - "type": "object", - "required": [ - "url", - "valueBoolean" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoPrinted" - ], - "example": "clinicalInfoPrinted" - }, - "valueBoolean": { - "type": "boolean", - "example": false - } - } - }, - { - "title": "requestContextStatus", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "requestContextStatus" - ], - "example": "requestContextStatus" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "LETTER_CHANGED", - "PRIORITY_CHANGED", - "PRIORITY_AND_LETTER_CHANGED", - "NEVER_REVIEWED" - ], - "example": "NEVER_REVIEWED" - }, - "display": { - "type": "string", - "example": "Never Reviewed" - } - } - } - } - } - } - } - }, - { - "title": "clinicalInfoFirstSubmitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoFirstSubmitted" - ], - "example": "clinicalInfoFirstSubmitted" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "clinicalInfoLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoLastUpdated" - ], - "example": "clinicalInfoLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-03T10:44:42.764Z" - } - } - }, - { - "title": "referralType", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralType" - ], - "example": "referralType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" - }, - "code": { - "type": "string", - "enum": [ - "APPOINTMENT", - "TRIAGE_DEFERRAL" - ], - "example": "TRIAGE_DEFERRAL" - } - } - } - } - } - } - } - }, - { - "title": "appointmentStart", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "appointmentStart" - ], - "example": "appointmentStart" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-02T14:15:00.000Z" - } - } - }, - { - "title": "allocatedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "allocatedClinician" - ], - "example": "allocatedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#Practitioner-021600556514" - } - } - } - } - }, - { - "title": "service", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier", - "display" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Service Name" - } - } - } - } - }, - { - "title": "referralRequestVersion", - "type": "object", - "required": [ - "url", - "valueInteger" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralRequestVersion" - ], - "example": "referralRequestVersion" - }, - "valueInteger": { - "type": "integer", - "example": 0 - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AppointmentSlotIssues-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `ubrnReceived` | `0..1` | |\n| `patientContactExpected` | `0..1` | |\n| `clinicalInformationStatus` | `0..1` | |\n| `reason` | `0..1` | |\n| `lastContact` | `0..1` | |\n| `service` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "namedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "eReferralPathwayStart", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "eReferralPathwayStart" - ], - "example": "eReferralPathwayStart" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "clinicalInfoPrinted", - "type": "object", - "required": [ - "url", - "valueBoolean" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoPrinted" - ], - "example": "clinicalInfoPrinted" - }, - "valueBoolean": { - "type": "boolean", - "example": false - } - } - }, - { - "title": "ubrnReceived", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "ubrnReceived" - ], - "example": "ubrnReceived" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "patientContactExpected", - "type": "object", - "required": [ - "url", - "valueDate" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patientContactExpected" - ], - "example": "patientContactExpected" - }, - "valueDate": { - "type": "string", - "format": "date", - "example": "2021-09-07" - } - } - }, - { - "title": "clinicalInformationStatus", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInformationStatus" - ], - "example": "clinicalInformationStatus" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PRESENT", - "NOT_APPLICABLE", - "NOT_DUE", - "OVERDUE" - ], - "example": "NOT_DUE" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - } - } - } - } - } - }, - { - "title": "lastContact", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "lastContact" - ], - "example": "lastContact" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "service", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier", - "display" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Service Name" - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AdviceAndGuidanceRequests-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `category` | `1..1` | |\n| `adviceFirstRequested` | `1..1` | |\n| `adviceLastUpdated` | `1..1` | |\n| `referrer` | `1..1` | |\n| `service` | `1..1` | |\n| `clinicType` | `0..1` | |\n| `communicationRequestVersion` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "namedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "category", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "category" - ], - "example": "category" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_RESPONSE_REQUIRED", - "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", - "REFERRER_TO_REVIEW_RESPONSE", - "CONVERSATION_ENDED_CANCELLED", - "CONVERSATION_ENDED_CLOSED", - "ADVICE_CONVERTED" - ], - "example": "PROVIDER_RESPONSE_REQUIRED" - } - } - } - } - } - } - } - }, - { - "title": "adviceFirstRequested", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "adviceFirstRequested" - ], - "example": "adviceFirstRequested" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "adviceLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "adviceLastUpdated" - ], - "example": "adviceLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "adviceLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "adviceLastUpdated" - ], - "example": "adviceLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "service", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier", - "display" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Service Name" - } - } - } - } - }, - { - "title": "clinicType", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/CLINIC-TYPE" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - } - } - } - }, - { - "title": "communicationRequestVersion", - "type": "object", - "required": [ - "url", - "valueInteger" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "communicationRequestVersion" - ], - "example": "communicationRequestVersion" - }, - "valueInteger": { - "type": "integer", - "example": 0 - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-RejectedTriageResponse-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Rejected/TriageRequest worklist, only included if `status` is `TRIAGE_RESPONSE` |\n", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "referralLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralLastUpdated" - ], - "example": "referralLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "status", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "status" - ], - "example": "status" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "ASSESSMENT_RESULT", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "NOT_BOOKED", - "BOOKED", - "AWAITING_TRIAGE", - "DEFERRED_TO_PROVIDER", - "APP_CANCELLED_BY_PROVIDER", - "APP_CANCELLED_BY_PATIENT", - "TRIAGED_PROVIDER_TO_ACTION", - "TRIAGE_RESPONSE" - ], - "example": "REJECTED" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Assessment result", - "Cancelled referral", - "Did not attend", - "Not booked", - "Booked", - "Awaiting triage", - "Deferred to provider", - "Appointment cancelled by provider", - "Appointment cancelled by patient", - "Triaged - provider to action", - "Triage Response" - ], - "example": "Rejected" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - ], - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "FURTHER_INFORMATION_REQUIRED" - }, - "display": { - "type": "string", - "example": "Further information required" - } - } - } - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" - }, - "extension": { - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Assessment Returned / Cancelled / DNA worklist, only included if `status` is `CANCELLED_REFERRAL` |\n", - "type": "array", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "referralLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralLastUpdated" - ], - "example": "referralLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "status", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "status" - ], - "example": "status" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "ASSESSMENT_RESULT", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "NOT_BOOKED", - "BOOKED", - "AWAITING_TRIAGE", - "DEFERRED_TO_PROVIDER", - "APP_CANCELLED_BY_PROVIDER", - "APP_CANCELLED_BY_PATIENT", - "TRIAGED_PROVIDER_TO_ACTION", - "TRIAGE_RESPONSE" - ], - "example": "REJECTED" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Assessment result", - "Cancelled referral", - "Did not attend", - "Not booked", - "Booked", - "Awaiting triage", - "Deferred to provider", - "Appointment cancelled by provider", - "Appointment cancelled by patient", - "Triaged - provider to action", - "Triage Response" - ], - "example": "Rejected" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" - ], - "example": "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "INTEND_PRIVATE" - }, - "display": { - "type": "string", - "example": "Patient will go to a private clinic" - } - } - } - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AwaitingBooking-WorklistItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" - }, - "extension": { - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Awaiting Booking worklist, only included if `status` is `APPOINTMENT_CANCELLED_BY_PROVIDER` or `APPOINTMENT_CANCELLED_BY_PATIENT` |\n", - "type": "array", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "referralLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralLastUpdated" - ], - "example": "referralLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "status", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "status" - ], - "example": "status" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "ASSESSMENT_RESULT", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "NOT_BOOKED", - "BOOKED", - "AWAITING_TRIAGE", - "DEFERRED_TO_PROVIDER", - "APP_CANCELLED_BY_PROVIDER", - "APP_CANCELLED_BY_PATIENT", - "TRIAGED_PROVIDER_TO_ACTION", - "TRIAGE_RESPONSE" - ], - "example": "REJECTED" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Assessment result", - "Cancelled referral", - "Did not attend", - "Not booked", - "Booked", - "Awaiting triage", - "Deferred to provider", - "Appointment cancelled by provider", - "Appointment cancelled by patient", - "Triaged - provider to action", - "Triage Response" - ], - "example": "Rejected" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - ], - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_APPOINTMENT_CLASH" - }, - "display": { - "type": "string", - "example": "Patient - Clashes with another appointment" - } - } - } - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-LettersOutstanding-WorklistItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" - }, - "extension": { - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `letterDue` | `1..1` | The `date` a referral letter is due for the `ReferralRequest` |\n", - "type": "array", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "letterDue", - "type": "object", - "required": [ - "url", - "valueDate" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "letterDue" - ], - "example": "letterDue" - }, - "valueDate": { - "type": "string", - "format": "date", - "example": "2021-11-24" - } - } - } - ] - } - } - } - } - ] - } - } - } - } - } - } - }, - "examples": { - "referrals-for-review": { - "summary": "Referrals for Review", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/ReferralsForReview.json" - } - }, - "appointment-slot-issues": { - "summary": "Appointment Slot Issues", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/AppointmentSlotIssues.json" - } - }, - "filtered-by-specialty": { - "summary": "Filtered by specialty", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/FilteredBySpecialty.json" - } - }, - "filtered-by-clinician": { - "summary": "Filtered by clinician", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/FilteredByClinician.json" - } - }, - "filtered-by-service": { - "summary": "Filtered by service", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/FilteredByService.json" - } - }, - "rejected-triage-responses": { - "summary": "Rejected Triage / Response", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/RejectedTriageResponse.json" - } - }, - "assessment-returned-cancelled-dna": { - "summary": "Assessment Returned / Cancelled / DNA", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/AssessmentReturnedCancelledDna.json" - } - }, - "awaiting-booking": { - "summary": "Awaiting Booking", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/AwaitingBooking.json" - } - }, - "letters-outstanding": { - "summary": "Letters Outstanding", - "value": { - "$ref": "../../../examples/retrieveWorklist/responses/LettersOutstanding.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request or service. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve details of a referral. This includes references to clinical attachments, related referrals and other important data.\n\nDuring the lifecycle of a referral, the state of the referral may change multiple times. To help with understanding the state of a referral, we provide an \"at a glance\" summary of the referral as detailed below:\n\n| Code returned via https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1 | Description |\n| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| `APPT_CANCELLED_BY_PATIENT` | The referral's most recent appointment was cancelled at the request of, or directly by, a patient |\n| `APPT_CANCELLED_BY_PROVIDER` | The referral's most recent appointment was cancelled by the service provider |\n| `ASSESSMENT_RESULT` | A service provider has reviewed and drafted, or submitted a clinical assessment for the referral |\n| `AWAITING_TRIAGE` | The triage referral is currently pending review with a service provider |\n| `BOOKED` | This referral's appointment indicates a date and time with a service |\n| `CANCELLED_REFERRAL` | The referral has been cancelled and cannot be progressed any further |\n| `DEFERRED_TO_PROVIDER` | The service provider will arrange the patient's appointment |\n| `DID_NOT_ATTEND` | The patient did not attend their last appointment |\n| `NOT_BOOKED` | The referral is currently not booked, there is currently no planned patient encounter |\n| `REJECTED` | The referral was rejected by a provider at their service |\n| `TRIAGE_RESPONSE` | A service has passed the referral back to the referrer, with advice |\n| `TRIAGED_PROVIDER_TO_ACTION` | The service provider has recorded a review decision, with the intention of processing this referral |\n\nSome referral states may also have a `reason` and some reasons may also have a `comment`. These are described below:\n\n## Reason\n- The reason is always connected to the current state. This means the reason is likely to change each time the state changes. You cannot currently retrieve previous versions of a referral.\n- This reason may have been selected by a clinician or automatically applied by the e-RS system at the time the state was persisted.\n- A reason can be dynamic reference data, from any of the following sets of reference data: `APPOINTMENT-CANCELLATION-REASON`, `REFERRAL-CANCELLATION-REASON`, `APPOINTMENT-NON-ATTENDANCE-REASON`. These are retrievable from [[HYPERLINK_A004]].\n- A reason may be static reference data.\n\n## Comments\n- The comment is always connected to the current reason, and state. This means the comment is likely to change as the state changes.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user or application and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to retrieve details of a referral.\n\n## Important notes\n### Attachment availability\n\n In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A005]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE | The file is available for download. |\n| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again |\n| THREATS FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n### Receiving an e-Referral Pathway Start Date\n \nThe e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]].\n\nIf a referral was created with an alternate pathway start date, then this will be available in the referral request response.\n\nService providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]].\n\n## Use case\n\nAs an authenticated user or application\n\nI want to read details of a referral\n\nSo that I can decide what further action may be needed.\n\n## Related endpoints\n\nYou can retrieve attachments that are associated with the referral using [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]. Attachments can only be retrieved where the eRS-AvailabilityStatus-1 code returned is 'AVAILABLE'\n\nYou can retrieve a clinical information summary for the referral using [[HYPERLINK_A007]]\n\nYou can search for services appropriate to a referral to form a shortlist using [[HYPERLINK_A010]]\n\nIf bookable services are on the shortlist of the referral, you can retrieve appointment slots for a service on the shortlist for a referral using [[HYPERLINK_A015]]\n\nYou can retrieve the patient letter appropriate to the referral using [[HYPERLINK_A019]]\n\nYou can retrieve reference data used in viewing a referral using [[HYPERLINK_A004]]\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ----------------------- |\n| Unbooked `ReferralRequest` | `ubrn`=`000000070000` |\n| `ReferralRequest` booked to directly-bookable service | `ubrn`=`000000070001` |\n| `ReferralRequest` booked to indirectly-bookable service | `ubrn`=`000000070002` |\n| `ReferralRequest` deferred to service provider for booking | `ubrn`=`000000070003` |\n| `ReferralRequest` that was converted from an Advice and Guidance Request | `ubrn`=`000000070004` |\n| `ReferralRequest` with related `ReferralRequest` | `ubrn`=`000000070005` |\n| `ReferralRequest` with additional requirements listed | `ubrn`=`000000070011` |\n| `ReferralRequest` with attachments unavailable to download | `ubrn`=`000000070012` | \n", - "summary": "Retrieve referral request (A005, FHIR STU3)", - "operationId": "a005-retrieve-referral-request", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "unbooked": { - "summary": "Unbooked `ReferralRequest`", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/Unbooked.json" - } - }, - "booked-dbs": { - "summary": "`ReferralRequest` booked to directly-bookable service", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/BookedDBS.json" - } - }, - "booked-ibs": { - "summary": "`ReferralRequest` booked to indirectly-bookable service", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/BookedIBS.json" - } - }, - "deferred-to-provider": { - "summary": "`ReferralRequest` deferred to service provider for booking", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/DeferredToProvider.json" - } - }, - "converted-from-advice-and-guidance": { - "summary": "`ReferralRequest` that was converted from an Advice and Guidance Request", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json" - } - }, - "with-related-referral": { - "summary": "`ReferralRequest` with related ReferralRequest", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/WithRelatedReferral.json" - } - }, - "with-additional-requirements": { - "summary": "`ReferralRequest` with additional requirements", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/WithAdditionalRequirements.json" - } - }, - "with-unavailable-attachments": { - "summary": "Unbooked `ReferralRequest` with attachments unavailable for download", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/WithUnavailableAttachments.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/Task": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nThis endpoint allows an authenticated e-RS user to check ahead of performing an action, \nwhether or not the action is permitted. This endpoint performs a search for available and \nsupported actions that can be *currently* performed, by the *current* e-RS user on a *specific* \nreferral. When a permitted action is returned, the e-RS user could immediately attempt to \nperform a permitted action.\n\nYou SHOULD NOT cache the list of available user actions returned because this endpoint \ngives the *current* actions for the *current* e-RS user, for the referral in context and is therefore, \ntransient; a future call for a different e-RS user, referral, or at a different point in time, \nmight result in a different set of actions, leading to potential failure flows.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Application-restricted, unattended access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nSupported action:\n - Record Review Outcome\n - Cancel Referral\n\n### Healthcare worker, user-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou should obtain a `Unique Booking Reference Number` (UBRN) before using this endpoint, as the current UBRN version is required.\n\n## Use case\n\nAs an authenticated user\n\nI want to know what actions I might currently perform on a referral prior to attempting to do so\n\nSo that I can review my options, and do not try to persist a prohibited action\n\n## Important information about using this endpoint\n\nThis endpoint can be used to check permitted actions on a referral. Only a select number of results will be returned for which a corresponding action can be performed via the API. Not all actions are currently supported.\n\nAs a referrer, the actions returned can include:\n - Cancel Directly Booked Appointment \n - Cancel Referral\n - Create Appointment\n - Change Shortlist\n - Change Shortlist and Send for Triage\n\nAs a service provider, the actions returned can include:\n - Record Review Outcome\n - Cancel Referral\n\n## Related endpoints\n\nTo retrieve pertinent details relating to a referral:\n - Use [[HYPERLINK_A005]] to retrieve the details of the referral, UBRN and UBRN version.\n\nBelow is a list of actions that could be returned by calling [[HYPERLINK_A029]]\n - Use [[HYPERLINK_A028]] to record a review outcome based on the available clinical information and attachments.\n - Use [[HYPERLINK_A016]] to Book, or if unable, Defer, an appointment to a specific service on the current shortlist, or to make a triage deferral by sending an appointment to a triage service.\n - Use [[HYPERLINK_A031]] to change the shortlist of bookable services on an existing referral.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| --------------------------------------------------- | ---------------------------------------------------------------------------------------- |\n| No \"action\" is available | `focus`=`ReferralRequest/000000070000/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Record Review Outcome\" is available | `focus`=`ReferralRequest/000000070001/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Create Appointment\" is available | `focus`=`ReferralRequest/000000070002/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Change Shortlist\" is available | `focus`=`ReferralRequest/000000070003/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Change Shortlist and Send for Triage\" is available | `focus`=`ReferralRequest/000000070004/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Cancel Referral\" is available | `focus`=`ReferralRequest/000000070005/_history/6`, `intent`=`proposal`, `status`=`ready` |\n| \"Cancel Directly Booked Appointment\" is available | `focus`=`ReferralRequest/000000070006/_history/6`, `intent`=`proposal`, `status`=`ready` |\n", - "summary": "Available actions for user (A029, FHIR STU3)", - "operationId": "a029-available-actions-for-user-list", - "tags": [ - "Change appointment", - "Manage referral", - "Review referral requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "query", - "name": "focus", - "description": "The component describing the ReferralRequest for which the task list is requested for.\n\nPattern:\n\n`ReferralRequest/{ubrn}/_history/{version}`\n\n - The `ubrn` represents the unique booking reference number of the referral request\n - The `version` is the version of the referral request (only the most current version will be accepted)\n", - "required": true, - "schema": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/6" - } - }, - { - "in": "query", - "name": "intent", - "description": "Value must be set to `proposal`\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "proposal" - ], - "example": "proposal" - } - }, - { - "in": "query", - "name": "status", - "description": "The status of the `task`, value must be set to `ready`\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ready" - ], - "example": "ready" - } - } - ], - "responses": { - "200": { - "description": "Bundle containing list of available tasks", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "Bundle resource containing tasks", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "type", - "link", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "604dc1ea-986c-45ec-b36c-cf9d2fabc5c0" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated", - "profile" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" - ], - "example": "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Bundle" - ], - "example": "Bundle" - }, - "type": { - "type": "string", - "enum": [ - "searchset" - ], - "example": "searchset" - }, - "link": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "relation", - "url" - ], - "properties": { - "relation": { - "type": "string", - "enum": [ - "self" - ], - "example": "self" - }, - "url": { - "type": "string", - "example": "_baseUrl_/STU3/Task?focus=ReferralRequest/000000070000/_history/6&intent=proposal&status=ready" - } - } - } - }, - "entry": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ----------------------- | ----------- | --------------------------------------------------- |\n| `CareConnect-Task` | `0..*` | |\n", - "items": { - "title": "CareConnect-Task", - "description": "CareConnect-Task details a single `task` (action available for user).\n", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/STU3/Task/ed4dff57-503c-46ef-9084-4045a23f4c2a" - }, - "resource": { - "title": "CareConnect-Task", - "description": "The Task resource represents a specific task to be performed by the user.", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "intent", - "focus" - ], - "properties": { - "id": { - "type": "string", - "example": "ed4dff57-503c-46ef-9084-4045a23f4c2a" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Task-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Task-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Task" - ], - "example": "Task" - }, - "status": { - "type": "string", - "enum": [ - "ready" - ], - "example": "ready" - }, - "intent": { - "type": "string", - "enum": [ - "proposal" - ], - "example": "proposal" - }, - "focus": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/6" - } - } - }, - "code": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "anyOf": [ - { - "title": "AvailableActionsForUser", - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailableActionsForUser-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailableActionsForUser-1" - }, - "code": { - "type": "string", - "enum": [ - "RECORD_REVIEW_OUTCOME", - "CREATE_APPOINTMENT", - "CHANGE_SHORTLIST", - "CHANGE_SHORTLIST_AND_SEND_FOR_TRIAGE", - "CANCEL_REFERRAL", - "CANCEL_DIRECTLY_BOOKED_APPOINTMENT" - ], - "example": "RECORD_REVIEW_OUTCOME" - }, - "display": { - "type": "string", - "enum": [ - "Record Review Outcome", - "Create Appointment", - "Change Shortlist", - "Change Shortlist and Send for Triage", - "Cancel Referral", - "Cancel Directly Booked Appointment" - ], - "example": "Record Review Outcome" - } - } - } - ] - } - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "match" - ], - "example": "match" - } - } - } - } - } - } - } - }, - "examples": { - "empty": { - "summary": "Empty", - "value": { - "$ref": "../../../examples/availableActionsForUserList/Empty.json" - } - }, - "with-record-review-outcome": { - "summary": "With Record Review Outcome", - "value": { - "$ref": "../../../examples/availableActionsForUserList/WithRecordReviewOutcome.json" - } - }, - "with-create-appointment": { - "summary": "With Create Appointment", - "value": { - "$ref": "../../../examples/availableActionsForUserList/WithCreateAppointment.json" - } - }, - "with-change-shortlist": { - "summary": "With Change Shortlist", - "value": { - "$ref": "../../../examples/availableActionsForUserList/WithChangeShortlist.json" - } - }, - "with-change-shortlist-and-send-for-triage": { - "summary": "With Change Shortlist and Send for Triage", - "value": { - "$ref": "../../../examples/availableActionsForUserList/WithChangeShortlistAndSendForTriage.json" - } - }, - "with-cancel-referral": { - "summary": "With Cancel Referral", - "value": { - "$ref": "../../../examples/availableActionsForUserList/WithCancelReferral.json" - } - }, - "with-cancel-directly-booked-appointment": { - "summary": "With Cancel Directly Booked Appointment", - "value": { - "$ref": "../../../examples/availableActionsForUserList/WithCancelDBAppointment.json" - } - } - } - } - } - }, - "400": { - "description": "Where status code 400 (Bad Request) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| MISSING_PARAMETER | Indicates missing mandatory FHIR search parameter. |\n| HISTORY_NOT_SUPPORTED | Only the current version of the UBRN is permissible. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/_history/{version}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to retrieve a specific version of `ReferralRequest`.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nThe pre-requisites for this endpoint are the same as for endpoint [[HYPERLINK_A005]].\n\nNote: e-RS only supports the retrieval of the most recent version of `ReferralRequest`. You cannot retrieve earlier versions.\n\n## Important notes\n### Attachment availability\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A005]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE | The file is available for download. |\n| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again |\n| THREATS FOUND | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n### Receiving an e-Referral Pathway Start Date \n \nThe e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]].\n\nIf a referral was created with an alternate pathway start date, then this will be available in the referral request response.\n\nService providers must always ensure the correct start date is recorded in line with [[HYPERLINK_RTT_RULES]].\n\n## Use case\n\nSee [[HYPERLINK_A005]].\n\n## Related endpoints\n\nSee [[HYPERLINK_A005]].\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ------------------------------------- |\n| Unbooked `ReferralRequest` | `ubrn`=`000000070000`, `version`=`5` |\n| `ReferralRequest` booked to directly-bookable service | `ubrn`=`000000070001`, `version`=`5` |\n| `ReferralRequest` booked to indirectly-bookable service | `ubrn`=`000000070002`, `version`=`5` |\n| `ReferralRequest` deferred to service provider for booking | `ubrn`=`000000070003`, `version`=`5` |\n| `ReferralRequest` that was converted from an Advice and Guidance Request | `ubrn`=`000000070004`, `version`=`5` |\n| `ReferralRequest` with related `ReferralRequest` | `ubrn`=`000000070005`, `version`=`5` |\n| `ReferralRequest` with additional requirements listed | `ubrn`=`000000070011`, `version`=`5` |\n| `ReferralRequest` with attachments unavailable to download | `ubrn`=`000000070012`, `version`=`5` | \n", - "summary": "Retrieve referral request (versioned) (A005, FHIR STU3)", - "operationId": "a005-retrieve-referral-request-versioned", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "name": "version", - "in": "path", - "description": "The version of the resource to be retrieved. It must be the latest version of the resource otherwise\n`HISTORY_NOT_SUPPORTED` error will be returned (HTTP 404 Not Found).\n", - "required": true, - "schema": { - "type": "string", - "example": "5" - } - }, - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "unbooked": { - "summary": "Unbooked `ReferralRequest`", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/Unbooked.json" - } - }, - "booked-dbs": { - "summary": "`ReferralRequest` booked to directly-bookable service", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/BookedDBS.json" - } - }, - "booked-ibs": { - "summary": "`ReferralRequest` booked to indirectly-bookable service", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/BookedIBS.json" - } - }, - "deferred-to-provider": { - "summary": "`ReferralRequest` deferred to service provider for booking", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/DeferredToProvider.json" - } - }, - "converted-from-advice-and-guidance": { - "summary": "`ReferralRequest` that was converted from an Advice and Guidance Request", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/ConvertedFromAdviceAndGuidance.json" - } - }, - "with-related-referral": { - "summary": "`ReferralRequest` with related ReferralRequest", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/WithRelatedReferral.json" - } - }, - "with-additional-requirements": { - "summary": "`ReferralRequest` with additional requirements", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/WithAdditionalRequirements.json" - } - }, - "with-unavailable-attachments": { - "summary": "Unbooked `ReferralRequest` with attachments unavailable for download", - "value": { - "$ref": "../../../examples/retrieveReferralRequest/responses/WithUnavailableAttachments.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found - Resource not found for ID provided or Resource version does not match version requested." - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/Binary/{attachmentLogicalID}": { - "get": { - "deprecated": true, - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n **This endpoint has now been deprecated please use [[HYPERLINK_A042]] instead.**\n\nUse this endpoint to retrieve a file that is attached to a referral or advice request.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n\n## Pre-requisites\n### Authentication\n#### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application.\n\n#### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user or application and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n### Attachment availability\nIn order to use this endpoint, the attachment to be retrieved must be available for download. Attachments are only made available once an uploaded file has been validated and successfully scanned for malware. A request to retrieve an attachment that is not available for download will result in a 422 error being returned. See the Response section for further information.\n\nThe availability status of an attachment can be retrieved via any endpoint that provides details of an attachment in the success response. Details of the availability statuses that may be returned via these endpoints can be found in the specification for [[HYPERLINK_A005]].\n\nPrior to retrieving an attachment, you will need to have retrieved the referral or advice request the attachment is associated with (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example). Referrals and advice requests include resolvable URLs to the files currently attached to them, which can be used with this endpoint to retrieve the attachments themselves.\n\n### Maximum file size\n\n The [[HYPERLINK_A006]] endpoint allows you to retrieve attachments up to a maximum file size of 5MB (5242880 bytes). Attempting to retrieve a file over this limit will lead to a 422 error being returned. See the Response section for further information. Due to this, prior to calling this endpoint, the size of the attachment being retrieved should first be validated so that this error can be avoided.\n\nFiles that are larger than 5MB can be downloaded via the [[HYPERLINK_A042]] endpoint or the e-RS web-based professional application.\n\n## Important notes\n\nA referral pathway in e-RS can be made up of more than one UBRN. \nFor example, a referral is booked and seen in a general knee clinical assessment service (UBRN #1), \nand the service decides to onward refer to a more specialist knee miniscus service (UBRN #2). \nThis would result in two UBRNs for the referral pathway in this example (but there could be more related UBRNs if onward referred multiple times).\n\nAs such, it is important that all clinical information is obtained from across all the related UBRNs referenced in [[HYPERLINK_A005]]. \nYou can do this using the following endpoints:\n\n - [[HYPERLINK_A007]]\n - [[HYPERLINK_A006]]\n\nNote: It is possible that the initial UBRN may be the only one in the referral pathway to have clinical information and/or attachments associated.\n\nThe [[HYPERLINK_A006]] endpoint allows you to retrieve attachments up to a maximum file size of 5MB (5242880 bytes), subject to the attachment being available for download. Attempts to retrieve an attachment that is not available, or exceeds the maximum file size, will lead to a 422 error being returned. See the Response section for further information.\n\n## Use case\n\nAs an authenticated user\n\nI need to retrieve a clinical attachment associated with a referral\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\n\nYou can retrieve a clinical information summary for a referral using [[HYPERLINK_A007]].\n\n## Sandbox test scenarios\n\nThe sandbox for this endpoint is a simple implementation that only supports success cases.\n\nA successful response will always be returned, provided the Binary ID is in a valid format. The Availability Status of a file is not considered in the sandbox and a file will always be available for retrieval.\n\nSuccessful responses will always return the same example PDF file.\n", - "summary": "Retrieve attachment (A006, FHIR STU3) [deprecated]", - "operationId": "a006-retrieve-attachment", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "path", - "name": "attachmentLogicalID", - "description": "Reference to attachment as provided in the output from [[HYPERLINK_A005]]\n", - "required": true, - "schema": { - "type": "string" - }, - "examples": { - "uuid-format": { - "value": "c5d2d200-7613-4a69-9c5f-1bb68e04b8d8", - "summary": "ID of an attachment utilising UUID ID format." - }, - "legacy-format": { - "value": "att-70000-70001", - "summary": "ID of an attachment utilising the legacy ID format." - } - } - } - ], - "responses": { - "200": { - "description": "Response contains the binary stream of the file attachment requested.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Disposition": { - "description": "The description of the type of content provided.\n", - "required": true, - "schema": { - "type": "string", - "example": "attachment; filename=\"000000070000_Appointment_Confirmation_Summary_20210603121353.pdf\"" - } - }, - "Content-Length": { - "description": "The length of the response.\n", - "required": true, - "schema": { - "type": "string", - "example": "3111" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "text/plain", - "text/html", - "application/pdf", - "text/xml", - "text/rtf", - "audio/basic", - "audio/mpeg", - "image/png", - "image/gif", - "image/jpeg", - "image/tiff", - "video/mpeg", - "application/msword", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - "application/dicom" - ], - "example": "text/plain" - } - } - }, - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "binary" - }, - "example": "This is some example text." - }, - "text/html": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/xml": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/rtf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/basic": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/gif": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/tiff": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "video/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/msword": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/dicom": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| FILE_SIZE_ERROR | The file requested is larger than 5MB (5242880 bytes) so cannot be retrieved via this endpoint. Files larger than 5MB can be downloaded via the [[HYPERLINK_A042]] endpoint or the e-RS web-based professional application. |\n| PENDING | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |\n| THREATS_FOUND | The file has been quarantined after detecting a threat and cannot be retrieved. Contact the organisation that uploaded the file to resolve the issue and get the information you need. Details of who uploaded the file can be retrieved via any endpoint that provides details of an attachment in the success response (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example) |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved. Contact the organisation that uploaded the file to resolve the issue and get the information you need. Details of who uploaded a file can be retrieved via any endpoint that provides details of an attachment in the success response (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example)
Validation can fail because the:\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/R4/Binary/{id}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve a file that is attached to a referral or advice request.\n\nReferral information can also include:\n - Structured clinical information added by an integrated primary care system\n - Service provider activity\n - Advice and guidance conversation\n\nThis additional clinical information must be retrieved via [[HYPERLINK_A007]]\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted, unattended access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user or application and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n### Attachment availability\nTo use this endpoint, the attachment must be available for download. Attachments are only available after successful validation and malware scans. A request to retrieve an attachment that is not available for download will result in a 400 error. See the Response HTTP 400 section for further information.\n\nThe availability status of an attachment can be retrieved via any endpoint that provides details of an attachment in the success response. Details of the availability statuses that may be returned via these endpoints can be found in the specification for [[HYPERLINK_A005]].\n\nPrior to retrieving an attachment, you will need to have retrieved the referral or advice request the attachment is associated with (via the [[HYPERLINK_A005]] or [[HYPERLINK_A024]] endpoints, for example). Referrals and advice requests include resolvable URLs to the files currently attached to them, which can be used with this endpoint to retrieve the attachments themselves.\n\n## Support for a temporary redirect\nThis endpoint makes use of a HTTP 307 temporary redirect. It redirects the caller to a temporary location from which the file contents can be downloaded directly.\n\nThe temporary location is only valid for a short period of time and should be used immediately. \n\nCallers of this endpoint must ensure they:\n - follow this redirect to retrieve the file\n - do not cache the temporary location\n - generate a new redirect each time the file is downloaded\n\nSee the Response HTTP 307 section for further information.\n\n## Important notes\nA referral pathway in e-RS can be made up of more than one UBRN. For example: a referral is booked and seen in a general knee clinical assessment service (UBRN #1), and the service decides to onward refer to a more specialist knee meniscus service (UBRN #2). This would result in two UBRNs for the referral pathway. There may be additional related UBRNs if there are multiple onward referrals.\n\nAs such, it is important that all clinical information is obtained from across all the related UBRNs referenced in [[HYPERLINK_A005]]. You can do this using the following endpoints:\n - [[HYPERLINK_A006]]\n - [[HYPERLINK_A007]]\n\nNote: It is possible that the initial UBRN may be the only one in the referral pathway to have clinical information and/or attachments associated.\n\n## Use case \nAs an authenticated user\n\nI need to retrieve a clinical attachment associated with a referral or advice request\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\n - [[HYPERLINK_A005]] to retrieve details of a referral. This includes references to clinical attachments, related referrals and other important data.\n - [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request. This endpoint provides important contextual information about the advice and guidance request (e.g. the service/specialty to which advice has been requested, etc).\n - [[HYPERLINK_A025]] to retrieve the advice and guidance conversation between the referring organisation and service providing organisation.\n - [[HYPERLINK_A007]] to generate a PDF file that summarises clinical information for a referral.\n\n## Sandbox test scenarios\nThe sandbox for this endpoint is a simple implementation that only supports success cases.\n\nInline with the behaviour described in \"Support for a temporary redirect\", the sandbox will return a HTTP 307 temporary redirect. For simplicity, the temporary location will be static and never expire, unlike the live environment.\n\nA successful response will always be returned, provided the Binary ID is in a valid format. The Availability Status of a file is not considered in the sandbox and a file will always be available for retrieval.\n\nSuccessful responses will always return the same example PDF file.\n", - "summary": "Retrieve attachment (A042, FHIR R4)", - "operationId": "a042-retrieve-attachment", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "path", - "name": "id", - "description": "The identifier for the binary.\n", - "required": true, - "schema": { - "type": "string" - }, - "examples": { - "uuid-format": { - "value": "c5d2d200-7613-4a69-9c5f-1bb68e04b8d8", - "summary": "A binary ID utilising the UUID ID format." - }, - "legacy-format": { - "value": "att-70000-70001", - "summary": "A binary ID utilising the legacy ID format." - } - } - } - ], - "responses": { - "307": { - "description": "Response redirects the user agent to a location (via the Location header) in the object store from which the attachment can be downloaded from.", - "headers": { - "x-correlation-id": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "x-request-id": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Location": { - "description": "The attachment location in the object store.", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - } - } - }, - "400": { - "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| REC_BAD_REQUEST | invalid | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The request could not be processed due to an error. This could be due to either an error with the request or the state of the resource requested. See the diagnostics field for further information. |\n", - "headers": { - "x-correlation-id": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "x-request-id": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "invalid", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_BAD_REQUEST" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "ACCESS_DENIED" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_RELATIONSHIP | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The caller has no legitimate relationship with the resource. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_FORBIDDEN" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-found", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_FOUND" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "429": { - "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "throttled", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "TOO_MANY_REQUESTS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "500": { - "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_SERVER_ERROR" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_UNAVAILABLE" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.generateCRI": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to generate a PDF file that summarises clinical information for a referral.\n\nThis does not include files attached to a referral or advice request. These must be retrieved via [[HYPERLINK_A042]]\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\n## Important note\nA referral pathway in e-RS can be made up of more than one UBRN. For example, a referral is booked and seen in a general knee clinical assessment service (UBRN #1), \nand the service decides to onward refer to a more specialist knee miniscus service (UBRN #2). This would result in two UBRNs for the referral pathway \nin this example (but there could be more related UBRNs if onward referred multiple times).\n\nAs such, it is important that all clinical information is obtained from across all the related UBRNs referenced in [[HYPERLINK_A005]]. \nYou can do this using the following endpoints:\n - [[HYPERLINK_A007]]\n - [[HYPERLINK_A006]]\n\nNote: It is possible that the initial UBRN may be the only one in the referral pathway to have clinical information and/or attachments associated.\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve a clinical information summary (in PDF format) associated with the referral\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\nYou can retrieve clinical attachments that are associated with a referral using [[HYPERLINK_A006]].\n", - "summary": "Retrieve clinical information (A007, FHIR STU3)", - "operationId": "a007-retrieve-clinical-information", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - } - ], - "responses": { - "200": { - "description": "Response contains the binary stream of the clinical information summary (PDF).", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Disposition": { - "description": "The description of the type of content provided.\n", - "required": true, - "schema": { - "type": "string", - "example": "attachment; filename=\"000000070000_Appointment_Confirmation_Summary_20210603121353.pdf\"" - } - }, - "Content-Length": { - "description": "The length of the response.\n", - "required": true, - "schema": { - "type": "string", - "example": "3111" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/pdf" - ], - "example": "application/pdf" - } - } - }, - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/HealthcareService/$ers.searchHealthcareServicesForPatient": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to find services that meet the referral needs of a patient.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a `patient`, for example via [[HYPERLINK_PDS]].\n\n## Use case\nAs an authenticated user\n\nI need to find services I can refer the patient to\n\nSo that I can offer the patient appropriate services that meet their referral needs\n\n## Important Notes\nIf using this endpoint for modifying an existing Referral (such as via the [[HYPERLINK_A031]] endpoint for example), you will need to provide the Commissioning Rule Organisation parameter. This ensures that the services returned in the response are valid for use with the Referral. You can obtain the 'Commissioning Rule Organisation' from [[HYPERLINK_A005]].\n\n## Related endpoints\nOnce you have identified appropriate services for the patient you can create a referral by choosing a shortlist of bookable and/or triage services using [[HYPERLINK_A011]]. You may then subsequently be able to use [[HYPERLINK_A016]] to book an appointment to a directly bookable service if an appointment slot is available, defer the booking responsibility to a directly bookable service if no appointment slot is available, or refer a patient into a triage service.\n", - "summary": "Patient service search (A010, FHIR STU3)", - "operationId": "a010-patient-service-search", - "tags": [ - "Refer patient", - "Request advice" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-PatientServiceSearch-Parameters", - "description": "The parameters used in patient services search", - "type": "object", - "required": [ - "meta", - "resourceType", - "parameter" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-PatientServiceSearch-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-PatientServiceSearch-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `RequestType` | `1..1` | |\n| `SortBy` | `1..1` | |\n| `Patient` | `1..1` | |\n| `SearchCriteria` | `1..1` | |\n| `ReferringClinician` | `0..1` | |\n| `CommissioningRuleOrganisation` | `0..1` | Required if searching for services for an existing Referral. This field should be provided using the returned Commissioning Rule Organisation already included on the Referral to ensure the services returned are valid. Note this field is not supported when searching with the `ADVICE_AND_GUIDANCE_REQUEST` request type. |\n", - "items": { - "anyOf": [ - { - "title": "RequestType", - "description": "The type of request in e-RS which this service search is aimed at creating or updating. \nThe options are appointment request (i.e. referral) or advice and guidance request. \nServices may support one or the other or both and will be filtered accordingly.\n", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "requestType" - ], - "example": "requestType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestType-1" - }, - "code": { - "type": "string", - "enum": [ - "APPOINTMENT_REQUEST", - "ADVICE_AND_GUIDANCE_REQUEST" - ], - "example": "APPOINTMENT_REQUEST" - } - } - } - } - }, - { - "title": "SortBy", - "description": "The service search returns the top results according to the sorting requested. \nTherefore, the sorting requested affects the selection of services that are included in the response.\n", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "sortBy" - ], - "example": "sortBy" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-SortBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-SortBy-1" - }, - "code": { - "type": "string", - "enum": [ - "DISTANCE", - "IWT" - ], - "example": "IWT" - }, - "display": { - "type": "string", - "example": "Indicative Appointment Wait Time" - } - } - } - } - }, - { - "title": "Patient", - "description": "Parameter to supply a patient", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - { - "title": "ReferringClinician", - "description": "Parameter to supply a referring clinician", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "referringClinician" - ], - "example": "referringClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "CommissioningRuleOrganisation", - "description": "Parameter to supply a commissioning rule organisation", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningRuleOrganisation" - ], - "example": "commissioningRuleOrganisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "SearchCriteria", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "searchCriteria" - ], - "example": "searchCriteria" - }, - "resource": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "rc-minimal": { - "summary": "Referring Clinician minimal search", - "value": { - "$ref": "../../examples/patientServiceSearch/requests/RcMinimal.json" - } - }, - "rc-search-by-clinical-term": { - "summary": "Referring Clinician search by clinical term", - "value": { - "$ref": "../../examples/patientServiceSearch/requests/RcSearchByClinicalTerm.json" - } - }, - "rc-search-by-named-clinician": { - "summary": "Referring Clinician search by named clinician", - "value": { - "$ref": "../../examples/patientServiceSearch/requests/RcSearchByNamedClinician.json" - } - }, - "rc-search-for-advice-service": { - "summary": "Referring Clinician search for services supporting Advice Requests", - "value": { - "$ref": "../../examples/patientServiceSearch/requests/RcSearchForAdviceService.json" - } - }, - "rca-with-iwt": { - "summary": "Referring Clinician Admin search", - "value": { - "$ref": "../../examples/patientServiceSearch/requests/RcaWithIWT.json" - } - }, - "rc-search-with-commissoning-rule-organisation": { - "summary": "Referring Clinician search with commissioning rule organisation", - "value": { - "$ref": "../../examples/patientServiceSearch/requests/RcSearchWithCommissioningRuleOrganisation.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "The response body contains the list of services (if any) that match the search criteria provided", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-FetchServices-List", - "description": "Service search response", - "type": "object", - "required": [ - "meta", - "resourceType", - "status", - "mode", - "entry" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchServices-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchServices-List-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "emptyReason": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/list-empty-reason" - ], - "example": "http://hl7.org/fhir/ValueSet/list-empty-reason" - }, - "code": { - "type": "string", - "enum": [ - "nilknown", - "notasked", - "withheld", - "unavailable", - "notstarted", - "closed" - ], - "example": "nilknown" - }, - "display": { - "type": "string", - "example": "no results" - } - } - } - } - } - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item", - "extension" - ], - "properties": { - "extension": { - "title": "Extension to supply search specific details for a service", - "type": "array", - "items": { - "title": "Extension-eRS-ServiceSearch-ListItem", - "type": "object", - "required": [ - "extension", - "url" - ], - "properties": { - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `DisplayProminently` | `1..1` | |\n| `Distance` | `0..1` | |\n| `IndicativeAppointmentWaitTime` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "DisplayProminently", - "description": "Extension to supply display prominently indicator", - "type": "object", - "required": [ - "url", - "valueBoolean" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "displayProminently" - ], - "example": "displayProminently" - }, - "valueBoolean": { - "type": "boolean", - "example": false - } - } - }, - { - "title": "Distance", - "description": "Extension to supply distance value", - "type": "object", - "required": [ - "url", - "valueUnsignedInt" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "distance" - ], - "example": "distance" - }, - "valueUnsignedInt": { - "type": "integer", - "format": "int32", - "example": 10 - } - } - }, - { - "title": "IndicativeAppointmentWaitTime", - "description": "Extension to supply indicative wait time, only one extension with url value 'indicativeAppointmentWaitTime' will be returned at once", - "type": "object", - "required": [ - "url", - "valueUnsignedInt" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTime" - ], - "example": "indicativeAppointmentWaitTime" - }, - "valueUnsignedInt": { - "type": "integer", - "format": "int32", - "example": 7 - } - } - }, - { - "title": "IndicativeAppointmentWaitTime", - "description": "Extension to supply indicative wait time, only one extension with url value 'indicativeAppointmentWaitTime' will be returned at once", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTime" - ], - "example": "indicativeAppointmentWaitTime" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-IWT-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-IWT-1" - }, - "code": { - "type": "string", - "enum": [ - "LIMITED_AVAILABILITY", - "NOT_APPLICABLE" - ], - "example": "LIMITED_AVAILABILITY" - } - } - } - } - } - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - }, - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSearch-ListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSearch-ListItem-1" - } - } - } - }, - "item": { - "type": "object", - "required": [ - "extension", - "identifier" - ], - "properties": { - "extension": { - "type": "array", - "items": { - "title": "Extension-eRS-ServiceSummaryView", - "description": "Extension to supply service summary view", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSummaryView-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ServiceSummaryView-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| -------------------------------- | ----------- | ------------------------------------------ |\n| `SupportedAppointmentType` | `0..1` | |\n| `ServiceName` | `1..1` | |\n| `SupportedRequestFlowType` | `1..2` | |\n| `IndicativeTreatmentWaitTime` | `0..1` | |\n| `BookableType` | `1..1` | |\n| `Location` | `1..1` | |\n| `ReferrerAlert` | `0..1` | |\n| `Exclusions` | `0..1` | |\n| `SuggestedInvestigations` | `0..1` | |\n| `ConditionsTreated` | `0..1` | |\n| `GenderTreated` | `1..1` | Sex treated. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `AdditionalRequirementSupported` | `0..3` | |\n| `ReferralLetterRequired` | `1..1` | |\n| `Specialty` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "SupportedAppointmentType", - "description": "Supported appointment type", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "supportedAppointmentType" - ], - "example": "supportedAppointmentType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AppointmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "DAY_CASE", - "FIRST_OUTPATIENT", - "ASSESSMENT_SERVICE", - "GPSI", - "AHP_CLINIC", - "DIAGNOSTIC", - "NURSE_CLINIC", - "OPHTHALMOLOGIST", - "TELEPHONE_ASSESSMENT" - ], - "example": "DIAGNOSTIC" - } - } - } - } - } - } - } - }, - { - "title": "ServiceName", - "description": "Name of the service.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "serviceName" - ], - "example": "serviceName" - }, - "valueString": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - }, - { - "title": "SupportedRequestFlowType", - "description": "Services can support one or two Request Flow Types, but not Triage Request and Appointment Request simultaneously.", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "supportedRequestFlowType" - ], - "example": "supportedRequestFlowType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestFlowType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestFlowType-1" - }, - "code": { - "type": "string", - "enum": [ - "APPOINTMENT_REQUEST", - "TRIAGE_REQUEST", - "ADVICE_AND_GUIDANCE_REQUEST" - ], - "example": "APPOINTMENT_REQUEST" - } - } - } - } - } - } - } - }, - { - "title": "IndicativeTreatmentWaitTime", - "description": "Statistical indication of how long Patients have waited before receiving treatment.", - "type": "object", - "required": [ - "url", - "valueUnsignedInt" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "indicativeTreatmentWaitTime" - ], - "example": "indicativeTreatmentWaitTime" - }, - "valueUnsignedInt": { - "type": "integer", - "format": "int32", - "example": 15 - } - } - }, - { - "title": "IndicativeTreatmentWaitTime", - "description": "Statistical indication of how long Patients have waited before receiving treatment.", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "indicativeTreatmentWaitTime" - ], - "example": "indicativeTreatmentWaitTime" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CapacityAlert-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CapacityAlert-1" - }, - "code": { - "type": "string", - "enum": [ - "LOW" - ], - "example": "LOW" - } - } - } - } - } - } - } - }, - { - "title": "BookableType", - "description": "Whether the service is Directly or Indirectly Bookable", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "bookableType" - ], - "example": "bookableType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookableType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BookableType-1" - }, - "code": { - "type": "string", - "enum": [ - "DIRECTLY_BOOKABLE", - "INDIRECTLY_BOOKABLE", - "UNSPECIFIED" - ], - "example": "DIRECTLY_BOOKABLE" - } - } - } - } - } - } - } - }, - { - "title": "LinkToNHSWebsite", - "description": "Link to NHS website providing information about the Service such as contact details, map, department, facilities and reviews.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "linkToNHSWebsite" - ], - "example": "linkToNHSWebsite" - }, - "valueString": { - "type": "string", - "example": "https://www.nhs.uk/service-search/other-services/chooseandbook?serviceId=11002" - } - } - }, - { - "title": "Location", - "description": "Service location", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "location" - ], - "example": "location" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier", - "display" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - }, - "display": { - "type": "string", - "example": "Cicero-Clinic" - } - } - } - } - }, - { - "title": "ReferrerAlert", - "description": "Referrer Alert", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrerAlert" - ], - "example": "referrerAlert" - }, - "valueString": { - "type": "string", - "example": "Surgery and post op follow up will be done at Harrogate District Hospital" - } - } - }, - { - "title": "Exclusions", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "exclusions" - ], - "example": "Service Users under the age of 18" - }, - "valueString": { - "type": "string", - "example": "Exclusions" - } - } - }, - { - "title": "SuggestedInvestigations", - "description": "Suggested investigations", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "suggestedInvestigations" - ], - "example": "suggestedInvestigations" - }, - "valueString": { - "type": "string", - "example": "Relevant Xray" - } - } - }, - { - "title": "ConditionsTreated", - "description": "Conditions treated", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "conditionsTreated" - ], - "example": "conditionsTreated" - }, - "valueString": { - "type": "string", - "example": "Hip pain" - } - } - }, - { - "title": "AgeTreated", - "description": "Age range treated", - "type": "object", - "required": [ - "url", - "valueRange" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "ageTreated" - ], - "example": "ageTreated" - }, - "valueRange": { - "type": "object", - "required": [ - "low", - "high" - ], - "properties": { - "low": { - "type": "object", - "required": [ - "value", - "unit" - ], - "properties": { - "value": { - "type": "integer", - "example": 18 - }, - "unit": { - "type": "string", - "enum": [ - "YEARS", - "MONTHS" - ], - "example": "YEARS" - } - } - }, - "high": { - "type": "object", - "required": [ - "value", - "unit" - ], - "properties": { - "value": { - "type": "integer", - "example": 100 - }, - "unit": { - "type": "string", - "enum": [ - "YEARS", - "MONTHS" - ], - "example": "YEARS" - } - } - } - } - } - } - }, - { - "title": "GenderTreated", - "description": "Sex treated", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "genderTreated" - ], - "example": "genderTreated" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GenderTreated-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GenderTreated-1" - }, - "code": { - "type": "string", - "enum": [ - "MALE", - "FEMALE", - "MALE_AND_FEMALE" - ], - "example": "MALE_AND_FEMALE" - } - } - } - } - } - } - } - }, - { - "title": "AdditionalRequirementSupported", - "description": "Additional support services provided by the Organisation where the Service is located at", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "additionalRequirementSupported" - ], - "example": "additionalRequirementSupported" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "TRANSPORT", - "INTERPRETER", - "ADVOCACY" - ], - "example": "ADVOCACY" - } - } - } - } - } - } - } - }, - { - "title": "ReferralLetterRequired", - "description": "Indicates whether the Service requires a referral letter before they consider a referral to be valid", - "type": "object", - "required": [ - "url", - "valueBoolean" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralLetterRequired" - ], - "example": "referralLetterRequired" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "Specialty", - "description": "The specialty supported by the Service", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - } - ] - } - } - } - } - }, - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - }, - "examples": { - "fetch-service-list-single-service": { - "summary": "With single service", - "value": { - "$ref": "../../../examples/patientServiceSearch/responses/FetchServiceListWithSingleService.json" - } - }, - "fetch-service-list-multiple-services": { - "summary": "With multiple services", - "value": { - "$ref": "../../../examples/patientServiceSearch/responses/FetchServiceListWithMultipleServices.json" - } - }, - "fetch-service-list-multiple-request-types": { - "summary": "With multiple supported request flow types", - "value": { - "$ref": "../../../examples/patientServiceSearch/responses/TriageAndAppointmentRequestType.json" - } - }, - "fetch-service-list-with-indicative-appointment-wait-time": { - "summary": "With indicative appointment wait time", - "value": { - "$ref": "../../../examples/patientServiceSearch/responses/WithIndicativeAppointmentWaitTime.json" - } - }, - "fetch-service-list-empty": { - "summary": "Empty result list", - "value": { - "$ref": "../../../examples/patientServiceSearch/responses/EmptyResponse.json" - } - }, - "fetch-advice-services": { - "summary": "With advice service", - "value": { - "$ref": "../../../examples/patientServiceSearch/responses/AdviceServiceSearch.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/$ers.createReferral": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to create a referral by choosing a shortlist of bookable services and/or triage services.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Important notes when creating a referral\nThe maximum amount of services allowed on a given shortlist is 20.\n\nThe act of shortlisting alone will not result in a referral being sent/booked to any of the shortlisted services (even if only one service is shortlisted).\nA shortlist of a single triage service should be avoided as this relies on the patient to progress the referral, potentially leading to a delay to care. Especially if the referral priority is 2WW or Urgent.\n\nUse [[HYPERLINK_A016]] if there is a need to support the sending/booking of the referral into a shortlisted service.\n\n## Important notes when sending an e-Referral Pathway Start Date\nThe e-Referral Pathway Start Date is a derived value of when the Referral To Treatment (RTT) clock starts. Find out how e-RS derives the pathway start date [[HYPERLINK_PATHWAY_START]].\n\nYou can supply an optional, alternate pathway start date when creating a referral.\n\nThis may be because steps, such as reviews, take place early in your business process. Which means the clock started earlier than when the e-RS referral is created. \nProviding an alternate pathway start date ensures the correct date is recorded and used in other systems.\n\nWhen provided, the pathway start date must be:\n - in the past\n - no longer than 365 days ago\n - calculated in line with [[HYPERLINK_RTT_RULES]]\n\nThis also overrides any e-RS derived date.\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a `patient`, for example via [[HYPERLINK_PDS]].\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Use case\nAs an authenticated user\n\nI need to create a shortlist of bookable services and/or triage services\n\nSo I can initiate my patients referral pathway, allowing the patient to book into one of the shortlisted services.\n\n## Related endpoints\n\nTo allow the patient to progress their referral in their own time, you can generate a letter for the patient by \nusing [[HYPERLINK_A019]]. The letter summarises the current state of the referral and any steps the \npatient may need to follow (e.g. appointment booking instructions).\n\nYou can book an appointment for the patient into a shortlisted directly bookable service using [[HYPERLINK_A015]] and [[HYPERLINK_A016]].\n\nYou can send the referral into a shortlisted triage service using [[HYPERLINK_A016]]. \n\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\nYou can generate a letter for the patient, which summarises the current state of their referral and any steps the patient may need to follow, by using [[HYPERLINK_A019]].\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Create referral (A011, FHIR STU3)", - "operationId": "a011-create-referral", - "tags": [ - "Refer patient" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CreateReferral-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferral-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferral-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `ReferringClinician` | `0..1` | |\n| `Shortlist` | `1..1` | |\n| `IntentionToAddReferralLetter` | `1..1` | | \n| `FirstReminderLetterFollowUpDays` | `1..1` | | \n| `EReferralPathwayStart` | `0..1` | | \n", - "items": { - "anyOf": [ - { - "title": "Patient", - "description": "Parameter to supply a patient", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - { - "title": "ReferringClinician", - "description": "Parameter to supply a referring clinician", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "referringClinician" - ], - "example": "referringClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "Shortlist", - "description": "Parameter to supply a shortlist", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "shortlist" - ], - "example": "shortlist" - }, - "resource": { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - } - } - }, - { - "title": "IntentionToAddReferralLetter", - "description": "Parameter to supply the intention to add referral letter flag", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "intentionToAddReferralLetter" - ], - "example": "intentionToAddReferralLetter" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - }, - "code": { - "type": "string", - "enum": [ - "NEED_TO_ADD_LATER", - "NOT_INTENDING_TO_ADD" - ], - "example": "NEED_TO_ADD_LATER" - } - } - } - } - }, - { - "title": "FirstReminderLetterFollowUpDays", - "description": "Parameter to supply the first reminder follow up days", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "firstReminderLetterFollowUpDays" - ], - "example": "firstReminderLetterFollowUpDays" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 0 - } - } - }, - { - "title": "EReferralPathwayStart", - "description": "Parameter to supply the pathway start date", - "type": "object", - "required": [ - "name", - "valueInstant" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "eReferralPathwayStart" - ], - "example": "eReferralPathwayStart" - }, - "valueInstant": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - } - } - }, - "examples": { - "rc-minimum-request-body": { - "summary": "Referring Clinician - minimum request body", - "value": { - "$ref": "../../examples/createReferral/requests/MinimalRequest.json" - } - }, - "rc-request-body-multi-service-shortlist": { - "summary": "Referring Clinician - request body using multi-service shortlist", - "value": { - "$ref": "../../examples/createReferral/requests/RequestTwentyServices.json" - } - }, - "rc-request-body-mixed-shortlist": { - "summary": "Referring Clinician - request body using mixed service shortlist", - "value": { - "$ref": "../../examples/createReferral/requests/RequestMixedShortlist.json" - } - }, - "create-referral-parameters-twenty-services": { - "summary": "Referring Clinician Admin - minimum request body", - "value": { - "$ref": "../../examples/createReferral/requests/MinimalRequestWithReferringClinician.json" - } - } - } - } - } - }, - "responses": { - "201": { - "description": "A referral created within e-RS.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "referral-request-single-service": { - "summary": "Example with single service", - "value": { - "$ref": "../../../examples/createReferral/responses/ReferralRequest.json" - } - }, - "referral-request-twenty-services": { - "summary": "Example with twenty services", - "value": { - "$ref": "../../../examples/createReferral/responses/ReferralRequestTwentyServices.json" - } - }, - "referral-request-mixed-shortlist": { - "summary": "Example with a shortlist containing bookable and triage services", - "value": { - "$ref": "../../../examples/createReferral/responses/ReferralRequestMixedShortlist.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/$ers.createReferralAndSendForTriage": { - "post": { - "deprecated": true, - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n**This endpoint has now been deprecated please use [[HYPERLINK_A011]] instead.**\n\nUse this endpoint to refer the patient directly to a triage service.\n\nPlease note: this endpoint cannot be used to shortlist bookable services. In order to shortlist bookable services please use [[HYPERLINK_A011]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a `patient`, for example via [[HYPERLINK_PDS]].\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Use case\nAs an authenticated user\n\nI need to send the patient's referral to a triage service for assessment\n\nSo that I can put the patient on the appropriate clinical pathway for the chosen service provider.\n\n## Related endpoints\n\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\nYou can generate a letter for the patient by using [[HYPERLINK_A019]]. \nThe letter summarises the current state of the referral and any steps the patient may need to follow.\n\nYou can calculate the date when the patient will need to be contacted (by the triage service) using reference data from [[HYPERLINK_A004]].\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Create referral and send for triage (A021, FHIR STU3) [deprecated]", - "operationId": "a021-create-referral-request-and-send-for-triage", - "tags": [ - "Refer patient" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CreateReferralAndSendForTriage-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferralAndSendForTriage-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateReferralAndSendForTriage-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `ReferringClinician` | `0..1` | |\n| `Shortlist` | `1..1` | |\n| `IntentionToAddReferralLetter` | `1..1` | | \n| `FirstReminderLetterFollowUpDays` | `1..1` | | \n", - "items": { - "anyOf": [ - { - "title": "Patient", - "description": "Parameter to supply a patient", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - { - "title": "ReferringClinician", - "description": "Parameter to supply a referring clinician", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "referringClinician" - ], - "example": "referringClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "Shortlist", - "description": "Parameter to supply a shortlist. When sending for triage, \nthe shortlist must contain exactly one service, and this must support the 'triage request flow'.\n", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "shortlist" - ], - "example": "shortlist" - }, - "resource": { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - } - } - }, - { - "title": "IntentionToAddReferralLetter", - "description": "Parameter to supply the intention to add referral letter flag.\nWhen sending for triage, a referral letter is always required, therefore the only acceptable value is NEED_TO_ADD_LATER.\n", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "intentionToAddReferralLetter" - ], - "example": "intentionToAddReferralLetter" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - }, - "code": { - "type": "string", - "enum": [ - "NEED_TO_ADD_LATER" - ], - "example": "NEED_TO_ADD_LATER" - } - } - } - } - }, - { - "title": "FirstReminderLetterFollowUpDays", - "description": "Parameter to supply the first reminder follow up days. When sending for triage, \nthe only acceptable value is 0, which means no follow up letter will be sent, \nas the patient does not need to book an appointment.\n", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "firstReminderLetterFollowUpDays" - ], - "example": "firstReminderLetterFollowUpDays" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 0 - } - } - } - ] - } - } - } - }, - "examples": { - "parameters": { - "summary": "Referring Clinician creates referral to a Triage service", - "value": { - "$ref": "../../examples/createReferralAndSendForTriage/requests/Parameters.json" - } - }, - "parameters-with-named-clinician": { - "summary": "Referring Clinician Admin minimum call", - "value": { - "$ref": "../../examples/createReferralAndSendForTriage/requests/ParametersWithNamedClinician.json" - } - } - } - } - } - }, - "responses": { - "201": { - "description": "A referral created within e-RS.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "referral-request-with-appointment": { - "summary": "Basic example", - "value": { - "$ref": "../../../examples/createReferralAndSendForTriage/responses/ReferralRequest.json" - } - }, - "referral-request-with-named-clinician": { - "summary": "Example with named clinician in search criteria", - "value": { - "$ref": "../../../examples/createReferralAndSendForTriage/responses/ReferralRequestWithNamedClinician.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/Slot": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve available appointment slots for a service.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a directly bookable `service` that is on the current referral shortlist. You can do this by using [[HYPERLINK_A005]].\n\n## Use case\n\nAs an authenticated user\n\nI need to retrieve a list of available appointment slots for a service\n\nSo that I can offer them to the patient for booking.\n\n## Important note\nYou need to provide the 'commissioning rule organisation' when calling [[HYPERLINK_A015]] to ensure only suitable slots are returned. You can obtain the 'commissioning rule organisation' from [[HYPERLINK_A005]].\n\nWhen slots are retrieved using this endpoint, they can include slots with or without a named clinician associated with them. Your integrated application must support both scenarios.\n\nSlots with a named clinician will have an additional \"actor\" which defines the SDS User ID of the clinician, this will be on the Schedule associated to the Slot.\n\n## Related endpoints\n\nYou can book an appointment to an available slot using [[HYPERLINK_A016]].\n\nYou can defer booking to a directly bookable service using [[HYPERLINK_A016]] but only in the following circumstances:\n - when the service has no available slots\n - when trying to book an appointment into a service, the slot advertised is no longer available\n - when trying to book an appointment into a service, no response is received within message timeout period (currently 2 minutes)\n\n## Known Issues\nThis endpoint is using the :Practitioner search parameter. The \"schedule.actor\" search parameter is incorrectly using the \":Practitioner\" modifier. As per the [FHIR standard](https://hl7.org/fhir/R4/) the \":identifier\" modifier should be used when searching to indicate that an Identifer is used rather than a literal, relative, internal or absolute reference. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request Query Parameters | Response |\n| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |\n| Minimum slot search | `schedule.actor:HealthcareService`=`12000`, `appointmentType`=`ROUTINE`, `_count`=`20`, `status`=`free`, `page`=`1` | Illustrates minimum usage/parameters with concise, minimal response. |\n| Empty slot search response | `schedule.actor:HealthcareService`=`10000`, `appointmentType`=`ROUTINE`, `_count`=`20`, `status`=`free`, `page`=`1` | Illustrates how a 'no slots' response appears. |\n| Multipage slot search (page 1) | `schedule.actor:HealthcareService`=`11000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`1` | Illustrates first page of multi-page response. |\n| Multipage slot search (page 2) | `schedule.actor:HealthcareService`=`11000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`2` | Illustrates second page of multi-page response. |\n| Multipage slot search (invalid page 5) | `schedule.actor:HealthcareService`=`11000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`5` | Illustrates error when page is outside of valid range. |\n| Multi schedule response | `schedule.actor:HealthcareService`=`13000`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`1` | Illustrates response when there is >1 Schedule: one Schedule is for slots with no associated clinician and the other does have an associated clinician. |\n| Slot clinician search | `schedule.actor:HealthcareService`=`14000`, `schedule.actor:Practitioner`=`921600556514`, `appointmentType`=`ROUTINE`, `_count`=`5`, `status`=`free`, `page`=`1` | Illustrates search for clinician-specific slots |\n", - "summary": "Retrieve appointment slots (A015, FHIR STU3)", - "operationId": "a015-retrieve-appointment-slots", - "tags": [ - "Arrange appointment" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Comm-Rule-Org", - "description": "To retrieve accurate slot information for a specific ReferralRequest the code from the ReferralRequest's 'Extension-eRS-Commissioning-Rule-Org-1' field should be passed to the slot search in this field otherwise slots which are, in fact, unbookable for that ReferralRequest may be returned\n", - "required": true, - "schema": { - "type": "string", - "example": "R68" - } - }, - { - "in": "query", - "name": "schedule.actor:HealthcareService", - "description": "A single service ID is required to indicate the service for which appointment slots are required.\n", - "required": true, - "schema": { - "type": "string", - "example": "11000" - } - }, - { - "in": "query", - "name": "appointmentType", - "description": "The priority of the appointment slots.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "ROUTINE" - } - }, - { - "in": "query", - "name": "status", - "description": "The status of the appointment slots required must be supplied. This must indicate that 'free' slots are required.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "free" - ], - "example": "free" - } - }, - { - "in": "query", - "name": "_count", - "description": "The pageSize is the maximum number of results (i.e. slots) that should be returned by this call. This value must be in the range of 1-100. 100 is the maximum slots available per API call.\n**Note:** Page contents cannot be guaranteed to be contiguous with no gaps or duplicates since the availability of slots may change between calls to the API.\n", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "format": "int32", - "example": 5 - } - }, - { - "in": "query", - "name": "page", - "description": "The number of the page required to be returned, starting at 1.\n", - "required": true, - "schema": { - "type": "integer", - "minimum": 1, - "format": "int32", - "example": 1 - } - }, - { - "in": "query", - "name": "schedule.actor:Practitioner", - "description": "Slots in e-RS may be allocated to a clinician and is set in the service provider's PAS. \nIf a named clinician is supplied (by the UUID), the appointment slots returned are constrained to slots for which this clinician is allocated to the appointment slot. \nThe clinician must be a named clinician for the selected service.\n", - "required": false, - "schema": { - "type": "string", - "example": "921600556514" - } - }, - { - "in": "query", - "name": "_include", - "description": "An optional URL parameter to cause service/clinician information to be returned ('_include=Slot:schedule') is recognised (i.e. causes no error and is understood by e-RS) but e-RS will return a Schedule for each Slot whether this parameter is present or not.\n", - "required": false, - "schema": { - "type": "string", - "example": "Slot:schedule" - } - } - ], - "responses": { - "200": { - "description": "The Response contains a FHIR 'Bundle' that, in turn, contains 'Slot' resources where each 'Slot' resource includes the 'Reference' to the slot and the slot's 'start' and 'end' times.\n\nThe Response Bundle also contains one or more 'Schedule' resources each of which is used to indicate which allocated clinician a Slot is associated with (if any). \nThe 'Schedule' also indicates the Service Id that will be the same Service for which the Slot search was performed.\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "Bundle resource containing appointment slots", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "type", - "total", - "link", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "08acc887-6a7b-4b38-8f50-022e41319efe" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated", - "profile" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" - ], - "example": "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Bundle" - ], - "example": "Bundle" - }, - "type": { - "type": "string", - "enum": [ - "searchset" - ], - "example": "searchset" - }, - "total": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 3 - }, - "link": { - "type": "array", - "minItems": 1, - "maxItems": 3, - "items": { - "type": "object", - "required": [ - "relation", - "url" - ], - "properties": { - "relation": { - "type": "string", - "enum": [ - "self", - "previous", - "next" - ], - "example": "self" - }, - "url": { - "type": "string", - "example": "_baseUrl_/STU3/Slot?schedule.actor%3AHealthcareService=11010&appointmentType=ROUTINE&_count=10&status=free&_include=Slot%3Aschedule&page=1" - } - } - } - }, - "entry": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Slot` | `1..*` | |\n| `Schedule` | `1..*` | |\n", - "items": { - "anyOf": [ - { - "title": "Slot", - "description": "Slot resource includes the 'Reference' to the slot and the slot's 'start' and 'end' times.\n", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/STU3/Slot/11000010" - }, - "resource": { - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "identifier", - "schedule", - "status", - "start", - "end" - ], - "properties": { - "id": { - "type": "string", - "example": "11000009" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Slot-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Slot" - ], - "example": "Slot" - }, - "identifier": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/alternative-slot" - ], - "example": "https://fhir.nhs.uk/Id/alternative-slot" - }, - "value": { - "type": "string", - "example": "USRN-11000009" - } - } - } - }, - "schedule": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Schedule/11000-921600556514" - } - } - }, - "status": { - "type": "string", - "enum": [ - "free" - ], - "example": "free" - }, - "start": { - "type": "string", - "format": "date-time", - "example": "2021-05-19T18:00:00.000Z" - }, - "end": { - "type": "string", - "format": "date-time", - "example": "2021-05-19T19:00:00.000Z" - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "match" - ], - "example": "match" - } - } - } - } - }, - { - "title": "Schedule", - "description": "Schedule resource is used to indicate which allocated clinician a Slot is associated with (if any). \nThe 'Schedule' also indicates the Service Id that will be the same Service for which the Slot search was performed\n", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/STU3/Schedule/11000-921600556514" - }, - "resource": { - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "identifier", - "actor" - ], - "properties": { - "id": { - "type": "string", - "example": "11000-921600556514" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Schedule-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Schedule-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Schedule" - ], - "example": "Schedule" - }, - "identifier": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ers-schedule" - ], - "example": "https://fhir.nhs.uk/Id/ers-schedule" - }, - "value": { - "type": "string", - "example": "11000-921600556514" - } - } - } - }, - "actor": { - "type": "array", - "minItems": 1, - "maxItems": 2, - "items": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "anyOf": [ - { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - ] - } - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "include" - ], - "example": "include" - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "minimum": { - "summary": "Minimum slot search", - "value": { - "$ref": "../../../examples/retrieveAppointmentSlots/responses/Minimum.json" - } - }, - "empty": { - "summary": "Empty slot search response", - "value": { - "$ref": "../../../examples/retrieveAppointmentSlots/responses/NoSlots.json" - } - }, - "page1of2": { - "summary": "Multipage slot search (page 1)", - "value": { - "$ref": "../../../examples/retrieveAppointmentSlots/responses/Page1PageSize5.json" - } - }, - "page2of2": { - "summary": "Multipage slot search (page 2)", - "value": { - "$ref": "../../../examples/retrieveAppointmentSlots/responses/Page2PageSize5.json" - } - }, - "multi-schedule": { - "summary": "Multi schedule response", - "value": { - "$ref": "../../../examples/retrieveAppointmentSlots/responses/Page1With2Schedules.json" - } - }, - "slot-clinician-search": { - "summary": "Slot clinician search", - "value": { - "$ref": "../../../examples/retrieveAppointmentSlots/responses/SlotClinicianSearch.json" - } - } - } - } - } - }, - "400": { - "description": "Where status code 400 (Bad Request) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| MISSING_PARAMETER | Indicates missing mandatory FHIR search parameter. |\n| MISSING_HEADER | Indicates missing mandatory HTTP header. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| SERVICE_UNAVAILABLE | Indicates that a service is no longer available. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "INVALID_VALUE", - "display": "Invalid value" - } - ] - }, - "diagnostics": "'Page Number' (5) is invalid." - } - ] - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/Appointment": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to book an appointment to a directly bookable service if an appointment slot is available, defer the booking responsibility to a directly bookable service if no appointment slot is available, or refer a patient into a triage service. \n\nIt is not possible to book into an indirectly bookable service using this endpoint. The patient will need to contact the service provider on the telephone number provided on [[HYPERLINK_A019]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to check if the service is directly bookable, indirectly bookable, or triage by either using [[HYPERLINK_A033]] or [[HYPERLINK_A035]]. You can then offer appropriate actions to authenticated users, i.e. the ability to book an appointment into a directly bookable service if an appointment slot is available, defer the booking responsibility to a directly bookable service if no appointment slot is available, refer a patient into a triage service.\n\nIf the service is directly bookable, you need to retrieve available appointment slots for the service using [[HYPERLINK_A015]].\n\nYou need to use the Unique Booking Reference Number (UBRN) of a referral request in order to use this endpoint. \n\n## Important note when deferring to provider\n\nYou should only defer booking to a directly bookable service in the following circumstances:\n - when the service has no available slots *or*\n - when trying to book an appointment into a service, the slot advertised is no longer available *or*\n - when trying to book an appointment into a service, no response is received within the message timeout period (currently 2 minutes)\n\n## Important note when booking slots\n\nWhen appointment slots are booked using this endpoint, it may be necessary to provide the named clinician details. This is because slots can be setup with or without a named clinician. Your integrated application must support both scenarios.\n\nWhen booking a slot using [[HYPERLINK_A016]], the named clinician details must be added to the \"Appointment.partcipant\" list. As shown in the \"Booking with named clinician\" example.\n\n## Use case\nAs an authenticated user\n\nI need to be able to\n - Book an appointment into an available appointment slot for a directly bookable service *or*\n - Defer the booking responsibility to a directly bookable service if no appointment slot is available *or*\n - Refer the patient into a triage service\n\nSo I can progress my patient's care at that service.\n\n## Related endpoints\nYou can generate a letter for the patient, summarising the current state of their referral and any steps \nthe patient may need to follow using [[HYPERLINK_A019]].\n\nWhere deferring the booking responsibility to a directly bookable service, or referring the patient into a triage service, you can calculate the date when the patient can expect to be contacted (by the receiving service) using reference data from [[HYPERLINK_A004]].\n\n ## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Book or defer appointment (A016, FHIR STU3)", - "operationId": "a016-book-or-defer-appointment", - "tags": [ - "Arrange appointment", - "Arrange triage" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - "examples": { - "minimal-booking": { - "summary": "Minimum booking", - "value": { - "$ref": "../../examples/bookOrDeferAppointment/requests/MinimalBooking.json" - } - }, - "minimal-deferral": { - "summary": "Minimum deferral", - "value": { - "$ref": "../../examples/bookOrDeferAppointment/requests/MinimalDeferral.json" - } - }, - "triage-deferral": { - "summary": "Triage deferral", - "value": { - "$ref": "../../examples/bookOrDeferAppointment/requests/TriageDeferral.json" - } - }, - "booking-with-named-clinician": { - "summary": "Booking with named clinician", - "value": { - "$ref": "../../examples/bookOrDeferAppointment/requests/BookingWithNamedClinician.json" - } - }, - "deferral-with-slot-reference": { - "summary": "Deferral with slot reference", - "value": { - "$ref": "../../examples/bookOrDeferAppointment/requests/DeferralWithSlotReference.json" - } - }, - "deferral-booking-attempt-problem": { - "summary": "Deferral booking attempt problem", - "value": { - "$ref": "../../examples/bookOrDeferAppointment/requests/DeferralBookingAttemptProblem.json" - } - } - } - } - } - }, - "responses": { - "201": { - "description": "An appointment within e-RS.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - "examples": { - "minimal-booking": { - "summary": "Minimum booking", - "value": { - "$ref": "../../../examples/bookOrDeferAppointment/responses/MinimalBooking.json" - } - }, - "minimal-deferral": { - "summary": "Minimum deferral", - "value": { - "$ref": "../../../examples/bookOrDeferAppointment/responses/MinimalDeferral.json" - } - }, - "triage-deferral": { - "summary": "Triage deferral", - "value": { - "$ref": "../../../examples/bookOrDeferAppointment/responses/TriageDeferral.json" - } - }, - "booking-with-named-clinician": { - "summary": "Booking with named clinician", - "value": { - "$ref": "../../../examples/bookOrDeferAppointment/responses/BookingWithNamedClinician.json" - } - }, - "deferral-with-slot-reference": { - "summary": "Deferral with slot reference", - "value": { - "$ref": "../../../examples/bookOrDeferAppointment/responses/DeferralWithSlotReference.json" - } - }, - "deferral-booking-attempt-problem": { - "summary": "Deferral booking attempt problem", - "value": { - "$ref": "../../../examples/bookOrDeferAppointment/responses/DeferralBookingAttemptProblem.json" - } - } - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| SERVICE_UNAVAILABLE | Indicates that a service is no longer available. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| INAPPROPRIATE_SLOT | The slot provided is not suitable. |\n| SLOT_NOT_AVAILABLE | Slot is no longer available. |\n| UNABLE_TO_CONFIRM_APPOINTMENT | An unexpected error prevented eRS from successfully confirming the appointment. |\n| SLOTS_CURRENTLY_AVAILABLE | There are currently future slots available, so you cannot defer to this Service to book. |\n| THIS_SLOT_IS_AVAILABLE | Slot is currently available. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Where status code 502 (Bad Gateway) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_RESPONDED_WITH_ERROR | Error received from PAS. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "PAS_RESPONDED_WITH_ERROR", - "display": "Error received from PAS" - } - ] - }, - "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: ERROR" - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - }, - "504": { - "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "timeout", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "PAS_NOT_RESPONDING", - "display": "No response from PAS" - } - ] - }, - "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" - } - ] - } - } - } - } - } - } - }, - "/STU3/Binary": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to upload a file containing clinical information to e-RS ready to be associated with a referral, an advice and guidance request or an advice and guidance response.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou can only upload file formats that are supported by e-RS. Currently, the supported file formats are:\n\n| File type | File extension(s) |\n| ------------------ | --------------------------- |\n| Plain Text | `.txt` |\n| PDF | `.pdf` |\n| XML Text | `.xml` |\n| RTF Text | `.rtf`, `.rtx` |\n| Basic Audio | `.au` |\n| MPEG audio layer 3 | `.mp3` |\n| PNG Image | `.png` | \n| GIF Image | `.gif` |\n| JPEG Image | `.jpg,` `.jpe`, `.jpeg` |\n| TIFF Image | `.tif`, `.tiff` |\n| MPEG Video | `.mpg`, `.mpeg`, `.mpe` |\n| MSWORD | `.doc`, `.docx` |\n| DICOM | `.dcm` |\n\nCurrently, the maximum file size supported by e-RS is 5MB.\n\n## Use case\n\nAs an authenticated user\n\nI need to upload a referral letter or other clinical information file to e-RS\n\nSo that I can associate the file with an existing referral or advice and guidance request.\n\n## Important notes\n\nThis endpoint **only** performs the file upload and **does not** associate it with a referral. The uploaded file must be explicitly associated with a referral by, for example, using [[HYPERLINK_A012]].\n\nThe resulting URL within e-RS for the uploaded file is returned in the 'Location' header of the response.\n\nRequest header `NHSD-eRS-Referral-ID` - the ID (typically the UBRN) of the referral which the documents are intended for - is non-mandatory, but must be provided if this file is to be attached to an existing request.\n\n## Related endpoints\n\nYou can associate the uploaded file with a specific referral using:\n - [[HYPERLINK_A012]]\n - [[HYPERLINK_A022]]\n - [[HYPERLINK_A028]]\n\nYou can associate the uploaded file with a specific advice and guidance request using:\n - [[HYPERLINK_A044]]\n - [[HYPERLINK_A026]]\n - [[HYPERLINK_A027]]\n", - "summary": "Upload file to document store (A020, FHIR STU3)", - "operationId": "a020-upload-file-to-document-store", - "tags": [ - "Refer patient", - "Request advice", - "Arrange appointment", - "Arrange triage" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "NHSD-eRS-File-Name", - "description": "The name of file being uploaded, including the extension\n", - "required": true, - "schema": { - "type": "string", - "example": "test.txt" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Referral-ID", - "description": "The ID (typically the UBRN) of the referral which the documents are intended for. This must be provided if this file is to be attached to an existing request.\n", - "required": false, - "schema": { - "type": "string", - "example": "000000070000" - } - } - ], - "requestBody": { - "required": true, - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "binary" - }, - "example": "This is some example text." - }, - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/xml": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/rtf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/basic": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/gif": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/tiff": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "video/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/msword": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/dicom": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "responses": { - "201": { - "description": "201 (Created) - success response with no body", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Location": { - "description": "The e-RS file location of the file which has been uploaded.\n", - "required": true, - "schema": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n| FILE_SIZE_ERROR | The file is either empty or too large. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.maintainReferralLetter": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to manage the set of 'referral letter' attachments associated with an existing referral, including adding or removing attachments from a referral.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nAll new files to be associated with a referral must be uploaded first using [[HYPERLINK_A020]] and then linked to the referral using this endpoint.\n\n## Important notes\n\nThis endpoint can be used to associate attachments to a referral that has no existing referral letter attachments. \nIn this case you must upload the file first using [[HYPERLINK_A020]] and then associate it to the referral using this endpoint.\n\nYou can also use this endpoint to modify the *set* of referral letter attachments already associated with a referral. \nIn this case, you must post all referral letter attachments you wish to be (finally) associated to the referral, \nincluding any that were already associated. In other words, this endpoint replaces the set of referral letter \nattachments previously associated - with those specified in your latest request. \nAs such, it is imperative that this call references all the attachments the user wishes to keep, every time it is called.\n\nBelow are three example scenarios which clarify the behaviour of the endpoint when referral attachments are already present on the referral:\n\n1. Let us consider a referral that has two referral letter attachments associated (say \"A.pdf\" and \"B.pdf\"). If \nyou wish to add an additional attachment (say \"C.pdf\"), you must upload the additional attachment \n\"C.pdf\" using [[HYPERLINK_A020]], and then associate attachments \"A.pdf\", \"B.pdf\" and \"C.pdf\" \nvia this endpoint in a single request. That is, all three attachments \"A.pdf\", \"B.pdf\" and \"C.pdf\" \nmust be included in the request to [[HYPERLINK_A012]].\n2. Let us consider a different referral that has two referral letter attachments (say \"D.jpg\" and \"E.jpg\") \nalready associated, and you wish to remove one of them. Let us consider that you wish to remove \"D.jpg\". \nTo do this, you would call [[HYPERLINK_A012]] specifying only \"E.jpg\" in your request. By omitting \n\"D.jpg\" from your request, e-RS will disassociate attachment \"D.jpg\" from the referral and only attachment \"E.jpg\" \nwill remain associated.\n3. Let us now consider a referral that has four referral letter attachments associated (say \"L.doc\", \"M.doc\", \"N.doc\" \nand \"O.doc\"), and you wish to add some more files (say \"P.doc\" and \"Q.doc\") and remove some files (say \"N.doc\" \nand \"O.doc\"). To do this you must upload the additional attachment(s) (\"N.doc\" and \"O.doc\") \nusing [[HYPERLINK_A020]]. Following that successful upload, you must then associate only all \nreferral letter attachments the user wishes to keep (namely \"L.doc\", \"M.doc\", \"P.doc\" and \"Q.doc\") \nin a single request to [[HYPERLINK_A012]]. Attachments not included in the request \n(namely \"N.doc\" and \"O.doc\") will be disassociated from the referral as a result.\n\nAs a developer or software supplier, please ensure your users are made aware or protected from this behaviour. \nFor example, when a referring user wants to update the attachments on a referral, the user should be presented \nwith the currently associated attachments so they can add and/or remove attachments as required.\n\nNote: It is not permissible to remove *all* referral letter attachments leaving zero attachments associated. \nThere must be at least one referral letter attachment associated.\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use case\nAs an authenticated user\n\nI need to be able to manage referral letter attachments associated with a referral\n\nSo I can ensure the service provider has enough information to review/process the referral.\n\n\n## Related endpoints\nDocuments must be uploaded into the e-RS document store using [[HYPERLINK_A020]] before they can be associated \nwith a referral.\n\nYou can check to see what referral letter information has been added to a referral by using [[HYPERLINK_A005]], \n[[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request |\n| ------------------------------------------------------ | ------------------------------------------------------- |\n| Add clinical information for first time (single file) | `ubrn`=`000000070000`, `body` as defined in example 1 |\n| Add clinical information for first time (two files) | `ubrn`=`000000070001`, `body` as defined in example 2 |\n| Update clinical information | `ubrn`=`000000070001`, `body` as defined in example 3 |\n", - "summary": "Maintain referral letter (A012, FHIR STU3)", - "operationId": "a012-maintain-referral-letter", - "tags": [ - "Refer patient", - "Arrange appointment", - "Arrange triage" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-MaintainReferralLetter-Parameters", - "description": "The parameters object used in maintain referral letter endpoint", - "type": "object", - "required": [ - "meta", - "resourceType", - "parameter" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-MaintainReferralLetter-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-MaintainReferralLetter-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `referralLetterFile` | `1..*` | |\n", - "items": { - "title": "referralLetterFile", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "referralLetterFile" - ], - "example": "referralLetterFile" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER" - ], - "example": "REFERRER" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "Blood test results showing an anomaly in the values of xxxx" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "examples": { - "single-file": { - "summary": "1 - Add clinical information (single file)", - "value": { - "$ref": "../../examples/maintainReferralLetter/requests/SingleDocumentReference.json" - } - }, - "two-files": { - "summary": "2 - Add clinical information (two files)", - "value": { - "$ref": "../../examples/maintainReferralLetter/requests/MultipleDocumentReferences.json" - } - }, - "update-files": { - "summary": "3 - Update clinical information (removing one file from example above)", - "value": { - "$ref": "../../examples/maintainReferralLetter/requests/UpdateClinicalInfo.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "withClinicalInformation": { - "summary": "`ReferralRequest` with clinical information (2 files)", - "value": { - "$ref": "../../../examples/maintainReferralLetter/responses/ReferralRequestWithMultipleDocumentReferences.json" - } - }, - "withClinicalInformationFirstTime": { - "summary": "`ReferralRequest` with clinical information (1 file)", - "value": { - "$ref": "../../../examples/maintainReferralLetter/responses/ReferralRequestWithSingleDocumentReference.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "412": { - "description": "Precondition Failed - Mandatory data is missing" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| NO_CHANGES_DETECTED | No changes detected when processing supplied request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.acceptReferral": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint, as a service provider, to accept a referral that is booked into your bookable service and awaiting review.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n### Application-restricted, unattended access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nTo access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review.\n\n## Important notes\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. \n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A013]] can only be used for referrals \nbooked into bookable services, and not the referrals sent into triage services.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\n## Use cases\nAs an authenticated user\n\nI need to accept an inbound referral after its review\n\nSo that I can confirm the patient's referral is appropriate for the current service and booked appointment date/time.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Accept referral (A013, FHIR STU3)", - "operationId": "a013-accept-referral", - "tags": [ - "Review referral requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - } - ], - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "example-response": { - "summary": "Example response", - "value": { - "$ref": "../../../examples/acceptReferral/responses/ExampleResponse.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "412": { - "description": "Precondition Failed - Mandatory data is missing" - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.rejectReferral": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint, as a service provider, to reject a referral that is booked into your bookable service and awaiting review. \nThis returns the referral to the referrer with a mandatory rejection reason and optional user comment to explain why it has been rejected.\n\nConsider using [[HYPERLINK_A022]] instead if you wish to ask your admin team to get the patient into the most appropriate service.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A014]] can only \nbe used for referrals booked into bookable services, and not the referrals sent into triage services.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\nYou need to use [[HYPERLINK_A004]] to retrieve a list of rejection reason reference data codes along with their user-friendly display names. To find \nrelevant rejection reasons, obtain reference data from `APPOINTMENT-CANCELLATION-REASON` and filter as follows:\n\n - `appointmentBookingCancellationReasonType` must be `PROVIDER_REJECT`\n - `effectiveFrom` must be in the past, and\n - `effectiveTo` must not be in the past\n\n## Important notes\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use cases\nAs an authenticated user\n\nI need to reject an inbound referral back to the referrer after its review with an explanation of why\n\nSo that the referrer can address the reason for rejection and progress the referral appropriately.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Reject referral (A014, FHIR STU3)", - "operationId": "a014-reject-referral", - "tags": [ - "Review referral requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-RejectReferral-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RejectReferral-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RejectReferral-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `rejectionReason` | `1..1` | The reason why the referral is being rejected |\n| `rejectionComments` | `0..1` | This may be mandatory if mandatory comment indicator is set to 'Yes' for the Rejection Reason Type selected. Maximum 2000 characters. |\n| `appointmentCancelledInPAS` | `0..1` | This flag is mandatory for indirectly bookable services | \n", - "items": { - "anyOf": [ - { - "title": "rejectionReason", - "description": "Parameter to supply a rejectionReason", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "rejectionReason" - ], - "example": "rejectionReason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "TREATMENT_NO_LONGER_REQUIRED" - } - } - } - } - }, - { - "title": "rejectionComments", - "description": "Parameter to supply the rejectionComments", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "rejectionComments" - ], - "example": "rejectionComments" - }, - "valueString": { - "type": "string", - "example": "Condition of the patient has improved. No further action needed" - } - } - }, - { - "title": "appointmentCancelledInPAS", - "description": "Parameter to supply a appointmentCancelledInPAS", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "appointmentCancelledInPAS" - ], - "example": "appointmentCancelledInPAS" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - } - ] - } - } - } - }, - "examples": { - "basic-example-ibs": { - "summary": "Basic example for IBS", - "value": { - "$ref": "../../examples/rejectReferral/requests/BasicExampleIbs.json" - } - }, - "basic-example-dbs": { - "summary": "Basic example for DBS", - "value": { - "$ref": "../../examples/rejectReferral/requests/BasicExampleDbs.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "example-response-ibs": { - "summary": "Example response for IBS", - "value": { - "$ref": "../../../examples/rejectReferral/responses/ExampleResponseIbs.json" - } - }, - "example-response-dbs": { - "summary": "Example response for DBS", - "value": { - "$ref": "../../../examples/rejectReferral/responses/ExampleResponseDbs.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "412": { - "description": "Precondition Failed - Mandatory data is missing" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNABLE_TO_CANCEL_APPOINTMENT | System is unable to cancel the appointment. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - }, - "504": { - "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "timeout", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "PAS_NOT_RESPONDING", - "display": "No response from PAS" - } - ] - }, - "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.generatePatientLetter": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to download a PDF format letter for the patient summarising the current state of their referral and any steps the patient may need to follow.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\n## Use case\n\nAs an authenticated user\n\nI need to generate the patient letter including up-to-date details about their referral and any steps the patient may need to follow\n\nSo that I can pass it to the patient.\n", - "summary": "Generate patient letter (A019, FHIR STU3)", - "operationId": "a019-generate-patient-letter", - "tags": [ - "Refer patient", - "Arrange appointment", - "Arrange triage" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - } - ], - "responses": { - "200": { - "description": "Response contains the binary stream of the generated patient letter.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Disposition": { - "description": "The description of the type of content provided.\n", - "required": true, - "schema": { - "type": "string", - "example": "attachment; filename=\"000000070000_Appointment_Confirmation_Summary_20210603121353.pdf\"" - } - }, - "Content-Length": { - "description": "The length of the response.\n", - "required": true, - "schema": { - "type": "string", - "example": "3111" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/pdf" - ], - "example": "application/pdf" - } - } - }, - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_ACCESS_CODE | The patient does not have an access code/password to log onto the patient portal. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.cancelAppointmentActionLater": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint, as a service provider, to task your admin team to rebook/redirect a referral that is booked \ninto your bookable service and awaiting review.\n\nNote: this will also cancel the current appointment.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. [[HYPERLINK_A022]] can \nonly be used for referrals booked into bookable services, and not the referrals sent into triage services.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\nIf you want to include attachments with the admin task, you need to use [[HYPERLINK_A020]] so they are \nready to be associated when this endpoint is called.\n\n## Use cases\nAs an authenticated user\n\nI need to task my admin team to rebook/redirect a referral I have reviewed (whilst also cancelling the current appointment)\n\nSo that I can progress the patient's care along the most appropriate referral pathway.\n\n## Important notes\n - The priority of the referral can be changed as part of this endpoint.\n - A comment must be added to explain to the administrator what is required and can include optional attachments.\n - The current appointment is cancelled as part of this endpoint. If the current appointment is booked to an indirectly\n bookable service, you must indicate whether the appointment has been cancelled on the local provider system. \n If indicated as not cancelled, the referral will be added to the 'Indirectly Booked Appointments to Cancel in PAS' \n worklist to task the admin team to do so.\n - When this endpoint is successfully used, an entry will be added to the service providers 'Appointments For Booking' \n worklist for the admin team to action the task. The provider admin team will only be able to progress the referral \n via the e-RS Professional Application user interface (e.g. shortlisting appropriate services for the patient).\n - In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \n The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n - Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Cancel appointment, action later (A022, FHIR STU3)", - "operationId": "a022-cancel-appointment-action-later", - "tags": [ - "Review referral requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-cancelAppointmentActionLater-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-cancelAppointmentActionLater-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-cancelAppointmentActionLater-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------------------- |\n| `priority` | `0..1` | Optionally updates the priority |\n| `appointmentCancelledinPAS` | `0..1` | This flag is mandatory for indirectly bookable services |\n| `comments` | `1..1` | |\n| `providerAttachmentFile` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "priority", - "description": "Parameter to supply a priority", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "appointmentCancelledInPAS", - "description": "Parameter to supply a appointmentCancelledInPAS", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "appointmentCancelledInPAS" - ], - "example": "appointmentCancelledInPAS" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "comments", - "description": "Parameter to supply the comments", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Please contact patient to rebook" - } - } - }, - { - "title": "providerAttachmentFile", - "description": "Parameter to supply an attachment file", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "providerAttachmentFile" - ], - "example": "providerAttachmentFile" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER" - ], - "example": "PROVIDER" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - } - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "basic-example-dbs": { - "summary": "Basic example for DBS", - "value": { - "$ref": "../../examples/cancelAppointmentActionLater/requests/MinimalExampleDBS.json" - } - }, - "example-priority-change-and-attachments": { - "summary": "Example for priority change and attachments", - "value": { - "$ref": "../../examples/cancelAppointmentActionLater/requests/PriorityChangeAndWithAttachmentsDBS.json" - } - }, - "basic-example-ibs": { - "summary": "Basic example for IBS", - "value": { - "$ref": "../../examples/cancelAppointmentActionLater/requests/MinimalExampleIBS.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "example-response-dbs": { - "summary": "Example response for DBS", - "value": { - "$ref": "../../../examples/cancelAppointmentActionLater/responses/MinimalExampleDBS.json" - } - }, - "example-priority-change-and-attachments": { - "summary": "Example response for priority change and attachments", - "value": { - "$ref": "../../../examples/cancelAppointmentActionLater/responses/PriorityChangeAndWithAttachmentsDBS.json" - } - }, - "example-response-ibs": { - "summary": "Example response for IBS", - "value": { - "$ref": "../../../examples/cancelAppointmentActionLater/responses/MinimalExampleIBS.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "412": { - "description": "Precondition Failed - Mandatory data is missing" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/CommunicationRequest/$ers.fetchworklist": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve available worklists of advice and guidance requests. Use [[HYPERLINK_A008]] to retrieve available worklists of referral requests.\n\nWorklists provide lists of referral/advice requests that meet certain criteria, typically where a user needs to be aware of something important, \nor to undertake an action, in order to avoid delays to patient care.\n\nService provider organisations can retrieve the contents of their 'Advice and guidance requests' worklist using \nthis endpoint. This worklist contains advice and guidance requests the provider has received and which need actioning. The version of each advice \nrequest in the worklist will also be returned. Note that the version can change due to admin/clinical changes as well as internal e-RS processes.\n\nThere are currently no advice and guidance related worklists available for referring organisations.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nIf a worklist response exceeds 10MB, a successful response will not be returned. This is due to the size limitation on the APIM platform.\n\n## Use case\nAs an authenticated user\n\nI need to retrieve a worklist of advice and guidance requests\n\nSo I can determine which ones I need to take further action on.\n\n## Related endpoints\n\nHaving used this endpoint to retrieve the 'Advice and Guidance Requests' worklist, entries from it can be used as follows:\n - Use [[HYPERLINK_A024]] to retrieve contextual summary details of the advice and guidance request\n - Use [[HYPERLINK_A025]] to retrieve the conversation within the advice and guidance request, including references to attachments\n - Use [[HYPERLINK_A006]] to retrieve clinical attachments for an advice and guidance request\n - Use [[HYPERLINK_A026]] to respond to the referrer supplying advice or requesting further information\n - Use [[HYPERLINK_A027]] to convert the advice and guidance request into a referral. This is only possible if the referrer has authorised the provider to do so\n - Use [[HYPERLINK_A043]] to generate a PDF file overview relating to an advice and guidance request\n", - "summary": "Retrieve advice and guidance requests worklist (A023, FHIR STU3)", - "operationId": "a023-retrieve-a&g-worklist", - "tags": [ - "Review advice and guidance requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-FetchWorklist-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `listType` | `1..1` | |\n| `service` | `0..1` | Mandatory for the application-restricted security pattern |\n| `specialtyAssignedIndicator` | `0..1` | |\n| `specialty` | `0..1` | | \n| `location` | `0..1` | | \n| `clinicianAssignedIndicator` | `0..1` | | \n| `clinician` | `0..1` | | \n", - "items": { - "anyOf": [ - { - "title": "listType", - "description": "Indicates the type of list requested", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "listType" - ], - "example": "listType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| -------------------------------- | ----------- | -------------------------------------- |\n| `eRS-ReferralListSelector` | `0..1` | |\n| `eRS-CommunicationListSelector` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-ReferralListSelector", - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralListSelector-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRALS_FOR_REVIEW", - "APPOINTMENT_SLOT_ISSUES", - "REJECTED_TRIAGE_RESPONSE", - "ASSESSMENT_RETURNED_CANCELLED_DNA", - "AWAITING_BOOKING", - "LETTERS_OUTSTANDING" - ], - "example": "REFERRALS_FOR_REVIEW" - } - } - }, - { - "title": "eRS-CommunicationListSelector", - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationListSelector-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVICE_AND_GUIDANCE_REQUESTS" - ], - "example": "ADVICE_AND_GUIDANCE_REQUESTS" - } - } - } - ] - } - } - } - } - } - }, - { - "title": "service", - "description": "The service identifier", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - }, - { - "title": "specialtyAssignedIndicator", - "description": "Indicates whether filtering on Specialty is required or not\n", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialtyAssignedIndicator" - ], - "example": "specialtyAssignedIndicator" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - }, - "code": { - "type": "string", - "enum": [ - "ASSIGNED", - "NOT_ASSIGNED" - ], - "example": "NOT_ASSIGNED" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "location", - "description": "The service location identifier", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "location" - ], - "example": "location" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "clinicianAssignedIndicator", - "description": "Indicates whether filtering on Clinician is required or not\n", - "type": "object", - "required": [ - "name", - "valueCodeableConcept" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicianAssignedIndicator" - ], - "example": "clinicianAssignedIndicator" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssignedIndicator-1" - }, - "code": { - "type": "string", - "enum": [ - "ASSIGNED", - "NOT_ASSIGNED" - ], - "example": "NOT_ASSIGNED" - } - } - } - } - } - } - } - }, - { - "title": "clinician", - "description": "The clinician assigned to the Referral Request. If present, the 'clinicianAssignedIndicator' parameter must be set to 'Assigned'", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinician" - ], - "example": "clinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "aAndg-requests": { - "summary": "Advice and guidance requests", - "value": { - "$ref": "../../examples/retrieveAdviceAndGuidanceWorklist/requests/MinimalAdviceAndGuidanceRequests.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "The response body contains the list of advice and guidance requests (if any) that match the search criteria provided", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-FetchWorklist-List", - "description": "A list of referrals representing the available worklist items", - "type": "object", - "required": [ - "meta", - "resourceType", - "status", - "mode" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-FetchWorklist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------------------------------------------- |\n| `Practitioner` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n| `Patient` | `0..*` | This resource is only contained when fetching the Referrals for Review worklist |\n", - "items": { - "anyOf": [ - { - "title": "Practitioner", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "Practitioner-021600556514" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Practitioner-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Practitioner" - ], - "example": "Practitioner" - }, - "identifier": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - }, - { - "title": "Patient", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "Patient-9912003888" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Patient-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Patient" - ], - "example": "Patient" - }, - "identifier": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with referral details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070002" - } - } - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ----------------------------------------------------------- | ----------- | ------------------------------------------------------------- |\n| `Extension-eRS-ReferralsforReview-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AppointmentSlotIssues-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested | \n| `Extension-eRS-AdviceAndGuidanceRequests-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-RejectedTriageResponse-WorkListItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-AwaitingBooking-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n| `Extension-eRS-LettersOutstanding-WorklistItem` | `0..1` | Type of worklist items depends on the worklist type requested |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralsforReview-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralsforReview-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `requestContextStatus` | `1..1` | |\n| `clinicalInfoFirstSubmitted` | `0..1` | |\n| `clinicalInfoLastUpdated` | `0..1` | |\n| `appointmentStart` | `0..1` | |\n| `allocatedClinician` | `0..1` | |\n| `service` | `1..1` | |\n| `referralRequestVersion` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#Patient-9462979626" - } - } - } - } - }, - { - "title": "namedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#Practitioner-021600556514" - } - } - } - } - }, - { - "title": "eReferralPathwayStart", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "eReferralPathwayStart" - ], - "example": "eReferralPathwayStart" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "clinicalInfoPrinted", - "type": "object", - "required": [ - "url", - "valueBoolean" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoPrinted" - ], - "example": "clinicalInfoPrinted" - }, - "valueBoolean": { - "type": "boolean", - "example": false - } - } - }, - { - "title": "requestContextStatus", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "requestContextStatus" - ], - "example": "requestContextStatus" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-RequestContextStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "LETTER_CHANGED", - "PRIORITY_CHANGED", - "PRIORITY_AND_LETTER_CHANGED", - "NEVER_REVIEWED" - ], - "example": "NEVER_REVIEWED" - }, - "display": { - "type": "string", - "example": "Never Reviewed" - } - } - } - } - } - } - } - }, - { - "title": "clinicalInfoFirstSubmitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoFirstSubmitted" - ], - "example": "clinicalInfoFirstSubmitted" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "clinicalInfoLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoLastUpdated" - ], - "example": "clinicalInfoLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-03T10:44:42.764Z" - } - } - }, - { - "title": "referralType", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralType" - ], - "example": "referralType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralType-1" - }, - "code": { - "type": "string", - "enum": [ - "APPOINTMENT", - "TRIAGE_DEFERRAL" - ], - "example": "TRIAGE_DEFERRAL" - } - } - } - } - } - } - } - }, - { - "title": "appointmentStart", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "appointmentStart" - ], - "example": "appointmentStart" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-02T14:15:00.000Z" - } - } - }, - { - "title": "allocatedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "allocatedClinician" - ], - "example": "allocatedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#Practitioner-021600556514" - } - } - } - } - }, - { - "title": "service", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier", - "display" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Service Name" - } - } - } - } - }, - { - "title": "referralRequestVersion", - "type": "object", - "required": [ - "url", - "valueInteger" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralRequestVersion" - ], - "example": "referralRequestVersion" - }, - "valueInteger": { - "type": "integer", - "example": 0 - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AppointmentSlotIssues-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AppointmentSlotIssues-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `eReferralPathwayStart` | `1..1` | |\n| `clinicalInfoPrinted` | `1..1` | |\n| `ubrnReceived` | `0..1` | |\n| `patientContactExpected` | `0..1` | |\n| `clinicalInformationStatus` | `0..1` | |\n| `reason` | `0..1` | |\n| `lastContact` | `0..1` | |\n| `service` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "namedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "eReferralPathwayStart", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "eReferralPathwayStart" - ], - "example": "eReferralPathwayStart" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "clinicalInfoPrinted", - "type": "object", - "required": [ - "url", - "valueBoolean" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInfoPrinted" - ], - "example": "clinicalInfoPrinted" - }, - "valueBoolean": { - "type": "boolean", - "example": false - } - } - }, - { - "title": "ubrnReceived", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "ubrnReceived" - ], - "example": "ubrnReceived" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "patientContactExpected", - "type": "object", - "required": [ - "url", - "valueDate" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patientContactExpected" - ], - "example": "patientContactExpected" - }, - "valueDate": { - "type": "string", - "format": "date", - "example": "2021-09-07" - } - } - }, - { - "title": "clinicalInformationStatus", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalInformationStatus" - ], - "example": "clinicalInformationStatus" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicalInformationStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PRESENT", - "NOT_APPLICABLE", - "NOT_DUE", - "OVERDUE" - ], - "example": "NOT_DUE" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - } - } - } - } - } - }, - { - "title": "lastContact", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "lastContact" - ], - "example": "lastContact" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "service", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier", - "display" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Service Name" - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AdviceAndGuidanceRequests-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AdviceAndGuidanceRequests-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | ------------------------------------------ |\n| `priority` | `1..1` | |\n| `specialty` | `1..1` | |\n| `patient` | `1..1` | |\n| `namedClinician` | `0..1` | |\n| `category` | `1..1` | |\n| `adviceFirstRequested` | `1..1` | |\n| `adviceLastUpdated` | `1..1` | |\n| `referrer` | `1..1` | |\n| `service` | `1..1` | |\n| `clinicType` | `0..1` | |\n| `communicationRequestVersion` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "specialty", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - } - } - } - }, - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "namedClinician", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "category", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "category" - ], - "example": "category" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_RESPONSE_REQUIRED", - "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", - "REFERRER_TO_REVIEW_RESPONSE", - "CONVERSATION_ENDED_CANCELLED", - "CONVERSATION_ENDED_CLOSED", - "ADVICE_CONVERTED" - ], - "example": "PROVIDER_RESPONSE_REQUIRED" - } - } - } - } - } - } - } - }, - { - "title": "adviceFirstRequested", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "adviceFirstRequested" - ], - "example": "adviceFirstRequested" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "adviceLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "adviceLastUpdated" - ], - "example": "adviceLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "adviceLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "adviceLastUpdated" - ], - "example": "adviceLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-09-01T14:26:18.314Z" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "service", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "service" - ], - "example": "service" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier", - "display" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Service Name" - } - } - } - } - }, - { - "title": "clinicType", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/CLINIC-TYPE" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - } - } - } - }, - { - "title": "communicationRequestVersion", - "type": "object", - "required": [ - "url", - "valueInteger" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "communicationRequestVersion" - ], - "example": "communicationRequestVersion" - }, - "valueInteger": { - "type": "integer", - "example": 0 - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-RejectedTriageResponse-WorkListItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-RejectedTriageResponse-WorkListItem-1" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Rejected/TriageRequest worklist, only included if `status` is `TRIAGE_RESPONSE` |\n", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "referralLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralLastUpdated" - ], - "example": "referralLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "status", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "status" - ], - "example": "status" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "ASSESSMENT_RESULT", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "NOT_BOOKED", - "BOOKED", - "AWAITING_TRIAGE", - "DEFERRED_TO_PROVIDER", - "APP_CANCELLED_BY_PROVIDER", - "APP_CANCELLED_BY_PATIENT", - "TRIAGED_PROVIDER_TO_ACTION", - "TRIAGE_RESPONSE" - ], - "example": "REJECTED" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Assessment result", - "Cancelled referral", - "Did not attend", - "Not booked", - "Booked", - "Awaiting triage", - "Deferred to provider", - "Appointment cancelled by provider", - "Appointment cancelled by patient", - "Triaged - provider to action", - "Triage Response" - ], - "example": "Rejected" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - ], - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "FURTHER_INFORMATION_REQUIRED" - }, - "display": { - "type": "string", - "example": "Further information required" - } - } - } - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AssessmentReturnedCancelledDna-WorklistItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AssessmentReturnedCancelledDna-WorkListItem-1" - }, - "extension": { - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Assessment Returned / Cancelled / DNA worklist, only included if `status` is `CANCELLED_REFERRAL` |\n", - "type": "array", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "referralLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralLastUpdated" - ], - "example": "referralLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "status", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "status" - ], - "example": "status" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "ASSESSMENT_RESULT", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "NOT_BOOKED", - "BOOKED", - "AWAITING_TRIAGE", - "DEFERRED_TO_PROVIDER", - "APP_CANCELLED_BY_PROVIDER", - "APP_CANCELLED_BY_PATIENT", - "TRIAGED_PROVIDER_TO_ACTION", - "TRIAGE_RESPONSE" - ], - "example": "REJECTED" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Assessment result", - "Cancelled referral", - "Did not attend", - "Not booked", - "Booked", - "Awaiting triage", - "Deferred to provider", - "Appointment cancelled by provider", - "Appointment cancelled by patient", - "Triaged - provider to action", - "Triage Response" - ], - "example": "Rejected" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" - ], - "example": "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "INTEND_PRIVATE" - }, - "display": { - "type": "string", - "example": "Patient will go to a private clinic" - } - } - } - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-AwaitingBooking-WorklistItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AwaitingBooking-WorkListItem-1" - }, - "extension": { - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `referralLastUpdated` | `1..1` | The `dateTime` the `ReferralRequest` was last updated |\n| `status` | `1..1` | The status of the `ReferralRequest` |\n| `reason` | `0..1` | The reason the `ReferralRequest` is on the Awaiting Booking worklist, only included if `status` is `APPOINTMENT_CANCELLED_BY_PROVIDER` or `APPOINTMENT_CANCELLED_BY_PATIENT` |\n", - "type": "array", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "referralLastUpdated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralLastUpdated" - ], - "example": "referralLastUpdated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "status", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "status" - ], - "example": "status" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "ASSESSMENT_RESULT", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "NOT_BOOKED", - "BOOKED", - "AWAITING_TRIAGE", - "DEFERRED_TO_PROVIDER", - "APP_CANCELLED_BY_PROVIDER", - "APP_CANCELLED_BY_PATIENT", - "TRIAGED_PROVIDER_TO_ACTION", - "TRIAGE_RESPONSE" - ], - "example": "REJECTED" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Assessment result", - "Cancelled referral", - "Did not attend", - "Not booked", - "Booked", - "Awaiting triage", - "Deferred to provider", - "Appointment cancelled by provider", - "Appointment cancelled by patient", - "Triaged - provider to action", - "Triage Response" - ], - "example": "Rejected" - } - } - } - } - } - } - } - }, - { - "title": "reason", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - ], - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_APPOINTMENT_CLASH" - }, - "display": { - "type": "string", - "example": "Patient - Clashes with another appointment" - } - } - } - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-LettersOutstanding-WorklistItem", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-LettersOutstanding-WorkListItem-1" - }, - "extension": { - "description": "| Field | Cardinality | Notes |\n| ------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient associated with the `ReferralRequest` |\n| `priority` | `1..1` | The priority associated with the `ReferralRequest` |\n| `referralCreated` | `1..1` | The Date and Time the `ReferralRequest` was initiated |\n| `clinicalContext` | `1..1` | The clinical context for the `ReferralRequest` |\n| `referrer` | `1..1` | The `Practitioner` who initially creates the `ReferralRequest` |\n| `letterDue` | `1..1` | The `date` a referral letter is due for the `ReferralRequest` |\n", - "type": "array", - "items": { - "anyOf": [ - { - "title": "patient", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - { - "title": "priority", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "referralCreated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referralCreated" - ], - "example": "referralCreated" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-11-24T14:46:01.001Z" - } - } - }, - { - "title": "clinicalContext", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "clinicalContext" - ], - "example": "clinicalContext" - }, - "valueString": { - "type": "string", - "example": "ORTHAPEDICS/KNEE" - } - } - }, - { - "title": "referrer", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "referrer" - ], - "example": "referrer" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "letterDue", - "type": "object", - "required": [ - "url", - "valueDate" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "letterDue" - ], - "example": "letterDue" - }, - "valueDate": { - "type": "string", - "format": "date", - "example": "2021-11-24" - } - } - } - ] - } - } - } - } - ] - } - } - } - } - } - } - }, - "examples": { - "aAndg-requests": { - "summary": "Advice and guidance requests", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceWorklist/responses/AdviceAndGuidanceRequests.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request or service. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/CommunicationRequest/{ubrn}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve the summary of an advice and guidance request. This endpoint provides important \ncontextual information about the advice and guidance request (e.g. the service/specialty to which advice has been requested, etc).\n\nThis does not include the advice and guidance conversation between the referrer and the service provider. The conversation must be retrieved via [[HYPERLINK_A025]].\n\nAn advice request can include file attachments and structured clinical data added via an integrated primary care system. These must be retrieved via [[HYPERLINK_A042]] and [[HYPERLINK_A043]], respectively.\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of the advice and guidance request. \nFor service provider users, you may have identified the UBRN via [[HYPERLINK_A023]].\n \n## Application-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n## Healthcare worker, user-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve the summary of an advice and guidance request\n\nSo I can understand all of the relevant context for the request.\n\n## Important notes\n\nThe summary includes an indicator of whether the referrer has authorised the providing organisation to \nconvert the advice and guidance request into an appointment request. \nIf authorised, [[HYPERLINK_A027]] can be used to convert the advice and guidance request into an appointment request.\n\nAn advice and guidance request may have been converted to a referral (with the same UBRN), \nand in addition a referral pathway in e-RS can be made up of more than one UBRN. As such, \nit is important that all clinical information is obtained across all the related UBRNs in the pathway. \nThese may be identified using [[HYPERLINK_A005]] and will be returned if the user is authorised to view this.\n\nIf the converted advice and guidance request is referred to a service outside of your organisation, \nthe subsequent referral information may not be accessible due to existing data-access rules. However, \nthe advice and guidance summary ([[HYPERLINK_A024]]), attachments ([[HYPERLINK_A006]]), advice and guidance conversation ([[HYPERLINK_A025]]) and \nclinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved.\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or [[HYPERLINK_A006]] endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A024]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE\t | The file is available for download. |\n| PENDING\t | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |\n| THREATS_FOUND\t | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n## Related endpoints\n\nAfter using this endpoint, use [[HYPERLINK_A025]] to retrieve the Advice and Guidance conversation itself.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ----------------------- |\n| Simple summary `CommunicationRequest` | `ubrn`=`000000070000` |\n| Attachment file reference present | `ubrn`=`000000070001` |\n| Attachment files unavailable for download | `ubrn`=`000000070002` |\n", - "summary": "Retrieve advice and guidance request summary (A024, FHIR STU3)", - "operationId": "a024-retrieve-advice-and-guidance", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "e-RS Communication Request (advice and guidance summary)", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CommunicationRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "category", - "subject", - "recipient", - "sender", - "requester", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "CommunicationRequest" - ], - "example": "CommunicationRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - }, - { - "title": "CareConnect-PractitionerRole", - "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "practitioner", - "organization" - ], - "properties": { - "id": { - "type": "string", - "example": "PractitionerRole-R69-000000000101" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "PractitionerRole" - ], - "example": "PractitionerRole" - }, - "practitioner": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "organization": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - "code": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - }, - "code": { - "type": "string", - "example": "REFERRING_CLINICIAN" - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ProviderConversionAuthorisation", - "description": "Extension to supply the conversion authorisation flag", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - }, - "code": { - "type": "string", - "enum": [ - "AUTHORISED_TO_CONVERT", - "NOT_AUTHORISED_TO_CONVERT" - ], - "example": "NOT_AUTHORISED_TO_CONVERT" - }, - "display": { - "type": "string", - "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" - } - } - } - } - }, - { - "title": "Extension-eRS-Specialty", - "description": "Extension to supply the specialty", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "category": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_RESPONSE_REQUIRED", - "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", - "REFERRER_TO_REVIEW_RESPONSE", - "CONVERSATION_ENDED_CANCELLED", - "CONVERSATION_ENDED_CLOSED", - "ADVICE_CONVERTED" - ], - "example": "PROVIDER_RESPONSE_REQUIRED" - } - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "recipient": { - "type": "array", - "items": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-HealthcareService-Reference", - "description": "Extension to supply the service id", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - } - }, - "sender": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - }, - "requester": { - "type": "object", - "required": [ - "agent" - ], - "properties": { - "agent": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - } - } - }, - "payload": { - "type": "array", - "items": { - "type": "object", - "required": [ - "contentReference" - ], - "properties": { - "contentReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70002" - } - } - } - } - } - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "minimal": { - "summary": "Minimal `CommunicationRequest` example", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/MinimalExample.json" - } - }, - "with-attachment-file-reference": { - "summary": "`CommunicationRequest` with attachment file reference", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json" - } - }, - "with-unavailable-attachments": { - "summary": "`CommunicationRequest` with attachments unavailable for download", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an Advice and Guidance request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/CommunicationRequest/{ubrn}/_history/{version}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to retrieve a specific version of `CommunicationRequest`.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nThe pre-requisites for this endpoint are the same as for endpoint [[HYPERLINK_A024]].\n\nNote: e-RS only supports the retrieval of the most recent version of `CommunicationRequest`. You cannot retrieve earlier versions.\n\n## Important note\n\nThe Important notes for this endpoint are the same as for endpoint [[HYPERLINK_A024]].\n\n## Use case\n\nSee [[HYPERLINK_A005]].\n\n## Related endpoints\n\nSee [[HYPERLINK_A024]].\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| ------------------------------------------------------------------------ | ------------------------------------- |\n| Simple summary `CommunicationRequest` | `ubrn`=`000000070000`, `version`=`5` |\n| Attachment file reference present | `ubrn`=`000000070001`, `version`=`5` |\n| `CommunicationRequest` with attachments unavailable for download | `ubrn`=`000000070002`, `version`=`5` |\n", - "summary": "Retrieve advice and guidance request summary (versioned) (A024, FHIR STU3)", - "operationId": "a024-retrieve-advice-and-guidance-versioned", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "name": "version", - "in": "path", - "description": "The version of the resource to be retrieved. It must be the latest version of the resource otherwise\n`HISTORY_NOT_SUPPORTED` error will be returned (HTTP 404 Not Found).\n", - "required": true, - "schema": { - "type": "string", - "example": "5" - } - }, - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "e-RS Communication Request (advice and guidance summary)", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CommunicationRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "category", - "subject", - "recipient", - "sender", - "requester", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "CommunicationRequest" - ], - "example": "CommunicationRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - }, - { - "title": "CareConnect-PractitionerRole", - "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "practitioner", - "organization" - ], - "properties": { - "id": { - "type": "string", - "example": "PractitionerRole-R69-000000000101" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "PractitionerRole" - ], - "example": "PractitionerRole" - }, - "practitioner": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "organization": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - "code": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - }, - "code": { - "type": "string", - "example": "REFERRING_CLINICIAN" - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ProviderConversionAuthorisation", - "description": "Extension to supply the conversion authorisation flag", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - }, - "code": { - "type": "string", - "enum": [ - "AUTHORISED_TO_CONVERT", - "NOT_AUTHORISED_TO_CONVERT" - ], - "example": "NOT_AUTHORISED_TO_CONVERT" - }, - "display": { - "type": "string", - "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" - } - } - } - } - }, - { - "title": "Extension-eRS-Specialty", - "description": "Extension to supply the specialty", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "category": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_RESPONSE_REQUIRED", - "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", - "REFERRER_TO_REVIEW_RESPONSE", - "CONVERSATION_ENDED_CANCELLED", - "CONVERSATION_ENDED_CLOSED", - "ADVICE_CONVERTED" - ], - "example": "PROVIDER_RESPONSE_REQUIRED" - } - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "recipient": { - "type": "array", - "items": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-HealthcareService-Reference", - "description": "Extension to supply the service id", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - } - }, - "sender": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - }, - "requester": { - "type": "object", - "required": [ - "agent" - ], - "properties": { - "agent": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - } - } - }, - "payload": { - "type": "array", - "items": { - "type": "object", - "required": [ - "contentReference" - ], - "properties": { - "contentReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70002" - } - } - } - } - } - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "minimal": { - "summary": "Minimal `CommunicationRequest` example", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/MinimalExample.json" - } - }, - "with-attachment-file-reference": { - "summary": "`CommunicationRequest` with attachment file reference", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithAttachmentFileReference.json" - } - }, - "with-unavailable-attachments": { - "summary": "`CommunicationRequest` with attachments unavailable for download", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceRequest/responses/WithUnavailableAttachments.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found - Resource not found for ID provided or Resource version does not match version requested." - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an Advice and Guidance request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/Communication": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve the advice and guidance conversation between the referring organisation \nand service providing organisation.\n\nA conversation takes the form of messages between a referrer (seeking advice) and a provider or specialist. Messages can include file attachments. These must be retrieved via [[HYPERLINK_A042]]\n\n[Read](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/referrals-and-bookings/e-referral-service/retrieve-clinical-referral-information-as-a-service-provider) our building healthcare software guide for detailed information.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of the advice and guidance request. For service provider users, \nyou may have identified the UBRN via [[HYPERLINK_A023]].\n\nYou need to use [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request. \nThis will importantly include the latest version of the request which must be used.\n\n## Application-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n## Healthcare worker, user-restricted access\n\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve the conversation that is present on an advice and guidance request\n\nSo that I can review the conversation and potentially contribute further to it.\n\n## Important notes\n\nThe conversation returned includes links to any attachments associated with the conversation.\nThis can be done via endpoint [[HYPERLINK_A006]]. \nNote, dependent on how attachments were added they may be linked to the Advice and Guidance summary instead of the conversation. \nThese may be retrieved from [[HYPERLINK_A024]].\n\nIf the converted advice and guidance request is referred to a service outside of your organisation, \nthe subsequent referral information may not be accessible due to existing data-access rules. \nHowever, the advice and guidance summary ([[HYPERLINK_A024]]), attachments ([[HYPERLINK_A006]]), \nadvice and guidance conversation ([[HYPERLINK_A025]]) and \nclinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved.\nThe conversation also gets included in the form of a PDF file returned by [[HYPERLINK_A007]].\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. Attachments are only made available once an uploaded file has been validated and successfully malware scanned. A request to retrieve an attachment that is not available for download will result in an error being returned. See [[HYPERLINK_A042]] for more information.\n\nThe availability status of an attachment can be retrieved via any endpoint that returns an eRS-AvailabilityStatus-1 code in the success response, including [[HYPERLINK_A025]]. The eRS-AvailabilityStatus-1 code can return one of four possible values, as detailed below.\n\n| eRS-AvailabilityStatus-1 code | Description / Guidance |\n|-------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| AVAILABLE\t | The file is available for download. |\n| PENDING\t | The file is being scanned and cannot be retrieved. Wait at least 5 minutes before checking its availability again. |\n| THREATS_FOUND\t | The file has been quarantined after detecting a threat and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. |\n| VALIDATION_FAILED | The file has failed validation and cannot be retrieved.
Contact the organisation that uploaded the file to resolve the issue and get the information you need. Use the extensions returned via this endpoint: Extension-eRS-AttachedBy-1 and Extension-eRS-AttachedByOrganisation-1. Validation can fail because the: |\n\n\n\n## Related endpoints\n\nAfter using this endpoint:\n - Use [[HYPERLINK_A006]] to retrieve any attachments associated with the advice and guidance request.\n - (For service provider users) Use [[HYPERLINK_A026]] to respond to the referrer supplying advice or requesting further information.\n - (For service provider users) Use [[HYPERLINK_A027]] to convert the advice and guidance request into a referral. This is only possible if the referrer has authorised the provider to do so.\n\nUse [[HYPERLINK_A043]] to generate a PDF file overview relating to an advice and guidance request.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| -------------------------------------------------------------- | --------------------------------------------------------- |\n| Single message from referrer | `based-on`=`CommunicationRequest/000000070000/_history/1` |\n| One message each way | `based-on`=`CommunicationRequest/000000070000/_history/2` |\n| Attachment present in each direction | `based-on`=`CommunicationRequest/000000070001/_history/6` |\n| Multi-way conversation | `based-on`=`CommunicationRequest/000000070002/_history/1` |\n| Attachment uploaded from RCS before A&G creation | `based-on`=`CommunicationRequest/000000070003/_history/7` | \n| Attachment files unavailable for download | `based-on`=`CommunicationRequest/000000070004/_history/3` | \n", - "summary": "Retrieve advice and guidance conversation (A025, FHIR STU3)", - "operationId": "a025-retrieve-advice-and-guidance-conversation", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "name": "based-on", - "in": "query", - "description": "The component describing the CommunicationRequest for which the communication is requested for.\n\nPattern:\n\n`CommunicationRequest/{ubrn}/_history/{version}`\n\n - The `ubrn` represents the unique booking reference number of the Advice and Guidance Request for which the caller is obtaining the 'Advice and Guidance Conversation'\n - The `version` is the version of the A&G Request to be retrieved (only the most current version will be retrievable)\n", - "required": true, - "schema": { - "type": "string", - "example": "CommunicationRequest/000000070000/_history/1" - } - }, - { - "in": "query", - "name": "_include", - "description": "Suppliers must request includes they rely on. The default includes behaviour is subject to change. \n\nPlease note that '_include' query parameter can be supplied multiple times for example:\n\n`GET /STU3/Communication\n?based-on=CommunicationRequest/{ubrn}/_history/{version}\n&_include=Communication:requester-practitionerrole:PractitionerRole\n&_include=Communication:sender-practitionerrole:PractionerRole\n&_include=Communication:content-reference:DocumentReference`\n", - "required": false, - "schema": { - "type": "string", - "enum": [ - "Communication:requester-practitionerrole:PractitionerRole", - "Communication:sender-practitionerrole:PractionerRole", - "Communication:content-reference:DocumentReference" - ], - "example": "Communication:requester-practitionerrole:PractitionerRole" - } - }, - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "e-RS Communication Request (advice and guidance summary)", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "Bundle resource containing advice and guidance conversation", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "type", - "total", - "link", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "08acc887-6a7b-4b38-8f50-022e41319efe" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated", - "profile" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" - ], - "example": "http://hl7.org/fhir/STU3/StructureDefinition/Bundle" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Bundle" - ], - "example": "Bundle" - }, - "type": { - "type": "string", - "enum": [ - "searchset" - ], - "example": "searchset" - }, - "total": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 3 - }, - "link": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "relation", - "url" - ], - "properties": { - "relation": { - "type": "string", - "enum": [ - "self" - ], - "example": "self" - }, - "url": { - "type": "string", - "example": "_baseUrl_/STU3/Communication?based-on=CommunicationRequest%2F000000070000%2F_history%2F6&_include=Communication%3Arequester-practitionerrole%3APractitionerRole&_include=Communication%3Asender-practitionerrole%3APractionerRole&_include=Communication%3Acontent-reference%3ADocumentReference" - } - } - } - }, - "entry": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ----------------------- | ----------- | --------------------------------------------------- |\n| `CommunicationEntry` | `1..*` | |\n| `PractitionerRoleEntry` | `2..*` | |\n| `DocumentEntry` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "CommunicationEntry", - "description": "CommunicationEntry details a single chat entry.\n", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/STU3/Communication/70000" - }, - "resource": { - "title": "eRS-Communication-1", - "description": "A record of information transmitted from a sender to a receiver", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "category", - "recipient", - "sent", - "sender", - "note" - ], - "properties": { - "id": { - "type": "string", - "example": "appointment" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/eRS-Communication-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Communication" - ], - "example": "Communication" - }, - "status": { - "type": "string", - "enum": [ - "completed" - ], - "example": "completed" - }, - "category": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" - }, - "code": { - "type": "string", - "enum": [ - "REQUESTER", - "RESPONDER", - "REFERRER_CLINICAL_INFORMATION_UPDATED" - ], - "example": "REQUESTER" - } - } - } - } - } - } - }, - "recipient": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-HealthcareService-Reference", - "description": "Extension to supply the service id", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - }, - { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - ] - } - }, - "sent": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "sender": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - }, - "payload": { - "type": "array", - "items": { - "type": "object", - "required": [ - "contentReference" - ], - "properties": { - "contentReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "DocumentReference/70000" - } - } - } - } - } - }, - "note": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "type": "string", - "example": "Example content...", - "description": "Maximum 8000 characters." - } - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "match" - ], - "example": "match" - } - } - } - } - }, - { - "title": "PractitionerRoleEntry", - "description": "PractitionerRoleEntry details practitioner involved in this conversation.\n", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/STU3/PractitionerRole/103264994981.R69.SERVICE-PROVIDER-CLINICIAN" - }, - "resource": { - "title": "CareConnect-PractitionerRole", - "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "practitioner", - "organization" - ], - "properties": { - "id": { - "type": "string", - "example": "PractitionerRole-R69-000000000101" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "PractitionerRole" - ], - "example": "PractitionerRole" - }, - "practitioner": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "organization": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - "code": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - }, - "code": { - "type": "string", - "example": "REFERRING_CLINICIAN" - } - } - } - } - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "include" - ], - "example": "include" - } - } - } - } - }, - { - "title": "DocumentEntry", - "description": "DocumentEntry contains the 'DocumentReference' associated with this advice and guidance conversation.\n", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/STU3/DocumentReference/70000" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "include" - ], - "example": "include" - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "single-message-from-referrer": { - "summary": "Single message from referrer", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/SingleMessageFromReferrer.json" - } - }, - "one-message-each-way": { - "summary": "One message each way", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/OneMessageEachWay.json" - } - }, - "attachment-present-in-each-direction": { - "summary": "Attachment present in each direction", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/AttachmentPresentInEachDirection.json" - } - }, - "multi-way-conversation": { - "summary": "Multi-way conversation", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/MultiWayConversation.json" - } - }, - "attachment-uploaded-from-rcs": { - "summary": "Attachment uploaded from RCS", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/AttachmentUploadedFromRCS.json" - } - }, - "unavailable-attachments": { - "summary": "Attachment files unavailable for download", - "value": { - "$ref": "../../../examples/retrieveAdviceAndGuidanceConversation/UnavailableAttachments.json" - } - } - } - } - } - }, - "400": { - "description": "Where status code 400 (Bad Request) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found - Resource not found for ID provided or Resource version does not match version requested." - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/CommunicationRequest/{ubrn}/$ers.sendCommunicationToRequester": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint, as a service provider, to respond to an advice and guidance request your service provider organisation has received. \nYou can either provide guidance back to the referrer or request further information from the referrer. \nThis will return the advice and guidance request back to the referrer for action.\n\nNote: If you want to convert an advice and guidance request into a referral, \nand provide a final guidance response back to the referrer at the same time, please \nuse [[HYPERLINK_A027]] instead. This option is only permissible \nif the referrer has authorised the provider to convert the advice and guidance request into a referral.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request.\n\nYou need to use [[HYPERLINK_A025]] to retrieve the conversation within an advice and guidance request.\n\nIf you want to include attachments with the response, you need to use [[HYPERLINK_A020]] so they are ready to be associated with the response.\n\n## Important notes\n \nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download.\nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n \nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use case\nAs an authenticated user\n\nI need to return an advice and guidance request back to the referrer with some guidance\n\nSo that I can progress the conversation regarding the patient's care.\n\n## Related endpoints\n\nYou can use [[HYPERLINK_A007]] to generate a PDF file that summarises \nthe advice and guidance request and associated conversation.\n\nYou can use [[HYPERLINK_A024]] to retrieve the latest summary of the advice and guidance request.\n\nYou can use [[HYPERLINK_A025]] to retrieve the latest conversation within the advice and guidance request.\n", - "summary": "Send advice and guidance response (A026, FHIR STU3)", - "operationId": "a026-send-a&g-response", - "tags": [ - "Review advice and guidance requests" - ], - "parameters": [ - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-SendCommunicationToRequester-Request-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Request-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Request-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------------------------------------------------ |\n| `guidanceOutcome` | `1..1` | |\n| `guidanceIntendedRecommendation` | `0..1` | Conditionally Mandatory if guidanceOutcome value is `RETURN_TO_REFERRER_WITH_ADVICE` |\n| `guidance` | `1..1` | Mandatory guidance response. Maximum 8000 characters. |\n| `updatedPriority` | `1..1` | | \n| `guidanceAttachmentFile` | `0..*` | Property defining files to be included with the supplied `guidance` text | \n", - "items": { - "anyOf": [ - { - "title": "guidanceOutcome", - "description": "Parameter indicating the expected outcome of the supplied guidance", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "guidanceOutcome" - ], - "example": "guidanceOutcome" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceResponseOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceResponseOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "RETURN_TO_REFERRER_WITH_ADVICE", - "REQUIRE_FURTHER_INFORMATION", - "PROVIDER_CONVERTED" - ], - "example": "RETURN_TO_REFERRER_WITH_ADVICE" - } - } - } - } - }, - { - "title": "guidanceIntendedRecommendation", - "description": "Parameter to supply the recommendation for a patient's care off the back of the provided guidance. Only available and mandatory when supplying a `guidanceOutcome` of `RETURN_TO_REFERRER_WITH_ADVICE`", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "guidanceIntendedRecommendation" - ], - "example": "guidanceIntendedRecommendation" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceIntendedRecommendation-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-GuidanceIntendedRecommendation-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVICE_ONLY_NO_REFERRAL_RECOMMENDED", - "ADVICE_FOLLOWED_BY_REFERRAL_IF_REQUIRED", - "REFERRAL_RECOMMENDED", - "OTHER" - ], - "example": "ADVICE_ONLY_NO_REFERRAL_RECOMMENDED" - } - } - } - } - }, - { - "title": "guidance", - "description": "Parameter to supply the guidance", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "guidance" - ], - "example": "guidance" - }, - "valueString": { - "type": "string", - "example": "Please perform test B and send me back the results" - } - } - }, - { - "title": "updatedPriority", - "description": "Parameter to supply a updatedPriority", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "updatedPriority" - ], - "example": "updatedPriority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "guidanceAttachmentFile", - "description": "Parameter to supply an attachment file", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "guidanceAttachmentFile" - ], - "example": "guidanceAttachmentFile" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "GUIDANCE_RESPONSE" - ], - "example": "GUIDANCE_RESPONSE" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - } - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "require-further-information": { - "summary": "Require further information", - "value": { - "$ref": "../../examples/sendAdviceAndGuidanceResponse/requests/RequireFurtherInformation.json" - } - }, - "return-to-referrer-with-advice": { - "summary": "Return to referrer with advice", - "value": { - "$ref": "../../examples/sendAdviceAndGuidanceResponse/requests/ReturnToReferrerWithAdvice.json" - } - }, - "attachment-included": { - "summary": "Attachment included", - "value": { - "$ref": "../../examples/sendAdviceAndGuidanceResponse/requests/AttachmentIncluded.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Parameters resource containing updated communication request and newly created communication", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-SendCommunicationToRequester-Response-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Response-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-SendCommunicationToRequester-Response-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `updatedCommunicationRequest` | `1..1` | |\n| `createdCommunication` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "updatedCommunicationRequest", - "description": "Parameter containing the updated `CommunicationRequest` detailing changes to the overall conversation (changes to priority, status, etc)", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "updatedCommunicationRequest" - ], - "example": "updatedCommunicationRequest" - }, - "resource": { - "title": "eRS-CommunicationRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "category", - "subject", - "recipient", - "sender", - "requester", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "CommunicationRequest" - ], - "example": "CommunicationRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - }, - { - "title": "CareConnect-PractitionerRole", - "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "practitioner", - "organization" - ], - "properties": { - "id": { - "type": "string", - "example": "PractitionerRole-R69-000000000101" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "PractitionerRole" - ], - "example": "PractitionerRole" - }, - "practitioner": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "organization": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - "code": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - }, - "code": { - "type": "string", - "example": "REFERRING_CLINICIAN" - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ProviderConversionAuthorisation", - "description": "Extension to supply the conversion authorisation flag", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - }, - "code": { - "type": "string", - "enum": [ - "AUTHORISED_TO_CONVERT", - "NOT_AUTHORISED_TO_CONVERT" - ], - "example": "NOT_AUTHORISED_TO_CONVERT" - }, - "display": { - "type": "string", - "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" - } - } - } - } - }, - { - "title": "Extension-eRS-Specialty", - "description": "Extension to supply the specialty", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "category": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_RESPONSE_REQUIRED", - "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", - "REFERRER_TO_REVIEW_RESPONSE", - "CONVERSATION_ENDED_CANCELLED", - "CONVERSATION_ENDED_CLOSED", - "ADVICE_CONVERTED" - ], - "example": "PROVIDER_RESPONSE_REQUIRED" - } - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "recipient": { - "type": "array", - "items": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-HealthcareService-Reference", - "description": "Extension to supply the service id", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - } - }, - "sender": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - }, - "requester": { - "type": "object", - "required": [ - "agent" - ], - "properties": { - "agent": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - } - } - }, - "payload": { - "type": "array", - "items": { - "type": "object", - "required": [ - "contentReference" - ], - "properties": { - "contentReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70002" - } - } - } - } - } - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - } - } - }, - { - "title": "createdCommunication", - "description": "Parameter containing the newly created `Communication` detailing the guidance provided", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "createdCommunication" - ], - "example": "createdCommunication" - }, - "resource": { - "title": "eRS-Communication-1", - "description": "A record of information transmitted from a sender to a receiver", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "category", - "recipient", - "sent", - "sender", - "note" - ], - "properties": { - "id": { - "type": "string", - "example": "appointment" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/eRS-Communication-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Communication" - ], - "example": "Communication" - }, - "status": { - "type": "string", - "enum": [ - "completed" - ], - "example": "completed" - }, - "category": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" - }, - "code": { - "type": "string", - "enum": [ - "REQUESTER", - "RESPONDER", - "REFERRER_CLINICAL_INFORMATION_UPDATED" - ], - "example": "REQUESTER" - } - } - } - } - } - } - }, - "recipient": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-HealthcareService-Reference", - "description": "Extension to supply the service id", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - }, - { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - ] - } - }, - "sent": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "sender": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - }, - "payload": { - "type": "array", - "items": { - "type": "object", - "required": [ - "contentReference" - ], - "properties": { - "contentReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "DocumentReference/70000" - } - } - } - } - } - }, - "note": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "type": "string", - "example": "Example content...", - "description": "Maximum 8000 characters." - } - } - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "require-further-information": { - "summary": "Response for 'Require further information'", - "value": { - "$ref": "../../../examples/sendAdviceAndGuidanceResponse/responses/RequireFurtherInformation.json" - } - }, - "return-to-referrer-with-advice": { - "summary": "Response for 'Return to referrer with advice'", - "value": { - "$ref": "../../../examples/sendAdviceAndGuidanceResponse/responses/ReturnToReferrerWithAdvice.json" - } - }, - "with-attachment": { - "summary": "Response with attachment", - "value": { - "$ref": "../../../examples/sendAdviceAndGuidanceResponse/responses/AttachmentIncluded.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNSUPPORTED_PRIORITY | The Priority submitted is not supported by the responsible Service. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/$ers.createFromCommunicationRequestActionLater": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint, as a service provider, to:\n - convert the advice and guidance request you have received into a referral, AND\n - create a task for the service provider admin team to select/shortlist appropriate services for the patient, AND\n - provide final guidance response details back to the referrer\n\nNote: This endpoint is only allowed to be used if the referrer has authorised the provider to convert the advice \nand guidance request into a referral.\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request. \nThis will include whether or not the referrer has authorised the provider to be able to convert an \nadvice and guidance request into a referral, and thus dictate whether this endpoint can be used.\n\nYou need to use [[HYPERLINK_A025]] to retrieve the conversation within an advice and guidance request.\n\nIf you want to include attachments with the admin task and/or the response to the referrer, \nyou need to use [[HYPERLINK_A020]] so they are ready to be associated when this endpoint is called.\n\n## Use case\nAs an authenticated user\n\nI need to convert an inbound advice and guidance request into a referral \nand task my admin team to shortlist appropriate services for the patient\n\nSo that I can progress the patient's care along the most appropriate referral pathway.\n\n## Important notes\n\nWhen this endpoint is successfully used, an entry will be added to the service providers \nAppointments For Booking worklist for the admin team to action the task. The provider \nadmin team will currently only be able to progress the referral via the e-RS Professional \nApplication user interface (e.g. shortlisting appropriate services for the patient).\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Related endpoints\n\nYou can use [[HYPERLINK_A005]] to retrieve the details of the referral.\n\nYou can use [[HYPERLINK_A024]] to retrieve the latest summary of the advice and guidance request.\n\nYou can use [[HYPERLINK_A025]] to retrieve the latest conversation within the advice and guidance request.\n\nYou can use [[HYPERLINK_A006]] to retrieve the clinical attachments for a referral/advice request.\n\nYou can use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for a referral.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Convert advice and guidance request to referral (A027, FHIR STU3)", - "operationId": "a027-convert-a&g-to-referral", - "tags": [ - "Review advice and guidance requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CreateFromCommunicationRequestActionLater-Request-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateFromCommunicationRequestActionLater-Request-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateFromCommunicationRequestActionLater-Request-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------------- |\n| `createFrom` | `1..1` | |\n| `guidance` | `1..1` | Mandatory guidance response. Maximum 8000 characters. |\n| `newReferralPriority` | `1..1` | | \n| `reviewComments` | `1..1` | |\n| `guidanceAttachmentFile` | `0..*` | Property defining files to be included with the supplied `guidance` text | \n| `reviewAttachmentFile` | `0..*` | Property defining files to be associated with the created `ReferralRequest` | \n", - "items": { - "anyOf": [ - { - "title": "createFrom", - "description": "Parameter to supply a createFrom", - "type": "object", - "required": [ - "name", - "valueReference" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "createFrom" - ], - "example": "createFrom" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "CommunicationRequest/000000070000/_history/4" - } - } - } - } - }, - { - "title": "guidance", - "description": "Parameter to supply the guidance", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "guidance" - ], - "example": "guidance" - }, - "valueString": { - "type": "string", - "example": "I have converted this to send the patient to one of our services" - } - } - }, - { - "title": "newReferralPriority", - "description": "Parameter to supply a newReferralPriority", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "newReferralPriority" - ], - "example": "newReferralPriority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "reviewComments", - "description": "Parameter to supply the reviewComments", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "reviewComments" - ], - "example": "reviewComments" - }, - "valueString": { - "type": "string", - "example": "Refer this patient to our 'xxx' service please as soon as possible" - } - } - }, - { - "title": "guidanceAttachmentFile", - "description": "Parameter to supply a guidanceAttachmentFile", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "guidanceAttachmentFile" - ], - "example": "guidanceAttachmentFile" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "GUIDANCE_RESPONSE" - ], - "example": "GUIDANCE_RESPONSE" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - } - } - } - } - } - } - }, - { - "title": "reviewAttachmentFile", - "description": "Parameter to supply a reviewAttachmentFile", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "reviewAttachmentFile" - ], - "example": "reviewAttachmentFile" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER" - ], - "example": "PROVIDER" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - } - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "no-attachments": { - "summary": "No attachments", - "value": { - "$ref": "../../examples/convertAdviceAndGuidanceToReferral/requests/NoAttachments.json" - } - }, - "with-attachments": { - "summary": "With attachments", - "value": { - "$ref": "../../examples/convertAdviceAndGuidanceToReferral/requests/WithAttachments.json" - } - } - } - } - } - }, - "responses": { - "201": { - "description": "A referral converted from A&G request.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "no-attachments": { - "summary": "No attachments", - "value": { - "$ref": "../../../examples/convertAdviceAndGuidanceToReferral/responses/NoAttachments.json" - } - }, - "with-attachments": { - "summary": "With attachments", - "value": { - "$ref": "../../../examples/convertAdviceAndGuidanceToReferral/responses/WithAttachments.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNSUPPORTED_PRIORITY | The Priority submitted is not supported by the responsible Service. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| CONFLICTING_VALUES | Two or more supplied values are contradictory. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.recordReviewOutcome": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint, as a service provider, to record a triage outcome for the following referrals awaiting review:\n - referrals sent into a triage service\n - referrals deferred into a directly bookable service because of appointment slot unavailability\n\nWhilst a document can be uploaded via [[HYPERLINK_A020]] without a `NHSD-eRS-Referral-ID`, only documents that have a `NHSD-eRS-Referral-ID` can be associated using this end point. \nAn attempt to associate a document without a `NHSD-eRS-Referral-ID` will return an error response of 422 - `INAPPROPRIATE_VALUE`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Application-restricted, unattended access \nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nTo access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review. The only use case currently permitted is for non-clinical provider actions.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Referrals For Review' worklist. \n[[HYPERLINK_A028]] can only be used for referrals sent into triage services, and not the referrals \nbooked into bookable services.\n\nYou need to use [[HYPERLINK_A008]] to retrieve the contents of the 'Appointment Slot Issues' worklist. \nThis provides a list of referrals that have been deferred into directly bookable services.\n\n - Referrals from this worklist may already have been reviewed or may not have any referral clinical information associated, \n in which case [[HYPERLINK_A028]] cannot be used.\n - [[HYPERLINK_A028]] can only be used for those referrals, on the 'Appointment Slot Issues' worklist, which are pending review.\n - As such, you need to use [[HYPERLINK_A029]] to determine if [[HYPERLINK_A028]] is a permissible action.\n\nYou need to use [[HYPERLINK_A005]] to retrieve the details for the referral.\n\nYou need to use [[HYPERLINK_A006]] to retrieve the clinical attachments for the referral.\n\nYou need to use [[HYPERLINK_A007]] to retrieve the clinical information summary PDF for the referral.\n\nIf you want to include attachments with the triage outcome, you need to use [[HYPERLINK_A020]] so \nthey are ready to be associated when this endpoint is called.\n\n## Use cases\nAs an authenticated user\n\nI need to return the referral back to the referrer with some advice\n\nSo that I can progress the patient's care appropriately with the referrer.\n\n\nAs an authenticated user\n\nI need to accept the referral and task my admin team to shortlist appropriate services for the patient\n\nSo that I can progress the patient's care along the most appropriate referral pathway.\n\n\n## Important notes\n\n - The only outcomes that are supported by this endpoint are 'Return to referrer with advice' and 'Accept and refer/book later'. 'Refer/book now' is not supported.\n - The triage comment text is mandatory. This comment provided will be sent to:\n - The initial referrer when the 'Return to referrer with advice' triage outcome is chosen.\n - An administrator at the receiving service provider when the 'Accept and refer/book later' outcome is chosen.\n - The priority of the referral can be changed as part of recording the triage outcome\n - When this endpoint is successfully used for recording an outcome of 'Accept and refer/book later', \n an entry will be added to the service providers Appointments For Booking worklist for the admin team to action the task. \n The provider admin team will only be able to progress the referral via the e-RS Professional Application user \n interface (e.g. shortlisting appropriate services for the patient).\n - In order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \n The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n - Further details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Record triage outcome (A028, FHIR STU3)", - "operationId": "a028-record-triage-outcome", - "tags": [ - "Review referral requests" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-RecordReviewOutcome-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RecordReviewOutcome-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-RecordReviewOutcome-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `reviewOutcome` | `1..1` | |\n| `reviewComments` | `1..1` | |\n| `reviewPriority` | `0..1` | | \n| `reviewAttachmentFile` | `0..*` | | \n", - "items": { - "anyOf": [ - { - "title": "reviewOutcome", - "description": "Parameter to supply a reviewOutcome", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "reviewOutcome" - ], - "example": "reviewOutcome" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "CANCEL_APPOINTMENT_ACTION_LATER", - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "RETURN_TO_REFERRER_WITH_ADVICE" - } - } - } - } - }, - { - "title": "reviewComments", - "description": "Parameter to supply the reviewComments", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "reviewComments" - ], - "example": "reviewComments" - }, - "valueString": { - "type": "string", - "example": "Condition not serious. No further action needed" - } - } - }, - { - "title": "reviewPriority", - "description": "Parameter to supply a reviewPriority", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "reviewPriority" - ], - "example": "reviewPriority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "reviewAttachmentFile", - "description": "Parameter to supply an attachment file", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "reviewAttachmentFile" - ], - "example": "reviewAttachmentFile" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER" - ], - "example": "PROVIDER" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - } - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "return-to-referrer-with-advice": { - "summary": "Return to referrer with advice", - "value": { - "$ref": "../../examples/recordTriageOutcome/requests/ReturnToReferrerWithAdvice.json" - } - }, - "accept-refer-book-later": { - "summary": "Accept refer book later", - "value": { - "$ref": "../../examples/recordTriageOutcome/requests/AcceptReferBookLater.json" - } - }, - "attachment-included": { - "summary": "Attachment included", - "value": { - "$ref": "../../examples/recordTriageOutcome/requests/AttachmentIncluded.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "return-to-referrer-with-advice": { - "summary": "Return to referrer with advice", - "value": { - "$ref": "../../../examples/recordTriageOutcome/responses/ReturnToReferrerWithAdvice.json" - } - }, - "accept-refer-book-later": { - "summary": "Accept refer book later", - "value": { - "$ref": "../../../examples/recordTriageOutcome/responses/AcceptReferBookLater.json" - } - }, - "attachment-included": { - "summary": "Attachment included", - "value": { - "$ref": "../../../examples/recordTriageOutcome/responses/AttachmentIncluded.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "412": { - "description": "Precondition Failed - Mandatory data is missing" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PRIORITY_NOT_CURRENT | 'Review Priority' value cannot be amended if Review Outcome value is RETURN_TO_REFERRER_WITH_ADVICE |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_STATE | Indicates that the referenced item is not in the correct state for the request to be processed. |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| DUPLICATE_FILENAME | A file being attached, matches another file being attached, or matches a file that is already linked. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/R4/PractitionerRole": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to retrieve a list of available e-RS roles (i.e. business functions) at each organisation where the user works.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nIn order to use this endpoint you must be an authenticated user\n\n## Use case\n\nAs an authenticated user\n\nI need to retrieve a list of authorised e-RS roles for organisations I work for\n\nSo I can choose the appropriate role and organisation to work under when performing tasks.\n\n## Related endpoints\n\nYou can then use the e-RS roles to perform specific tasks using other e-RS endpoints e.g. to satisfy Role and Organisation validation.\n\n### Role and Organisation Validation\n\nThe response from a successful call to [[HYPERLINK_A030]] represents a Practitioner Role Bundle. \nEach Practitioner Role represents an e-RS Role at a specific Organisation. \n\nFor most e-RS endpoints requests are made in the context of a specific authorised e-RS Role at a specific Organisation for the authenticated user. \nThis is accomplished by setting the values of the `NHSD-eRS-Business-Function` and `NHSD-End-User-Organisation-ODS` request headers. \n\nThe e-RS Role is supplied to the endpoint via the `NHSD-eRS-Business-Function` request header. \n\nThe Organisation is supplied to the endpoint via the `NHSD-End-User-Organisation-ODS` request header. \n\nThe `entry` field in the response from [[HYPERLINK_A030]] is an array of PractitionerRole resources. An example of a PractitionerRole resource is: \n```\n\"resource\": {\n \"id\": \"PractitionerRole-R69-000000000101\",\n \"meta\": {\n \"lastUpdated\": \"2021-05-24T16:09:32.252Z\"\n },\n \"resourceType\": \"PractitionerRole\",\n \"practitioner\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/sds-user-id\",\n \"value\": \"000000000101\"\n }\n },\n \"organization\": {\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"R69\"\n }\n },\n \"code\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1\",\n \"code\": \"SERVICE_DEFINER\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1\",\n \"code\": \"SERVICE_PROVIDER_CLINICIAN\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1\",\n \"code\": \"SERVICE_PROVIDER_ADMIN\"\n }\n ]\n }\n ]\n},\n```\nEach PractitionerRole resource has a `code` field which is an array of codings. \nThe authorised e-RS Roles for the authenticated user at a particular Organisation are represented by the `value` fields in the `https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1` code system. \nThe `NHSD-eRS-Business-Function` request header value should be the `code` field value from the relevant eRS-Business-Function-1 coding in the PractitionerRole resource e.g. `SERVICE_PROVIDER_CLINICIAN`.\n\nEach PractitionerRole resource also has an `organization` field which has an identifier in the `https://fhir.nhs.uk/Id/ods-organization-code` code system.\nThe `NHSD-End-User-Organisation-ODS` request header value should be the `value` field value from the organization identifier in the PractitionerRole resource e.g. \"R69\".\n", - "summary": "Retrieve user business functions (A030, FHIR R4)", - "operationId": "a030-retrieve-business-functions", - "tags": [ - "Retrieve user information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "The response body is a `Bundle` that contains `PractitionerRole` entries which define the [[HYPERLINK_ERS_BUS_FUNCTIONS]] that the user has available at each `Organisation` where they have a role.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "Bundle resource containing practitioner roles", - "description": "The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle \n", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "type", - "total", - "link" - ], - "properties": { - "id": { - "type": "string", - "example": "08acc887-6a7b-4b38-8f50-022e41319efe" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Bundle" - ], - "example": "Bundle" - }, - "type": { - "type": "string", - "enum": [ - "searchset" - ], - "example": "searchset" - }, - "total": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 1 - }, - "link": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "relation", - "url" - ], - "properties": { - "relation": { - "type": "string", - "enum": [ - "self" - ], - "example": "self" - }, - "url": { - "type": "string", - "example": "_baseUrl_/R4/PractitionerRole" - } - } - } - }, - "entry": { - "type": "array", - "items": { - "type": "object", - "required": [ - "fullUrl", - "search", - "resource" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/R4/PractitionerRole/PractitionerRole-R69-000000000101" - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "match" - ], - "example": "match" - } - } - }, - "resource": { - "type": "object", - "description": "A UKCore-Practitioner Role. The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole", - "required": [ - "id", - "meta", - "resourceType", - "practitioner", - "organization", - "code" - ], - "properties": { - "id": { - "type": "string", - "example": "PractitionerRole-R69-000000000101" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "PractitionerRole" - ], - "example": "PractitionerRole" - }, - "practitioner": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/sds-user-id" - ], - "example": "https://fhir.nhs.uk/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "organization": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - "code": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1" - ], - "example": "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1" - }, - "code": { - "type": "string", - "example": "REFERRING_CLINICIAN" - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "examples": { - "example-response-body": { - "summary": "Example response body", - "value": { - "$ref": "../../../examples/retrieveBusinessFunctions/responses/PractitionerRoleBundle.json" - } - } - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "ACCESS_DENIED" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_FORBIDDEN" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-supported", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_ACCEPTABLE" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "429": { - "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "throttled", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "TOO_MANY_REQUESTS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "500": { - "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_SERVER_ERROR" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_UNAVAILABLE" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.changeShortlist": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to change the shortlist of bookable and/or triage services on an existing referral.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Important notes\n\nThe maximum amount of services allowed on a given shortlist is 20.\n\nThe act of changing a shortlist alone will not result in a referral being sent/booked to any of the shortlisted services (even if only one service is shortlisted). \nA shortlist of a single triage service should be avoided as this relies on the patient to progress the referral, potentially leading to a delay to care. Especially if the referral priority is 2WW or Urgent.\n\nUse [[HYPERLINK_A016]] if there is a need to support the sending/booking of the referral into a shortlisted service.\n\nA patient can request assistance at a service (e.g. a translator, transport or advocacy) when a shortlist is created within the e-RS web application, meaning that all services shortlisted would support the patient's additional requirements to attend.\n\nThe e-RS APIs do not currently support patients' additional requirements so you can neither specify services that support patients' additional requirements, arrange additional requirements for a patient, or view comments associated with the request for additional requirements.\n\nYou must consider if you are fully meeting the patient's additional requirement needs if there are additional requirements associated with the referral.\n\nIf you do not know whether the patient has an existing additional requirement need and the referral may have been shortlisted within the e-RS web application, be mindful that if you chose to amend the shortlist via changing the services, you could remove this patient need.\n\nIf you are changing services to send the patient to a triage service, the triaging service will not support additional requirements but will need to consider if the patient has any additional requirements as part of their decision for future care.\n\nYou can view additional requirements on a referral via the e-RS web application or by fetching [[HYPERLINK_A005]].\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Use case\nAs an authenticated user\n\nI need to change the shortlist of bookable services and/or triage services on an existing referral\n\nSo that I can adequately manage my patients referral pathway, allowing the patient to book into an appropriate service.\n\n## Related endpoints\nTo allow the patient to book their appointment in their own time, you can generate a letter for the patient by using [[HYPERLINK_A019]]. The letter summarises the current state of the referral and any steps the patient may need to follow (e.g. appointment booking instructions).\n\nYou can book an appointment for the patient into a shortlisted directly bookable service using [[HYPERLINK_A015]] and [[HYPERLINK_A016]].\n\nYou can send the referral into a shortlisted triage service using [[HYPERLINK_A016]].\n\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A007]], and [[HYPERLINK_A006]] endpoints where necessary.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Change shortlist (A031, FHIR STU3)", - "operationId": "a031-change-shortlist", - "tags": [ - "Manage referral" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ChangeShortlist-Parameters", - "type": "object", - "description": "Parameters provided when looking to change the services a referral has currently shortlisted", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlist-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlist-Parameters-1" - } - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `Shortlist` | `1..1` | Shortlist indicating the new services a referral should have shortlisted |\n| `IntentionToAddReferralLetter` | `1..1` | Flag indicating whether a referral letter is going to be added later or is already added | \n| `FirstReminderLetterFollowUpDays` | `1..1` | Time at which a reminder should be sent to remind the patient about the referral |\n", - "items": { - "anyOf": [ - { - "title": "Shortlist", - "description": "Parameter to supply a shortlist", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "shortlist" - ], - "example": "shortlist" - }, - "resource": { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - } - } - }, - { - "title": "IntentionToAddReferralLetter", - "description": "Parameter to supply the intention to add referral letter flag", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "intentionToAddReferralLetter" - ], - "example": "intentionToAddReferralLetter" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - }, - "code": { - "type": "string", - "enum": [ - "NEED_TO_ADD_LATER", - "NOT_INTENDING_TO_ADD" - ], - "example": "NEED_TO_ADD_LATER" - } - } - } - } - }, - { - "title": "FirstReminderLetterFollowUpDays", - "description": "Parameter to supply the first reminder follow up days", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "firstReminderLetterFollowUpDays" - ], - "example": "firstReminderLetterFollowUpDays" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 0 - } - } - } - ] - } - } - } - }, - "examples": { - "unbookedReferralRequest": { - "summary": "Unbooked ReferralRequest", - "description": "Changing the shortlist of an unbooked `ReferralRequest` (single service shortlist)", - "value": { - "$ref": "../../examples/changeShortlist/requests/UnbookedReferral.json" - } - }, - "unbookedReferralRequestMultipleServices": { - "summary": "Unbooked ReferralRequest with Multiple Services", - "description": "Changing the shortlist of an unbooked `ReferralRequest` (multiple services shortlist)", - "value": { - "$ref": "../../examples/changeShortlist/requests/UnbookedReferralMultipleServices.json" - } - }, - "unbookedReferralRequestMixedShortlist": { - "summary": "Unbooked ReferralRequest with Bookable and Triage Services", - "description": "Changing the shortlist of an unbooked `ReferralRequest` (multiple services shortlist)", - "value": { - "$ref": "../../examples/changeShortlist/requests/UnbookedReferralMixedShortlist.json" - } - }, - "nonMixedShortlistWithDocument": { - "summary": "ReferralRequest with non Mixed service and Document Reference", - "description": "Changing the shortlist of an `ReferralRequest` with document reference.", - "value": { - "$ref": "../../examples/changeShortlist/requests/NonMixedShortlistWithDocument.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Referral updated with new service list", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - }, - "examples": { - "unbookedReferralRequest": { - "summary": "Unbooked ReferralRequest", - "description": "Changing the shortlist of an unbooked `ReferralRequest` (single service shortlist)", - "value": { - "$ref": "../../../examples/changeShortlist/responses/UnbookedReferral.json" - } - }, - "unbookedReferralRequestMultipleServices": { - "summary": "Unbooked ReferralRequest with Multiple Services", - "description": "Changing the shortlist of an unbooked `ReferralRequest` (multiple services shortlist)", - "value": { - "$ref": "../../../examples/changeShortlist/responses/UnbookedReferralMultipleServices.json" - } - }, - "unbookedReferralRequestMixedShortlist": { - "summary": "Unbooked ReferralRequest with Mixed Services", - "description": "Changing the shortlist of an unbooked `ReferralRequest` (bookable and triage service shortlist)", - "value": { - "$ref": "../../../examples/changeShortlist/responses/UnbookedReferralMixedShortlist.json" - } - }, - "nonMixedShortlistWithDocument": { - "summary": "ReferralRequest with non Mixed service and Document Reference", - "description": "Changing the shortlist of an `ReferralRequest` with document reference.", - "value": { - "$ref": "../../../examples/changeShortlist/responses/NonMixedShortlistWithDocument.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostic property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.changeShortlistAndSendForTriage": { - "post": { - "deprecated": true, - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n**This endpoint has now been deprecated please use [[HYPERLINK_A031]] instead.**\n\nUse this endpoint to change the shortlist to a single triage service and refer the patient directly to that triage service.\n\nPlease note: this endpoint cannot be used to shortlist bookable services. In order to shortlist bookable services on an existing referral please use [[HYPERLINK_A031]].\n\nA patient can request assistance at a service (e.g. a translator, transport or advocacy) when a shortlist is created within the e-RS web application, meaning that all services shortlisted would support the patient's additional requirements to attend.\n\nThe e-RS APIs do not currently support patients' additional requirements so you can neither specify services that support patients' additional requirements, arrange additional requirements for a patient, or view comments associated with the request for additional requirements.\n\nYou must consider if you are fully meeting the patient's additional requirement needs if there are additional requirements associated with the referral.\n\nIf you do not know whether the patient has an existing additional requirement need and the referral may have been shortlisted within the e-RS web application, be mindful that if you chose to amend the shortlist via changing the services, you could remove this patient need.\n\nIf you are changing services to send the patient to a triage service, the triaging service will not support additional requirements but will need to consider if the patient has any additional requirements as part of their decision for future care.\n\nYou can view additional requirements on a referral via the e-RS web application or by fetching [[HYPERLINK_A005]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral request in order to use this endpoint.\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\n## Important Notes\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. The availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications.\n\n## Use case\nAs an authenticated user\n\nI need to change the shortlist and refer the patient to a triage service for assessment\n\nSo that I can put the patient on the appropriate clinical pathway for the chosen service provider.\n\n## Related endpoints\nFor the referral to be processed by the service provider, you must ensure appropriate referral letter information has been added to the referral. You can add/manage referrer letter information by using [[HYPERLINK_A012]].\n\nYou can check to see what referral letter information has already been added to a referral by using [[HYPERLINK_A005]], [[HYPERLINK_A006]], and [[HYPERLINK_A007]] endpoints where necessary.\n\nYou can calculate the date when the patient will need to be contacted (by the triage service) using reference data from [[HYPERLINK_A004]].\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Change shortlist and send for triage (A032, FHIR STU3) [deprecated]", - "operationId": "a032-change-shortlist-and-send-for-triage", - "tags": [ - "Manage referral" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ChangeShortlistAndSendForTriage-Request-Parameters", - "type": "object", - "description": "Parameters provided when looking to change the services a referral has currently shortlisted", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Request-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Request-Parameters-1" - } - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `Shortlist` | `1..1` | Shortlist indicating the new service a referral should have shortlisted |\n| `IntentionToAddReferralLetter` | `1..1` | Flag indicating whether a referral letter is going to be added later or is already added | \n| `FirstReminderLetterFollowUpDays` | `1..1` | Time at which a reminder should be sent to remind the patient about the referral |\n", - "items": { - "anyOf": [ - { - "title": "Shortlist", - "description": "Parameter to supply a shortlist. When sending for triage, \nthe shortlist must contain exactly one service, and this must support the 'triage request flow'.\n", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "shortlist" - ], - "example": "shortlist" - }, - "resource": { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - } - } - }, - { - "title": "IntentionToAddReferralLetter", - "description": "Parameter to supply the intention to add referral letter flag", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "intentionToAddReferralLetter" - ], - "example": "intentionToAddReferralLetter" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralLetterIntention-1" - }, - "code": { - "type": "string", - "enum": [ - "NEED_TO_ADD_LATER", - "NOT_INTENDING_TO_ADD" - ], - "example": "NEED_TO_ADD_LATER" - } - } - } - } - }, - { - "title": "FirstReminderLetterFollowUpDays", - "description": "Parameter to supply the first reminder follow up days. When sending for triage, \nthe only acceptable value is 0, which means no follow up letter will be sent, \nas the patient does not need to book an appointment.\n", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "firstReminderLetterFollowUpDays" - ], - "example": "firstReminderLetterFollowUpDays" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 0 - } - } - } - ] - } - } - } - }, - "examples": { - "parameters": { - "summary": "Unbooked ReferralRequest", - "description": "Changing the service list of an unbooked `ReferralRequest` and sending to Triage", - "value": { - "$ref": "../../examples/changeShortlistAndSendForTriage/requests/MinimalRequest.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Referral updated with new service and sent for Triage", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-ChangeShortlistAndSendForTriage-Response-Parameters", - "type": "object", - "description": "Parameters provided when looking to change the services a referral has currently shortlisted", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Response-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ChangeShortlistAndSendForTriage-Response-Parameters-1" - } - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `updatedReferralRequest` | `1..1` | |\n| `createdAppointment` | `1..1` | | \n", - "items": { - "anyOf": [ - { - "title": "updatedReferralRequest", - "description": "Parameter containing the updated referral request", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "updatedReferralRequest" - ], - "example": "updatedReferralRequest" - }, - "resource": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - } - } - }, - { - "title": "createdAppointment", - "description": "Parameter containing the newly created appointment", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "createdAppointment" - ], - "example": "createdAppointment" - }, - "resource": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "unbookedReferralRequest": { - "summary": "TriagedReferralRequest", - "description": "Changing the service list of an unbooked `ReferralRequest` and send for Triage", - "value": { - "$ref": "../../../examples/changeShortlistAndSendForTriage/responses/MinimalRequest.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostic property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an active request. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/R4/HealthcareService/{id}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nA patient may have 0 to 20 services associated with a single referral. A service is a place where a referrer can send a patient or obtain clinical \nadvice concerning a specific patient. Services have attributes that can be used to understand a services functionality, terms of use, and contact \ninformation. \nYou can use this endpoint to obtain the current version and attributes of a single service.\n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified one service ID in order to use this endpoint.\n\n## Use case\nAs an authenticated user\n\nI would like to be able to see current service information\n\nSo that I can trust that the service information is correct for my patient's referral\n\n## Related endpoints\n - You can retrieve service IDs on a referral via [[HYPERLINK_A005]] as long as the referral has a shortlist containing at least a single service.\n - You can check if a cached service has changed via [[HYPERLINK_A037]].\n - You can retrieve the attributes of an entire shortlist of services (1-20) via [[HYPERLINK_A035]].\n\n## Known Issues\nThe HealthcareService.type attribute is being returned as a singular object by this endpoint. As per the [FHIR standard](https://hl7.org/fhir/R4/), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Service Id |\n| ------------------------------------------------------------------------ | ---------- |\n| `Service` and minimal attributes | `1` |\n| `Service` and its attributes | `2` |\n", - "summary": "Retrieve healthcare service (A033, FHIR R4)", - "operationId": "a033-retrieve-healthcare-service", - "tags": [ - "Retrieve healthcare service information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "name": "id", - "in": "path", - "description": "The ID of the service to be retrieved. It must be valid and relate to an existing Healthcare Service otherwise a HTTP 404 response will be returned.\n", - "required": true, - "schema": { - "type": "string", - "example": "1" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "Response contains the Healthcare Service requested.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Cache-Control": { - "description": "To specify the caching policies in client requests and server responses\n", - "required": false, - "schema": { - "type": "string", - "example": "no-cache" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-HealthcareService", - "description": "A e-referral service. The canonical URL: https://fhir.nhs.uk/StructureDefinition/eRS-HealthcareService", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "location", - "name" - ], - "properties": { - "id": { - "type": "string", - "example": "1" - }, - "meta": { - "type": "object", - "required": [ - "versionId" - ], - "properties": { - "versionId": { - "type": "string", - "example": "1" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "HealthcareService" - ], - "example": "HealthcareService" - }, - "extension": { - "type": "array", - "nullable": false, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| Extension-eRS-HoursOfOperation | 0..1 | Details the hours the current HealthcareService is operational |\n| Extension-eRS-HealthcareService-Contact | 0..* | Details any contact information for the HealthcareService |\n| Extension-eRS-ServiceInstructions | 0..1 | Outlines any specific instructions that should be followed around the HealthcareService |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-HoursOfOperation", - "description": "Extension to detail the hours of operation outlined for a HealthcareService.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" - ], - "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" - }, - "valueString": { - "type": "string", - "example": "9-5 Monday to Friday" - } - } - }, - { - "title": "Extension-eRS-HealthcareService-Contact", - "description": "Extension detailing the contact details for a HealthcareService", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" - ], - "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| purpose | 1..1 | Details who should be using the current contact method |\n| telecom | 1..* | Outlines the contact details to be used |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "purpose", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "purpose" - ], - "example": "purpose" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "enum": [ - "http://terminology.hl7.org/CodeSystem/contactentity-type", - "https://fhir.nhs.uk/CodeSystem/eRS-Purpose" - ], - "example": "http://terminology.hl7.org/CodeSystem/contactentity-type" - }, - "code": { - "type": "string", - "enum": [ - "BILL", - "ADMIN", - "HR", - "PAYOR", - "PATINF", - "PRESS", - "HEALTHCARE_PROFESSIONALS" - ], - "example": "PATINF" - }, - "display": { - "type": "string", - "enum": [ - "Billing", - "Administrative", - "Human Resource", - "Payor", - "Patient", - "Press", - "Healthcare Professionals" - ], - "example": "Patient" - } - } - } - } - } - } - } - }, - { - "type": "object", - "title": "telecom", - "required": [ - "url", - "valueContactPoint" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "telecom" - ], - "example": "telecom" - }, - "valueContactPoint": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "phone", - "email" - ], - "example": "phone" - }, - "value": { - "type": "string", - "example": "01235 209823" - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-ServiceInstructions", - "description": "Extension to detail any service instructions for a HealthcareService.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" - ], - "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" - }, - "valueString": { - "type": "string" - } - } - } - ] - } - }, - "location": { - "type": "array", - "items": { - "type": "object", - "properties": { - "identifier": { - "description": "Reference detailing the location a service is based within.", - "type": "object", - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-site-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-site-code" - }, - "value": { - "type": "string", - "example": "R6901" - } - } - } - } - } - }, - "name": { - "type": "string", - "example": "Direct SVC 1", - "description": "Name of the current HealthcareService within eRS" - }, - "type": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" - ], - "example": "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" - }, - "code": { - "type": "string", - "enum": [ - "DAY_CASE", - "FIRST_OUTPATIENT", - "ASSESSMENT_SERVICE", - "GPSI", - "AHP_CLINIC", - "DIAGNOSTIC", - "NURSE_CLINIC", - "OPHTHALMOLOGIST", - "TELEPHONE_ASSESSMENT" - ], - "example": "DAY_CASE" - }, - "display": { - "type": "string", - "enum": [ - "Day Case", - "First Outpatient", - "Assessment Service", - "GPSI", - "AHP Clinic", - "Diagnostic", - "Nurse Clinic", - "Ophthalmologist", - "Telephone Assessment" - ], - "example": "Day Case" - } - } - } - } - } - } - }, - "characteristic": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-RequestFlowType", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" - ], - "example": "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" - }, - "code": { - "type": "string", - "enum": [ - "BOOKABLE", - "REVIEW", - "ADVICE_AND_GUIDANCE" - ], - "example": "BOOKABLE" - }, - "display": { - "enum": [ - "A service which supports a patient appointment", - "A service that reviews referrals, without the support or need for any appointment with the patient to be made", - "A service which can discuss the patient and receive guidance rather than a patient attending an appointment" - ], - "example": "A service which supports a patient appointment" - } - } - }, - { - "type": "object", - "title": "eRS-BookableType", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" - ], - "example": "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" - }, - "code": { - "type": "string", - "enum": [ - "DIRECTLY_BOOKABLE", - "INDIRECTLY_BOOKABLE" - ], - "example": "DIRECTLY_BOOKABLE" - }, - "display": { - "enum": [ - "Directly Bookable", - "Indirectly Bookable" - ], - "example": "Directly Bookable" - } - } - } - ] - } - } - } - } - } - } - }, - "examples": { - "single-service-minimal": { - "summary": "Service and minimal attributes.", - "value": { - "$ref": "../../../examples/getService/responses/sampleServiceWithMinimumAttributes.json" - } - }, - "single-service": { - "summary": "Service and its attributes.", - "value": { - "$ref": "../../../examples/getService/responses/sampleServiceWithFullAttributes.json" - } - } - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "ACCESS_DENIED" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_FORBIDDEN" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-found", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_FOUND" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-supported", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_ACCEPTABLE" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "429": { - "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "throttled", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "TOO_MANY_REQUESTS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "500": { - "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_SERVER_ERROR" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_UNAVAILABLE" - } - ] - } - } - ] - } - } - } - } - } - }, - "head": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nA Patient may have 0 to 20 services associated with a single referral. \nA service is a place where a referrer can send a patient or obtain clinical advice concerning a specific patient.\n\nYou can use this endpoint to obtain the current service's \"version\" held in e-RS, in order to compare to a locally cached version. \n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified one service ID in order to use this endpoint.\n\n## Use case\nAs an authenticated user\n\nI would like to be able to see the current information about a service on my patients current shortlist\n\nSo that I can review and trust the information is still valid within the context of my patients needs\n\n## Related endpoints\n - You can obtain Service IDs on a referral via [[HYPERLINK_A005]] as long as the referral has a shortlist containing at least one service.\n - You can retrieve a set of services and their attributes via [[HYPERLINK_A035]].\n - You can fetch the attributes of a single service via [[HYPERLINK_A033]].\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Service Id |\n| ------------------------------------------------------------------------ | ---------- |\n| Get `Service` Version | `1` |\n", - "summary": "Retrieve healthcare service version (A037, FHIR R4)", - "operationId": "a037-retrieve-healthcare-service-version", - "tags": [ - "Retrieve healthcare service information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "name": "id", - "in": "path", - "description": "The ID of the service to be retrieved. It must be valid and relate to an existing Healthcare Service otherwise a HTTP 404 response will be returned.\n", - "required": true, - "schema": { - "type": "string", - "example": "1" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "responses": { - "200": { - "description": "Response doesn't contain the payload. But the current version of the Healthcare Service is in the ETag Response Header.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "cache-control": { - "description": "To specify the caching policies in client requests and server responses\n", - "required": false, - "schema": { - "type": "string", - "example": "no-cache" - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "ACCESS_DENIED" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_RELATIONSHIP | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The caller has no legitimate relationship with the resource. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_FORBIDDEN" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-found", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_FOUND" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "429": { - "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "throttled", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "TOO_MANY_REQUESTS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "500": { - "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_SERVER_ERROR" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_UNAVAILABLE" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/Appointment/{id}": { - "put": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to cancel an appointment that is booked into a directly-bookable service. Appointments made to directly-bookable services always have a date and time. You can only ever update the current appointment, i.e. an appointment that is related to a service on the current shortlist *and* the most recent appointment made.\n\nCurrently, this endpoint only allows cancellation of an appointment as an update. Future developments may permit further updates.\n\nTo cancel the referral, use [[HYPERLINK_A036]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n\nYou must use [[HYPERLINK_A004]] to retrieve reference data from the set `APPOINTMENT-CANCELLATION-REASON`.\n\nTo find out which reference data from this set can be used to cancel an appointment, filter as follows:\n\n - *usage* must be `CANCEL`,\n - *businessFunction* must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action),\n - *effectiveFrom* must be in the past, and\n - *effectiveTo* must not be in the past\n\nBoth the appointment reference, and version, are needed to update an appointment:\n\nYou must use [[HYPERLINK_A005]] to obtain the current appointment reference (via *Extension-eRS-Appointment-Reference-1*).\n\nYou must use [[HYPERLINK_A038]] to obtain the current appointment and get the current appointment's version. \n\n## Use case\nAs an authenticated user\n\nI need to update the current appointment\n\nSo that I can manage the patients care appropriately. \n\n## Related endpoints\nYou can retrieve the reference data needed to cancel an appointment by using [[HYPERLINK_A004]]. This contains \"reasons\" for cancellation.\n\nYou can check if you currently can cancel the appointment by checking [[HYPERLINK_A029]].\n\nYou must use [[HYPERLINK_A005]] to obtain the current appointment reference (via *Extension-eRS-Appointment-Reference-1*) .\n\nYou must use [[HYPERLINK_A038]] to obtain the current appointment and get the current appointment's version. \n\nYou can use [[HYPERLINK_A031]] after updating an appointment, to create a new shortlist of services. After changing a shortlist, you may be able to [[HYPERLINK_A016]]. \n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n", - "summary": "Update appointment (A034, FHIR STU3)", - "operationId": "a034-update-appointment", - "tags": [ - "Change appointment" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "id", - "in": "path", - "description": "The ID of the appointment to be supplied. It must be valid and relate to an existing Appointment Id otherwise a HTTP 404 response will be returned.\n", - "required": true, - "schema": { - "type": "string", - "example": "70000" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - "examples": { - "minimal-cancellation-reason-only": { - "summary": "Minimal Cancellation - Only Reason Provided (when a cancellation comment is not mandatory)", - "value": { - "$ref": "../../examples/updateAppointment/requests/MinimalCancellationReasonOnlyCommentNotMandatory.json" - } - }, - "cancellation-reason-and-comment": { - "summary": "Reason and Comment Provided", - "value": { - "$ref": "../../examples/updateAppointment/requests/CancellationReasonAndMandatoryComment.json" - } - }, - "cancellation-reason-only-comment-mandatory": { - "summary": "Only Reason Provided (when a cancellation comment is mandatory)", - "value": { - "$ref": "../../examples/updateAppointment/requests/CancellationReasonOnlyCommentMandatory.json" - } - }, - "unauthorised-cancellation-reason": { - "summary": "Unauthorised Cancellation Reason", - "value": { - "$ref": "../../examples/updateAppointment/requests/CancellationInvalidReason.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "An appointment within e-RS.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - "examples": { - "minimal-cancellation-reason-only": { - "summary": "Minimal Cancellation - Only Reason Provided (when a cancellation comment is not mandatory)", - "value": { - "$ref": "../../../examples/updateAppointment/responses/MinimalCancellationReasonOnlyCommentNotMandatory.json" - } - }, - "cancellation-reason-and-comment": { - "summary": "Reason and Comment Provided", - "value": { - "$ref": "../../../examples/updateAppointment/responses/CancellationReasonAndMandatoryComment.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "412": { - "description": "Precondition Failed - Mandatory data is missing" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_STATE | A note describing that the Request is not in the correct state should be returned to the caller. |\n| INVALID_VALUE | Reason provided is not a valid Cancellation Reason. |\n| INAPPROPRIATE_VALUE | Reason provided is not a valid in this case. |\n| MISSING_VALUE | Part of early validation that checks that the input conforms with the specifications of the FHIR profiles. A field defined as Mandatory on the FHIR profile is not provided. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| NO_RELATIONSHIP | No legitimate relationship with referral (UBRN). |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| UNABLE_TO_CANCEL_APPOINTMENT | Unable to cancel the appointment. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "examples": { - "cancellation-reason-only-comment-mandatory": { - "summary": "Only Reason Provided (when a cancellation comment is mandatory)", - "value": { - "$ref": "../../../examples/updateAppointment/responses/CancellationReasonOnlyCommentMandatory.json" - } - }, - "unauthorised-cancellation-reason": { - "summary": "Unauthorised Cancellation Reason", - "value": { - "$ref": "../../../examples/updateAppointment/responses/CancellationInvalidReason.json" - } - } - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Where status code 502 (Bad Gateway) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_RESPONDED_WITH_ERROR | Error received from PAS. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "PAS_RESPONDED_WITH_ERROR", - "display": "Error received from PAS" - } - ] - }, - "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: ERROR" - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - }, - "504": { - "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "timeout", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "PAS_NOT_RESPONDING", - "display": "No response from PAS" - } - ] - }, - "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" - } - ] - } - } - } - } - } - }, - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to retrieve the current version of an appointment. An appointment is made to a service so a patient can be seen or for the referral to be reviewed, prior to care.\n\nA referral may, or may not, have an appointment and an appointment will always relate to a specific referral.\n\nIt is possible to have more than one appointment during the life of the referral, but never concurrent appointments. This endpoint only returns the current appointment and does not support historic views.\n\nThe outcome of a referral review can be recorded on an appointment. Cancellation or maintenance of an appointment (such as the intent to cancel the current appointment and book another one later) are recorded against the current appointment.\n\ne-RS currently supports a number of appointment scenarios:\n\n - Where a booking has been made to a directly-bookable service (DBS)\n - Where a deferred booking is made when a slot could not be found at a directly-bookable service. In this case, the service \"books\" the appointment\n - Where a booking has been made to a indirectly-bookable service (IBS)\n - Where a review is required by a triage service\n - Where a review has been conducted by a triage service\n - Where a service has rejected, or accepted an appointment\n - Where an appointment has been cancelled, and no further action is possible\n - Where an appointment is currently cancelled, but a future appointment may be made by a service later\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of a referral in order to retrieve details of an appointment that it relates to.\n\nNote: e-RS only supports the retrieval of the most recent version of Appointment. You cannot retrieve earlier versions.\n\n## Use case\n\nAs an authenticated user\n\nI want to read details of an appointment\n\nSo that I can decide what further action may be needed.\n\n## Related endpoints\nNote that in some cases below, an appointment forms part of the referral returned.\n\nYou can always retrieve the current version of an existing appointment via [[HYPERLINK_A005]].\n\nWhen successfully accepting an appointment, the accepted appointment is returned via [[HYPERLINK_A013]].\n\nWhen successfully rejecting an appointment, the rejected appointment is returned via [[HYPERLINK_A014]].\n\nWhen booking an appointment to a directly bookable service, deferring the booking responsibility to a directly bookable service, or referring a patient into a triage service, an \"appointment\" is returned via [[HYPERLINK_A016]].\n\nWhen successfully cancelling an appointment, to action it later, the cancelled appointment is returned via [[HYPERLINK_A022]].\n\nWhen converting an advice and guidance to a referral, if the referral has an appointment, it will be returned via [[HYPERLINK_A027]].\n\nHaving successfully reviewed a referral, details of that review are shown on the appointment returned via [[HYPERLINK_A028]].\n\nYou will need the appointment version when using [[HYPERLINK_A034]], which can be obtained from [[HYPERLINK_A038]].\n\nIf an appointment is cancelled as part of [[HYPERLINK_A036]], an appointment will be returned as part of a successful response.\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| --------------------------------------------------------------------------------------------------------- | ----------------------- |\n| `Appointment` booked to directly-bookable service | `appointmentId`=`70000` |\n| `Appointment` booked to indirectly-bookable service | `appointmentId`=`70001` |\n| `Appointment` deferred to service provider for booking | `appointmentId`=`70002` |\n| `Appointment` sent for triage | `appointmentId`=`70003` |\n| `Appointment` triage response (Record Triage Outcome) | `appointmentId`=`70004` |\n| `Appointment` Cancel Appointment, Action Later | `appointmentId`=`70005` |\n| `Appointment` cancelled | `appointmentId`=`70006` |\n| `Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service | `appointmentId`=`70007` |\n", - "summary": "Retrieve appointment (A038, FHIR STU3)", - "operationId": "a038-retrieve-appointment", - "tags": [ - "Change appointment" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "id", - "in": "path", - "description": "The ID of the appointment to be supplied. It must be valid and relate to an existing Appointment Id otherwise a HTTP 404 response will be returned.\n", - "required": true, - "schema": { - "type": "string", - "example": "70000" - } - } - ], - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - "examples": { - "booked-dbs": { - "summary": "`Appointment` booked to directly-bookable service", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/BookedDBS.json" - } - }, - "booked-ibs": { - "summary": "`Appointment` booked to indirectly-bookable service", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/BookedIBS.json" - } - }, - "deferred-to-provider": { - "summary": "`Appointment` deferred to service provider for booking", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/AppointmentDeferral.json" - } - }, - "deferred-to-triage": { - "summary": "`Appointment` sent for triage", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/TriageDeferral.json" - } - }, - "triage-response": { - "summary": "`Appointment` triage response (Record Triage Outcome)", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/TriageResponse.json" - } - }, - "cancel-appointment-action-later": { - "summary": "`Appointment` Cancel Appointment, Action Later", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/CAAL.json" - } - }, - "cancelled": { - "summary": "`Appointment` cancelled", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/Cancelled.json" - } - }, - "converted-and-booked": { - "summary": "`Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/AandGConvertedToDBS.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/Appointment/{id}/_history/{version}": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to retrieve a specific version of an `Appointment`.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nThe pre-requisites for this endpoint are the same as for endpoint [[HYPERLINK_A038]].\n\nNote: e-RS only supports the retrieval of the most recent version of an `Appointment`. You cannot retrieve earlier versions.\n\n## Use case\n\nSee [[HYPERLINK_A038]].\n\n## Related endpoints\n\nSee [[HYPERLINK_A038]].\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Request |\n| --------------------------------------------------------------------------------------------------------- | -------------------------------------- |\n| `Appointment` booked to directly-bookable service | `appointmentId`=`70000`, `version`=`5` |\n| `Appointment` booked to indirectly-bookable service | `appointmentId`=`70001`, `version`=`5` |\n| `Appointment` deferred to service provider for booking | `appointmentId`=`70002`, `version`=`5` |\n| `Appointment` sent for triage | `appointmentId`=`70003`, `version`=`5` |\n| `Appointment` triage response (Record Triage Outcome) | `appointmentId`=`70004`, `version`=`5` |\n| `Appointment` Cancel Appointment, Action Later | `appointmentId`=`70005`, `version`=`5` |\n| `Appointment` cancelled | `appointmentId`=`70006`, `version`=`5` |\n| `Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service | `appointmentId`=`70007`, `version`=`5` |\n", - "summary": "Retrieve appointment (versioned) (A038, FHIR STU3)", - "operationId": "a038-retrieve-appointment-versioned", - "tags": [ - "Change appointment" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "id", - "in": "path", - "description": "The ID of the appointment to be supplied. It must be valid and relate to an existing Appointment Id otherwise a HTTP 404 response will be returned.\n", - "required": true, - "schema": { - "type": "string", - "example": "70000" - } - }, - { - "name": "version", - "in": "path", - "description": "The version of the resource to be retrieved. It must be the latest version of the resource otherwise\n`HISTORY_NOT_SUPPORTED` error will be returned (HTTP 404 Not Found).\n", - "required": true, - "schema": { - "type": "string", - "example": "5" - } - } - ], - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "ETag": { - "description": "Record version identifier enclosed in quotes and preceded by 'W/'. For example, `W/\"2\"`.\n\nThis Weak ETag corresponds to `meta.versionId` attribute in the resource body.\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"2\"" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - "examples": { - "booked-dbs": { - "summary": "`Appointment` booked to directly-bookable service", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/BookedDBS.json" - } - }, - "booked-ibs": { - "summary": "`Appointment` booked to indirectly-bookable service", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/BookedIBS.json" - } - }, - "deferred-to-provider": { - "summary": "`Appointment` deferred to service provider for booking", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/AppointmentDeferral.json" - } - }, - "deferred-to-triage": { - "summary": "`Appointment` sent for triage", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/TriageDeferral.json" - } - }, - "triage-response": { - "summary": "`Appointment` triage response (Record Triage Outcome)", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/TriageResponse.json" - } - }, - "cancel-appointment-action-later": { - "summary": "`Appointment` Cancel Appointment, Action Later", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/CAAL.json" - } - }, - "cancelled": { - "summary": "`Appointment` cancelled", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/Cancelled.json" - } - }, - "converted-and-booked": { - "summary": "`Appointment` converted from an Advice and Guidance Request and booked to a directly-bookable service", - "value": { - "$ref": "../../../examples/retrieveAppointment/responses/AandGConvertedToDBS.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/R4/HealthcareService": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nA Patient may have 0 to 20 Services associated with a single referral. \nA service is a place where a referrer can send a patient or obtain clinical advice concerning a specific patient. \nYou can use this endpoint to obtain a set of services (up to 20) and their associated attributes, in a single call. \n\n## Supported security patterns\n- Application-restricted, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n### Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Referring Organisation.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified at least one service ID in order to use this endpoint.\n\n## Use case\nAs an authenticated user\n\nI would like to obtain information about all services on my patient's current shortlist\n\nSo that I can review the entire shortlist of services and each service's current attributes\n\n## Related endpoints\n - You can retrieve service IDs on a referral via [[HYPERLINK_A005]] as long as the referral has a shortlist of at least one service.\n - You can check if a cached service has changed via [[HYPERLINK_A037]].\n - You can fetch the attributes of a single service via [[HYPERLINK_A033]].\n\n## Known Issues\nThe HealthcareService.type attribute is being returned as a singular object by this endpoint. As per the [FHIR standard](https://hl7.org/fhir/R4/), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | Service Id |\n| ------------------------------------------------------------------------------------------------------------- | ---------- |\n| Search for multiple service with minimal attributes | `1,2` |\n| Search for multiple service max and min attributes | `3`,`4` |\n| Search for multiple service, where the service IDs are formatted correctly, but none of the service IDs match | `5`,`6` |\n", - "summary": "Search for healthcare services (A035, FHIR R4)", - "operationId": "a035-search-for-healthcare-services", - "tags": [ - "Retrieve healthcare service information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "query", - "name": "_id", - "description": "One or many service ID(s) to include as part of the search. Must be supplied, otherwise a 400 response will be returned.\n", - "required": true, - "schema": { - "type": "string", - "example": "1,2" - } - } - ], - "responses": { - "200": { - "description": "Bundle resource containing the `eRS-HealthcareService` resources associated to the supplied search criteria. \nThe canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle \n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "Bundle resource containg healthcare services", - "type": "object", - "required": [ - "id", - "meta", - "type", - "timestamp", - "total", - "link" - ], - "properties": { - "id": { - "type": "string", - "example": "123e4567-e89b-12d3-a456-426614174000" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "type": { - "type": "string", - "enum": [ - "searchset" - ], - "example": "searchset" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.00Z" - }, - "total": { - "description": "The total number of HeatlhcareServices that matched the supplied search critera", - "type": "integer", - "example": 1 - }, - "link": { - "type": "array", - "items": { - "type": "object", - "required": [ - "relation", - "url" - ], - "properties": { - "relation": { - "type": "string", - "enum": [ - "self" - ], - "example": "self" - }, - "url": { - "type": "string", - "example": "_baseUrl_/R4/HealthcareService?_id=1,2" - } - } - } - }, - "entry": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `HealthcareService` | `0..*` | | \n", - "items": { - "title": "HealthcareService", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/R4/HealthcareService/1" - }, - "resource": { - "title": "eRS-HealthcareService", - "description": "A e-referral service. The canonical URL: https://fhir.nhs.uk/StructureDefinition/eRS-HealthcareService", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "location", - "name" - ], - "properties": { - "id": { - "type": "string", - "example": "1" - }, - "meta": { - "type": "object", - "required": [ - "versionId" - ], - "properties": { - "versionId": { - "type": "string", - "example": "1" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "HealthcareService" - ], - "example": "HealthcareService" - }, - "extension": { - "type": "array", - "nullable": false, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| Extension-eRS-HoursOfOperation | 0..1 | Details the hours the current HealthcareService is operational |\n| Extension-eRS-HealthcareService-Contact | 0..* | Details any contact information for the HealthcareService |\n| Extension-eRS-ServiceInstructions | 0..1 | Outlines any specific instructions that should be followed around the HealthcareService |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-HoursOfOperation", - "description": "Extension to detail the hours of operation outlined for a HealthcareService.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" - ], - "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HoursOfOperation" - }, - "valueString": { - "type": "string", - "example": "9-5 Monday to Friday" - } - } - }, - { - "title": "Extension-eRS-HealthcareService-Contact", - "description": "Extension detailing the contact details for a HealthcareService", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" - ], - "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-HealthcareService-Contact" - }, - "extension": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- |\n| purpose | 1..1 | Details who should be using the current contact method |\n| telecom | 1..* | Outlines the contact details to be used |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "purpose", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "purpose" - ], - "example": "purpose" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "enum": [ - "http://terminology.hl7.org/CodeSystem/contactentity-type", - "https://fhir.nhs.uk/CodeSystem/eRS-Purpose" - ], - "example": "http://terminology.hl7.org/CodeSystem/contactentity-type" - }, - "code": { - "type": "string", - "enum": [ - "BILL", - "ADMIN", - "HR", - "PAYOR", - "PATINF", - "PRESS", - "HEALTHCARE_PROFESSIONALS" - ], - "example": "PATINF" - }, - "display": { - "type": "string", - "enum": [ - "Billing", - "Administrative", - "Human Resource", - "Payor", - "Patient", - "Press", - "Healthcare Professionals" - ], - "example": "Patient" - } - } - } - } - } - } - } - }, - { - "type": "object", - "title": "telecom", - "required": [ - "url", - "valueContactPoint" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "telecom" - ], - "example": "telecom" - }, - "valueContactPoint": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "phone", - "email" - ], - "example": "phone" - }, - "value": { - "type": "string", - "example": "01235 209823" - } - } - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-ServiceInstructions", - "description": "Extension to detail any service instructions for a HealthcareService.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" - ], - "example": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-ServiceInstructions" - }, - "valueString": { - "type": "string" - } - } - } - ] - } - }, - "location": { - "type": "array", - "items": { - "type": "object", - "properties": { - "identifier": { - "description": "Reference detailing the location a service is based within.", - "type": "object", - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-site-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-site-code" - }, - "value": { - "type": "string", - "example": "R6901" - } - } - } - } - } - }, - "name": { - "type": "string", - "example": "Direct SVC 1", - "description": "Name of the current HealthcareService within eRS" - }, - "type": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" - ], - "example": "https://fhir.nhs.uk/CodeSystem/eRS-AppointmentType" - }, - "code": { - "type": "string", - "enum": [ - "DAY_CASE", - "FIRST_OUTPATIENT", - "ASSESSMENT_SERVICE", - "GPSI", - "AHP_CLINIC", - "DIAGNOSTIC", - "NURSE_CLINIC", - "OPHTHALMOLOGIST", - "TELEPHONE_ASSESSMENT" - ], - "example": "DAY_CASE" - }, - "display": { - "type": "string", - "enum": [ - "Day Case", - "First Outpatient", - "Assessment Service", - "GPSI", - "AHP Clinic", - "Diagnostic", - "Nurse Clinic", - "Ophthalmologist", - "Telephone Assessment" - ], - "example": "Day Case" - } - } - } - } - } - } - }, - "characteristic": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-RequestFlowType", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" - ], - "example": "https://fhir.nhs.uk/CodeSystem/eRS-RequestFlowType" - }, - "code": { - "type": "string", - "enum": [ - "BOOKABLE", - "REVIEW", - "ADVICE_AND_GUIDANCE" - ], - "example": "BOOKABLE" - }, - "display": { - "enum": [ - "A service which supports a patient appointment", - "A service that reviews referrals, without the support or need for any appointment with the patient to be made", - "A service which can discuss the patient and receive guidance rather than a patient attending an appointment" - ], - "example": "A service which supports a patient appointment" - } - } - }, - { - "type": "object", - "title": "eRS-BookableType", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" - ], - "example": "https://fhir.nhs.uk/CodeSystem/eRS-BookableType" - }, - "code": { - "type": "string", - "enum": [ - "DIRECTLY_BOOKABLE", - "INDIRECTLY_BOOKABLE" - ], - "example": "DIRECTLY_BOOKABLE" - }, - "display": { - "enum": [ - "Directly Bookable", - "Indirectly Bookable" - ], - "example": "Directly Bookable" - } - } - } - ] - } - } - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "match" - ], - "example": "match" - } - } - } - } - } - } - } - }, - "examples": { - "multiple-services-minimal": { - "summary": "Search for multiple service with minimal attributes.", - "value": { - "$ref": "../../../examples/searchForServices/responses/searchServiceWithMinmumalAttributes.json" - } - }, - "multiple-services-max-min": { - "summary": "Search for multiple service max and min attributes.", - "value": { - "$ref": "../../../examples/searchForServices/responses/searchServiceWithMaxAndMinAttributes.json" - } - }, - "multiple-services-empty": { - "summary": "Search for multiple service, where the service IDs are formatted correctly, but none of the service IDs match", - "value": { - "$ref": "../../../examples/searchForServices/responses/searchServiceWithEmptyResponse.json" - } - } - } - } - } - }, - "400": { - "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------|\n| REC_BAD_REQUEST | invalid | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | Incorrect or missing expected value. For example; Service Id is invalid or missing, or an an attempt to request more than 20 Service Ids |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "invalid", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_BAD_REQUEST" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "ACCESS_DENIED" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_RELATIONSHIP | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The caller has no legitimate relationship with the resource. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_FORBIDDEN" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Where status code 404 (Not Found) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------- |\n| REC_NOT_FOUND | not-found | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The supplied URL or Resource does not exist on the server. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-found", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_FOUND" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-supported", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_ACCEPTABLE" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "429": { - "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "throttled", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "TOO_MANY_REQUESTS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "500": { - "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_SERVER_ERROR" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_UNAVAILABLE" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/ReferralRequest/{ubrn}/$ers.cancelReferral": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\nUse this endpoint to cancel a referral and the current appointment, if there is one. Cancelling a referral is a one-way process and results in an end-state. No further progression of care can occur once this action has been performed.\n\nA reason for cancelling an appointment must be provided. A comment on the cancellation is conditionally mandatory depending on the reason selected. See pre-requisites and related referrals for more information.\n\nYou can check if you can cancel a referral by calling [[HYPERLINK_A029]].\n\ne-RS does not allow a referral to be cancelled, without also cancelling the current appointment. Therefore, if there is a current appointment associated with the referral, this *must* be cancelled in advance, or at the same time.\n\nIn order to cancel (only) an appointment you must use [[HYPERLINK_A034]].\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n- Application-restricted, unattended access\n\n## Pre-requisites\n### Application-restricted, unattended access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\nTo access this endpoint in application-restricted, unattended mode, you will be required to submit your use case for review. The only use case currently permitted is for non-clinical provider actions.\n\n### Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n- `SERVICE_PROVIDER_CLINICIAN`\n- `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou must use [[HYPERLINK_A004]] to retrieve a list of reference data, which detail the reason the cancellation is being performed. You can only use reference data from the set `REFERRAL-CANCELLATION-REASON`.\n\n\nTo find out which reference data from this set can be used, the following filters can be used depending on the cancellation scenario:\n\n***1. I want to cancel the referral and the current appointment as a Referrer***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `canCancelAppointment` must be true, and\n\n * `effectiveFrom` must be in the past, and \n\n * if provided, `effectiveTo` must **not** be in the past\n\n\n***2. I want to cancel a referral, for which there is no current appointment as a Referrer***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `REFERRING_CLINICIAN` or `REFERRING_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `canCancelAppointment` could be true or false, and\n\n * `effectiveFrom` must be in the past, and\n\n * if provided, `effectiveTo` must **not** be in the past\n\n***3. I want to cancel the referral and the current appointment as a Service Provider***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `SERVICE_PROVIDER_CLINICIAN` or `SERVICE_PROVIDER_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `appointmentRequestCancellationReasonType` must be `PROVIDER` and `PATIENT`, and\n\n * `canCancelAppointment` must be true, and\n\n * `effectiveFrom` must be in the past, and \n\n * `effectiveTo` must **not** be in the past\n\n***4. I want to cancel a referral, for which there is no current appointment as a Service Provider***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `SERVICE_PROVIDER_CLINICIAN` or `SERVICE_PROVIDER_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `appointmentRequestCancellationReasonType` must be `PROVIDER` and `PATIENT`, and\n\n * `canCancelAppointment` could be true or false, and\n\n * `effectiveFrom` must be in the past, and \n\n * `effectiveTo` must **not** be in the past\n\n***5. I want to cancel the triage referral as a Service Provider***\n\n* Obtain reference data from `REFERRAL-CANCELLATION-REASON` and filter:\n\n * `referrerUsage` must be `CANCEL_REFERRAL`, and\n\n * `businessFunction` must be `SERVICE_PROVIDER_CLINICIAN` or `SERVICE_PROVIDER_CLINICIAN_ADMIN` (depending which authenticated user will be performing the action), and\n\n * `appointmentRequestCancellationReasonType` must be `PROVIDER_TRIAGE`, and\n\n * `effectiveFrom` must be in the past, and \n\n * `effectiveTo` must **not** be in the past\n\nYou need to use [[HYPERLINK_A005]] to retrieve details of the referral in order to make this clinical decision.\n\n## Important note when retrieving attachments\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code.\n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A005]] and [[HYPERLINK_A042]] specifications. \n\n## Important notes when providing an appointment request cancellation reason\n\nWhen cancelling a referral as a Service Provider Clinician:\n\n * If the referral is in the **\"Triaged - Provider to action\"** state, the cancellation reason must be an **Appointment Request End Triage Reason** type.\n\n * If the referral is **not** in that state, the cancellation reason must be a **Provider Appointment Request Cancellation Reason** or **Patient Appointment Request Cancellation Reason** type.\n\n## Use case\nAs an authenticated user\n\nI need to cancel a referral, and any active appointments\n\nSo that the referral is no longer processed\n\n## Related endpoints\nYou can retrieve the reference data needed to cancel a referral by using [[HYPERLINK_A004]]. This contains \"reasons\" for cancellation.\n\nYou can check if you can cancel the referral by checking [[HYPERLINK_A029]].\n\nYou can use [[HYPERLINK_A005]] to obtain a current appointment reference, if there is one. This endpoint will also provide you with the current UBRN version.\n\nYou can use [[HYPERLINK_A038]] to view the current appointment (where applicable).\n\n## Known Issues\n\n1. The Participant.type attribute is being mapped as a single type for this endpoint. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be an array. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n2. The participant of an Appointment references a value set. As per the Appointment [FHIR profile](https://hl7.org/fhir/STU3/appointment-definitions.html#Appointment.participant.type), this attribute should be a coding system. See our [problems and fixes](https://digital.nhs.uk/services/e-referral-service/api/updates-and-releases/problems-and-fixes) section for more information.\n\n## Sandbox test scenarios\n\nYou can test the following scenarios in our sandbox environment:\n\n| Scenario | Request details |\n| ------------------------------------------------------------------------ | ------------------------------------- |\n| Reason for Cancellation without Comment (Comment Not Mandatory) | Intend Private With No Comment |\n| Reason for Cancellation with Comment (Comment Mandatory) | Patient Cancellation With Comment |\n| Cancelled Referral | Raised in Error |\n| Cancelled Appointment and Referral | Referrer Cancellation |\n| Cancelled Referral After Prior Appointment Cancellation | Treatment No Longer Required |\n| Cancelled Referral with Existing Review Outcome | Intend Private With Comment |\n| Cancelled Referral (Provider) without Comment (Comment Not Mandatory) | Provider Cancellation With No Comment |\n| Cancelled Referral with Triage Response | Provider Cancellation via End Triage |\n", - "summary": "Cancel referral (A036, FHIR STU3)", - "operationId": "a036-cancel-referral", - "tags": [ - "Manage referral" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the referral request\n", - "required": true, - "schema": { - "type": "string", - "example": "000000070000" - } - }, - { - "in": "header", - "name": "If-Match", - "description": "The version of the resource to be updated\n", - "required": true, - "schema": { - "type": "string", - "pattern": "^W/\"[0-9]+\"$", - "example": "W/\"4\"" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CancelReferral-Request-Parameters", - "type": "object", - "description": "Parameters containing the cancellation reason and comment for referral cancellation request.", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Request-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Request-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ------------------------------------------ |\n| `cancellationReason` | `1..1` | The reason why the referral is being cancelled |\n| `cancellationComments` | `0..1` | This may be mandatory if mandatory comment indicator is set to 'Yes' for the Cancellation Reason Type selected. Maximum 2000 characters. |\n", - "items": { - "anyOf": [ - { - "title": "cancellationReason", - "description": "Parameter to supply a cancellationReason", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "cancellationReason" - ], - "example": "cancellationReason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "INTEND_PRIVATE" - } - } - } - } - }, - { - "title": "cancellationComments", - "description": "Parameter to supply the cancellationComments", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "cancellationComments" - ], - "example": "cancellationComments" - }, - "valueString": { - "type": "string", - "example": "Patient will go to a private clinic" - } - } - } - ] - } - } - } - }, - "examples": { - "cancel-referral-without-comment": { - "summary": "Reason for Cancellation without Comment (Comment Not Mandatory)", - "value": { - "$ref": "../../examples/cancelReferral/requests/IntendPrivateWithoutComment.json" - } - }, - "cancel-referral-patient-cancellation": { - "summary": "Reason for Cancellation with Comment (Comment Mandatory)", - "value": { - "$ref": "../../examples/cancelReferral/requests/PatientRequestCancellationOther.json" - } - }, - "cancel-referral-raised-in-error": { - "summary": "Cancelled Referral", - "value": { - "$ref": "../../examples/cancelReferral/requests/RaisedInError.json" - } - }, - "cancel-referral-referrer-cancellation": { - "summary": "Cancelled Appointment and Referral", - "value": { - "$ref": "../../examples/cancelReferral/requests/ReferrerCancellation.json" - } - }, - "cancel-referral-no-longer-required": { - "summary": "Cancelled Referral After Prior Appointment Cancellation", - "value": { - "$ref": "../../examples/cancelReferral/requests/NoLongerRequired.json" - } - }, - "cancel-referral-with-reason-and-comment": { - "summary": "Cancelled Referral with Existing Review Outcome", - "value": { - "$ref": "../../examples/cancelReferral/requests/IntendPrivateWithComment.json" - } - }, - "cancel-referral-provider-without-comment": { - "summary": "Cancelled Referral (Provider) without Comment (Comment Not Mandatory)", - "value": { - "$ref": "../../examples/cancelReferral/requests/bookedOutsideCabWithoutComment.json" - } - }, - "cancel-referral-with-triage-response": { - "summary": "Cancelled Referral with Triage Response", - "value": { - "$ref": "../../examples/cancelReferral/requests/outpatientService.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "e-RS Referral Request", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CancelReferral-Response-Parameters", - "type": "object", - "description": "Parameters containing for the cancelled referral with/without cancelled appointment.", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Response-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CancelReferral-Response-Parameters-1" - } - } - } - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------- |\n| `updatedReferralRequest` | `1..1` | Cancelled Referral Request . |\n| `updatedAppointment` | `0..1` | The cancelled appointment resource is only returned if appointment was cancelled part of this cancel referral operation.|\n", - "items": { - "anyOf": [ - { - "title": "updatedReferralRequest", - "description": "Parameter containing the cancelled referral request", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "updatedReferralRequest" - ], - "example": "updatedReferralRequest" - }, - "resource": { - "title": "eRS-ReferralRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "subject", - "supportingInfo", - "intent", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ReferralRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ReferralRequest" - ], - "example": "ReferralRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `eRS-Appointment` | `0..1` | |\n| `DocumentReference` | `0..*` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ----------------------------------------------------------------------- |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-Commissioning-Rule-Org` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ReferralState` | `1..1` | |\n| `Extension-eRS-Appointment` | `0..1` | |\n| `Extension-eRS-ClinicalInfoFirstSubmitted` | `0..1` | |\n| `Extension-eRS-ClinicalInfoLastUpdated` | `0..1` | |\n| `Extension-eRS-Appointment-Reference` | `0..1` | |\n| `Extension-eRS-AdditionalRequirement` | `0..3` | Outlines that this `ReferralRequest` requires an additional requirement |\n| `Extension-eRS-eReferralPathwayStart` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-Commissioning-Rule-Org", - "description": "Extension to supply the organisation any commissioning rules should utilise for a referral", - "type": "object", - "required": [ - "url", - "valueIdentifier" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Commissioning-Rule-Org-1" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralState", - "description": "Extension to outline the current state of a ReferralRequest within e-RS.", - "type": "object", - "required": [ - "url", - "extension" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralState-1" - }, - "extension": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |\n| `state` | `1..1` | Outlines the current state of the `ReferralRequest` |\n| `reason` | `0..1` | Details the reason why the `ReferralRequest` is in this state, where appropriate |\n| `comments` | `0..1` | Any comments around the current `ReferralRequest` state |\n", - "items": { - "anyOf": [ - { - "title": "Extension - Referral State", - "description": "Extension to provide the Referral State.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "state" - ], - "example": "state" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReferralState-1" - }, - "code": { - "type": "string", - "enum": [ - "REJECTED", - "CANCELLED_REFERRAL", - "DID_NOT_ATTEND", - "ASSESSMENT_RESULT", - "TRIAGE_RESPONSE", - "APPT_CANCELLED_BY_PROVIDER", - "APPT_CANCELLED_BY_PATIENT", - "AWAITING_TRIAGE", - "NOT_BOOKED", - "DEFERRED_TO_PROVIDER", - "BOOKED", - "TRIAGED_PROVIDER_TO_ACTION" - ], - "example": "APPT_CANCELLED_BY_PATIENT" - }, - "display": { - "type": "string", - "enum": [ - "Rejected", - "Cancelled Referral", - "Did Not Attend", - "Assessment Result", - "Triage Response", - "Appointment Cancelled By Provider", - "Appointment Cancelled By Patient", - "Awaiting Triage", - "Not Booked", - "Deferred To Provider", - "Booked", - "Triaged - Provider To Action" - ], - "example": "Appointment Cancelled By Patient" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason", - "description": "Extension to provide the Referral State Reason.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "reason" - ], - "example": "reason" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1'\n'https://fhir.nhs.uk/STU3/CodeSystem/eRS-AssessmentOutcome-1'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/REFERRAL-CANCELLATION-REASON'\n'_baseurl_/STU3/CodeSystem/APPOINTMENT-NON-ATTENDANCE-REASON'\n" - }, - "code": { - "type": "string", - "example": "PATIENT_ILL" - }, - "display": { - "type": "string", - "example": "Patient Ill" - } - } - } - } - }, - { - "title": "Extension - Referral State Reason Comment", - "description": "Extension to provide the Referral State Reason Comment.", - "type": "object", - "required": [ - "url", - "valueString" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "comments" - ], - "example": "comments" - }, - "valueString": { - "type": "string", - "example": "Patient could not attend appointment due to them being ill." - } - } - } - ] - } - } - } - }, - { - "title": "Extension-eRS-Appointment", - "description": "Extension to supply the appointment for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#appointment" - } - } - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoFirstSubmitted", - "description": "Date and time the clinical information was first submitted", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoFirstSubmitted-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-ClinicalInfoLastUpdated", - "description": "Date and time the clinical information was last updated", - "type": "object", - "required": [ - "url", - "valueDateTime" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ClinicalInfoLastUpdated-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - { - "title": "Extension-eRS-Appointment-Reference", - "description": "Extension to supply the appointment reference for a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Appointment-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Appointment/70000" - } - } - } - } - }, - { - "title": "Extension-eRS-AdditionalRequirement", - "description": "Indicates a patient's additional needs that they require when requesting an appointment. This e-RS feature, including the management of additional requirements and booking them, is not currently supported.", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-PatientAdditionalRequirement-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdditionalRequirementType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVOCACY", - "INTERPRETER", - "TRANSPORT" - ], - "example": "ADVOCACY" - }, - "display": { - "type": "string", - "enum": [ - "Advocacy", - "Interpreter", - "Transport" - ], - "example": "Advocacy" - } - } - } - } - }, - { - "title": "Extension-eRS-eReferralPathwayStart", - "description": "Date and time of the pathway start", - "type": "object", - "required": [ - "url", - "valueInstant" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-eReferralPathwayStart-1" - }, - "valueDateTime": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "specialty": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "supportingInfo": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70000" - } - } - } - }, - "intent": { - "type": "string", - "enum": [ - "plan" - ], - "example": "plan" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - } - } - }, - { - "title": "updatedAppointment", - "description": "Parameter containing the cancelled appointment", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "updatedAppointment" - ], - "example": "updatedAppointment" - }, - "resource": { - "title": "eRS-Appointment", - "description": "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s) (https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1)", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "description", - "incomingReferral", - "participant" - ], - "properties": { - "id": { - "type": "string", - "example": "'appointment'\n'70001'\n" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Appointment-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Appointment-1" - } - }, - "versionId": { - "type": "string", - "nullable": true, - "example": "3" - } - } - }, - "language": { - "type": "string", - "example": "en" - }, - "resourceType": { - "type": "string", - "enum": [ - "Appointment" - ], - "example": "Appointment" - }, - "status": { - "type": "string", - "enum": [ - "proposed", - "pending", - "booked", - "arrived", - "fulfilled", - "cancelled", - "noshow" - ], - "example": "proposed" - }, - "reason": { - "nullable": true, - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "title": "eRS-ReviewReason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewReason-1" - }, - "code": { - "type": "string", - "enum": [ - "NO_SLOTS_AT_SERVICE", - "SLOT_NOT_AVAILABLE", - "BOOKING_ATTEMPT_PROBLEM", - "TRIAGE" - ], - "example": "NO_SLOTS_AT_SERVICE" - } - } - }, - { - "type": "object", - "title": "eRS-ReviewOutcome", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ReviewOutcome-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER", - "CANCEL_APPOINTMENT_ACTION_LATER", - "RETURN_TO_REFERRER_WITH_ADVICE", - "ACCEPT_REFER_BOOK_LATER" - ], - "example": "PROVIDER_CONVERTED_ADVICE_AND_GUIDANCE_ADMIN_TO_REFER" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Provider Converted Advice and Guidance, Admin to Refer" - } - } - }, - { - "type": "object", - "title": "eRS-Cancellation-Reason", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseurl_/STU3/CodeSystem/APPOINTMENT-CANCELLATION-REASON" - }, - "code": { - "type": "string", - "example": "PATIENT_HOLIDAY" - }, - "display": { - "type": "string", - "nullable": true, - "example": "Patient on holiday" - } - } - } - ] - } - } - } - } - }, - "description": { - "type": "string", - "enum": [ - "e-Referral Appointment" - ], - "example": "e-Referral Appointment" - }, - "start": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T08:30:00.000Z" - }, - "end": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "slot": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "Slot/11002001" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "comment": { - "type": "string", - "nullable": true - }, - "incomingReferral": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "ReferralRequest/000000070000/_history/14" - } - } - }, - "minItems": 0, - "maxItems": 1 - }, - "participant": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `Patient` | `1..1` | |\n| `Service` | `1..1` | |\n| `AllocatedClinician` | `0..1` | |\n", - "items": { - "anyOf": [ - { - "type": "object", - "title": "Patient", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "Service", - "properties": { - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "nullable": true, - "example": "Cardiology Triage Business Service" - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - }, - { - "type": "object", - "title": "AllocatedClinician", - "required": [ - "type", - "actor", - "status" - ], - "properties": { - "type": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://hl7.org/fhir/ValueSet/encounter-participant-type" - ], - "example": "http://hl7.org/fhir/ValueSet/encounter-participant-type" - }, - "code": { - "type": "string", - "enum": [ - "CON" - ], - "example": "CON" - } - } - } - } - } - }, - "actor": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "accepted" - ], - "example": "accepted" - } - } - } - ] - }, - "minItems": 2, - "maxItems": 3 - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "cancelled-referral-intend-private-without-comment": { - "summary": "Cancelled Referral without Booking with Reason 'Patient will go to a private clinic' without Comment (Comment Not Mandatory)", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledReferralIntendPrivateWithoutComment.json" - } - }, - "cancelled-referral-patient-other-reason": { - "summary": "Cancelled Referral without Booking with Reason 'Other' with Comment (Comment Mandatory)", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledReferralPatientOther.json" - } - }, - "cancelled-referral-raised-in-error": { - "summary": "Cancelled Referral without Booking with Reason 'Referral created by mistake'", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledReferralRaisedInError.json" - } - }, - "cancelled-referral-with-booking-referrer-cancellation": { - "summary": "Cancelled Referral with Booking with Reason 'Other - Referrer request cancellation'", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledBookedReferralReferrerCancellation.json" - } - }, - "cancelled-referral-with-cancelled-booking-no-longer-required": { - "summary": "Cancelled Referral with Cancelled Booking with Reason 'Referral no longer needed'", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledReferralWithCancelledBookingNoLongerRequired.json" - } - }, - "cancelled-referral-with-deferral-intend-private-with-comment": { - "summary": "Cancelled Referral with Existing Review Outcome with Reason 'Patient will go to a private clinic'", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledReferralResolvedDeferralIntendPrivateWithComment.json" - } - }, - "cancelled-referral-provider-booked-outside": { - "summary": "Cancelled Referral without Booking with Reason 'Patient booked outside NHS e-Referral Service' without Comment (Comment Not Mandatory)'", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledReferralBookedOutsideCabWithoutComment.json" - } - }, - "cancelled-referral-provider-triaged-and-sent-to-outpatient-service": { - "summary": "Cancelled Referral with Triage Response with Reason 'Sent to outpatient service not available in this system' with Comment (Comment Mandatory)'", - "value": { - "$ref": "../../../examples/cancelReferral/responses/CancelledReferralOutpatientService.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict - Version supplied as part of the request does not match current version of the referral request" - }, - "412": { - "description": "Precondition Failed - Mandatory data is missing" - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| INVALID_REQUEST_STATE | The Request, while otherwise valid, is not in the correct state for the specific action being performed. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the request. |\n| UNABLE_TO_CANCEL_APPOINTMENT | System is unable to cancel the appointment. |\n| INAPPROPRIATE_VALUE\t | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "423": { - "description": "The NHS e-Referral Service (e-RS) implements pessimistic locking functionality in order to prevent multiple users/systems attempting to update the same resource at the same time.\n\nThe e-RS API automatically acquires the lock on the behalf of the caller, within the scope of the request. When an endpoint call is received to update a resource, that resource will be locked for the duration of the request.\n\nAPI callers should not attempt to make simultaneous requests to update the same resource. Any attempt to do so will result in a 423 (Locked) response. If a 423 response is received, then another system/user may be in the process of updating the resource. It will be necessary to fetch the resource again and re-try the request at a later time.\n" - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "502": { - "description": "Where status code 502 (Bad Gateway) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_RESPONDED_WITH_ERROR | Error received from PAS. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "PAS_RESPONDED_WITH_ERROR", - "display": "Error received from PAS" - } - ] - }, - "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: ERROR" - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - }, - "504": { - "description": "Where status code 504 (Gateway Timeout) is returned then an eRS-OperationOutcome-1 will be included in the body. \nCheck diagnostics property for specific information regarding the error.\nIn response to receiving this status code, it is recommended that clients retry at a later time.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| PAS_NOT_RESPONDING | No response from PAS. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "timeout", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "PAS_NOT_RESPONDING", - "display": "No response from PAS" - } - ] - }, - "diagnostics": "PAS unable to create booking into slot '11002026' for UBRN: 000000070000. PAS Request Status: TIMED_OUT" - } - ] - } - } - } - } - } - } - }, - "/R4/Practitioner": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to determine which e-RS users a `SERVICE_PROVIDER_CLINICIAN_ADMIN` is allowed to work \"on-behalf-of\".\n\nNote: In e-RS, `SERVICE_PROVIDER_CLINICIAN_ADMIN` users always act \"on-behalf-of\" a `SERVICE_PROVIDER_CLINICIAN`. This endpoint specifically helps `SERVICE_PROVIDER_CLINICIAN_ADMIN` identify who they are allowed to log in as.\n\n## Supported security patterns\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nTo use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles depending on the query being invoked:\n\n| Query | e-RS Role(s) |\n| -------------------------------------------------------------------- | --------------------------------- |\n| onBehalfOf | `SERVICE_PROVIDER_CLINICIAN_ADMIN` |\n\n## Use case\n\nAs an authenticated user who has the `SERVICE_PROVIDER_CLINICIAN_ADMIN` role\n\nI need to know which provider clinical users I am allowed to work \"on-behalf-of\" at my provider organisation\n\nSo I can log in as a `SERVICE_PROVIDER_CLINICIAN_ADMIN` user and complete tasks on behalf of a chosen `SERVICE_PROVIDER_CLINICIAN` user.\n\n## Related endpoints\n\nTo perform actions as a `SERVICE_PROVIDER_CLINICIAN_ADMIN` user, you must provide one of the returned Practitioner IDs, in the `NHSD-eRS-On-Behalf-Of-User-ID` header parameter, to indicate which `SERVICE_PROVIDER_CLINICIAN` the call is on-behalf-of.\n", - "summary": "Retrieve \"on-behalf-of\" practitioner user information (A040, FHIR R4)", - "operationId": "a040-retrieve-practitioner-info", - "tags": [ - "Retrieve user information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "query", - "name": "_query", - "description": "A mandatory URL parameter where \"onBehalfOf\" is the name of the query operation.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "onBehalfOf" - ], - "example": "onBehalfOf" - } - } - ], - "responses": { - "200": { - "description": "The response body is a `Bundle` that contains `Practitioner` entries which define the [[HYPERLINK_ERS_BUS_FUNCTIONS]] that the user has available at each `Organisation` where they have a role.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "Bundle resource containing On-Behalf-Of practitioners", - "description": "The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle \n", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "type", - "total", - "timestamp", - "link" - ], - "properties": { - "id": { - "type": "string", - "example": "08acc887-6a7b-4b38-8f50-022e41319efe" - }, - "resourceType": { - "type": "string", - "enum": [ - "Bundle" - ], - "example": "Bundle" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - "type": { - "type": "string", - "enum": [ - "searchset" - ], - "example": "searchset" - }, - "total": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 1 - }, - "timestamp": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "link": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "relation", - "url" - ], - "properties": { - "relation": { - "type": "string", - "enum": [ - "self" - ], - "example": "self" - }, - "url": { - "type": "string", - "example": "_baseUrl_/R4/Practitioner?_query=onBehalfOf" - } - } - } - }, - "entry": { - "type": "array", - "items": { - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "Practitioner/111111111111" - }, - "resource": { - "type": "object", - "description": "A UKCore-Practitioner. The canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner", - "required": [ - "id", - "meta", - "resourceType", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "111111111111" - }, - "resourceType": { - "type": "string", - "enum": [ - "Practitioner" - ], - "example": "Practitioner" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - } - } - }, - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/sds-user-id" - ], - "example": "https://fhir.nhs.uk/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "111111111111" - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "match" - ], - "example": "match" - } - } - } - } - } - } - } - }, - "examples": { - "example-response-body": { - "summary": "Example response body", - "value": { - "$ref": "../../../examples/retrieveOboUsers/responses/PractitionerBundle.json" - } - } - } - } - } - }, - "400": { - "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------|\n| REC_BAD_REQUEST | invalid | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The query parameter _query is missing or has an invalid value. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "invalid", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_BAD_REQUEST" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "ACCESS_DENIED" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_FORBIDDEN" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-supported", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_ACCEPTABLE" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "429": { - "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "throttled", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "TOO_MANY_REQUESTS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "500": { - "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_SERVER_ERROR" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_UNAVAILABLE" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/CommunicationRequest/{ubrn}/$ers.generateCRI": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to generate a PDF file that summarises an advice and guidance request including the conversation. \nThis endpoint cannot be used to obtain a PDF file for a referral request.\n\n## Supported security patterns\n- Application-restricted access, unattended access\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\n\nYou need to use the `Unique Booking Reference Number` (UBRN) of an advice and guidance request.\n\n## Application-restricted access\nIn order to use this endpoint you must be an authenticated e-RS calling application, working in the context of a Service Provider Organisation.\n\n## Healthcare worker, user-restricted access\nIn order to use this endpoint you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n - `SERVICE_PROVIDER_CLINICIAN`\n - `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\n## Important note\n\nAn advice and guidance request may have been converted to a referral (with the same UBRN), \nand in addition a referral pathway in e-RS can be made up of more than one UBRN. \nAs such, it is important that all clinical information is obtained across all the related UBRNs in the pathway. \nThese can be identified using [[HYPERLINK_A005]].\n\nIf the converted advice and guidance request is referred to a service outside of your organisation, \nthe subsequent referral information may not be accessible due to legitimate relationship rules. \nHowever, the advice and guidance summary ([[HYPERLINK_A024]]), \nattachments ([[HYPERLINK_A006]]), advice and guidance conversation ([[HYPERLINK_A025]]) and \nclinical information ([[HYPERLINK_A043]]) which took place before such a conversion still forms part of the clinical information and can still be retrieved.\n\n## Use case\n\nAs an authenticated user or application\n\nI need to retrieve a PDF file overview of the advice and guidance request\n\nSo that I can assess its content and decide what further action may be needed.\n\n## Related endpoints\nYou can retrieve a PDF overview for an advice and guidance request that has been converted to a referral using [[HYPERLINK_A007]].\n\nYou can retrieve structured information about advice and guidance using [[HYPERLINK_A024]] and [[HYPERLINK_A025]].\n\nYou can retrieve a referral using [[HYPERLINK_A005]].\n\nYou can retrieve clinical attachments that are associated with a referral using [[HYPERLINK_A006]].\n", - "summary": "Retrieve advice and guidance overview PDF (A043, FHIR STU3)", - "operationId": "a043-retrieve-advice-and-guidance-overview-pdf", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access.\n", - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC.\n\nNot allowed for application-restricted access.\n\nRequired for user-restricted access where the Service Provider Clinician Admin Business Function is used for authentication.\n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "name": "ubrn", - "in": "path", - "description": "The unique booking reference number of the advice and guidance request\n", - "required": true, - "schema": { - "type": "string", - "example": "000049146177" - } - } - ], - "responses": { - "200": { - "description": "Response contains the binary stream of the advice and guidance overview PDF.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Disposition": { - "description": "The description of the type of content provided.\n", - "required": true, - "schema": { - "type": "string", - "example": "attachment; filename=\"000049146177_Advice_And_Guidance_20220610143044.pdf\"" - } - }, - "Content-Length": { - "description": "The length of the response.\n", - "required": true, - "schema": { - "type": "string", - "example": "3111" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/pdf" - ], - "example": "application/pdf" - } - } - }, - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "404": { - "description": "Not Found" - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| INVALID_REQUEST_TYPE | The `UBRN` provided exists in e-RS but does not correspond to an advice and guidance request. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| NO_RELATIONSHIP | The user does not have a legitimate relationship with the advice and guidance request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/STU3/CommunicationRequest/$ers.createAdviceAndGuidance": { - "post": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\nUse this endpoint to create an advice and guidance request from a referring organisation to a service providing organisation.\n\nAn advice and guidance request includes important contextual information. For example, the service and specialty to which advice has been requested. Creating the request also starts the conversation between a referrer seeking advice and a provider from whom the advice is sought.\n\nConversation messages can include attachments.\n\n## Supported security patterns\n\nHealthcare worker, user-restricted access\n\n## Important notes\n\nThe maximum number of services allowed on a given shortlist is 1.\n\nIn order to retrieve an attachment using the [[HYPERLINK_A042]] (or deprecated [[HYPERLINK_A006]]) endpoint, the attachment must be available for download. \nThe availability status of attachments associated with a referral are returned via this endpoint as a eRS-AvailabilityStatus-1 code. \n\nFurther details on attachment availability status and eRS-AvailabilityStatus-1 codes can be found in the [[HYPERLINK_A024]], [[HYPERLINK_A025]] and [[HYPERLINK_A042]] specifications.\n\n## Pre-requisites\nTo use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles:\n - `REFERRING_CLINICIAN`\n - `REFERRING_CLINICIAN_ADMIN`\n\nYou need to have identified a patient, for example via [[HYPERLINK_PDS]].\n\nYou need to have found services that meet the referral needs of a patient using [[HYPERLINK_A010]].\n\nIf you want to include attachments with the request, you need to use [[HYPERLINK_A020]] so they are ready to be associated with the request.\n\n## Use case\n\nAs an authenticated user \n\nI need to request some advice from a given service\n\nSo I can either initiate my patient's referral pathway or provide recommended treatment.\n\n## Related endpoints\n\nProviders are able to respond to an advice and guidance request via [[HYPERLINK_A026]] or convert the advice and guidance request into a referral via [[HYPERLINK_A027]].\n\nReferrers and providers can use:\n\n[[HYPERLINK_A024]] to retrieve the summary of an advice and guidance request\n\n[[HYPERLINK_A025]] to retrieve the advice and guidance conversation.\n", - "summary": "Create advice and guidance request (A044, FHIR STU3)", - "operationId": "a044-create-advice-and-guidance-request", - "tags": [ - "Request advice" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "REFERRING_CLINICIAN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CreateAdviceAndGuidance-Request-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Request-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Request-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `patient` | `1..1` | The patient the Advice request relates to. |\n| `providerConversionAuthorisation` | `1..1` | A flag detailing whether or not the provider who deals with this advice request is authorised to convert this Advice Request into a Referral |\n| `shortlist` | `1..1` | A list of services where the Advice Request should be sent to. Note currently only shortlists with a single Service included are supported. |\n| `request` | `1..1` | An initial message outlining the request. Maximum 8000 characters. |\n| `referringClinician` | `0..1` | Detail the Referring Clinician that a Referring Clinician Admin is acting on behalf off. Only permitted when creating an Advice Request as a user using the Referring Clinician Admin business function where it is also mandatory. |\n| `requestAttachmentFile` | `0..*` | A set of attachments to be included with the initial request. |\n", - "items": { - "anyOf": [ - { - "title": "Patient", - "description": "Parameter to supply a patient", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "patient" - ], - "example": "patient" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - { - "title": "ProviderConversionAuthorisation", - "description": "Parameter to define the Provider's conversion authorisation", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "providerConversionAuthorisation" - ], - "example": "providerConversionAuthorisation" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - }, - "code": { - "type": "string", - "enum": [ - "AUTHORISED_TO_CONVERT", - "NOT_AUTHORISED_TO_CONVERT" - ], - "example": "AUTHORISED_TO_CONVERT" - } - } - } - } - }, - { - "title": "Shortlist", - "description": "Parameter to supply a shortlist", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "shortlist" - ], - "example": "shortlist" - }, - "resource": { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - } - } - }, - { - "title": "request", - "description": "Parameter to supply a request", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "request" - ], - "example": "request" - }, - "valueString": { - "type": "string", - "example": "Please provide some advice around this case." - } - } - }, - { - "title": "ReferringClinician", - "description": "Parameter to supply a referring clinician", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "referringClinician" - ], - "example": "referringClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "requestAttachmentFile", - "description": "Parameter to supply an attachment alongside a request", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "requestAttachmentFile" - ], - "example": "requestAttachmentFile" - }, - "resource": { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "ADVICE_REQUEST" - ], - "example": "ADVICE_REQUEST" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - } - } - } - } - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "rca-with-attachments": { - "summary": "Example created by RCA with attachments authorising the provider to convert to a referral request.", - "value": { - "$ref": "../../examples/createAdviceAndGuidance/requests/ExampleRCAWithAttachments.json" - } - }, - "rc-without-attachments": { - "summary": "Example created by RC without attachments not authorising the provider to convert to a referral request.", - "value": { - "$ref": "../../examples/createAdviceAndGuidance/requests/ExampleRCWithoutAttachments.json" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "An Advice And Guidance Request created within e-RS.", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-CreateAdvice-Response-Parameters", - "type": "object", - "required": [ - "resourceType", - "meta", - "parameter" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ] - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Response-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CreateAdviceAndGuidance-Response-Parameters-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "parameter": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| --------------------------------- | ----------- | -------------------------------------------------------------|\n| `createdCommunicationRequest` | `1..1` | The created Advice And Guidance Request summary resource. |\n| `createdCommunication` | `1..1` | The created Initial Request message within the conversation. |\n", - "items": { - "anyOf": [ - { - "title": "createdCommunicationRequest", - "description": "The created Advice Request summary resource.", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "createdCommunicationRequest" - ], - "example": "createdCommunicationRequest" - }, - "resource": { - "title": "eRS-CommunicationRequest", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "contained", - "extension", - "status", - "category", - "subject", - "recipient", - "sender", - "requester", - "identifier" - ], - "properties": { - "id": { - "type": "string", - "example": "000000070000" - }, - "meta": { - "type": "object", - "required": [ - "profile", - "versionId" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-CommunicationRequest-1" - } - }, - "versionId": { - "type": "string", - "example": "3" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "CommunicationRequest" - ], - "example": "CommunicationRequest" - }, - "contained": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-Shortlist-List` | `1..1` | |\n| `eRS-ServiceSearchCriteria-Parameters` | `1..1` | |\n| `DocumentReference` | `0..*` | |\n| `CareConnect-PractitionerRole` | `1..2` | |\n", - "items": { - "anyOf": [ - { - "title": "eRS-Shortlist-List", - "description": "A list of services representing the services available to the patient to have treatment at", - "type": "object", - "required": [ - "status", - "mode", - "meta", - "resourceType", - "entry" - ], - "properties": { - "id": { - "type": "string", - "example": "shortlist" - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "mode": { - "type": "string", - "enum": [ - "snapshot" - ], - "example": "snapshot" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Shortlist-List-1" - } - } - } - }, - "contained": { - "type": "array", - "items": { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - } - }, - "extension": { - "type": "array", - "nullable": true, - "maxItems": 1, - "minItems": 1, - "description": "\n| Field | Cardinality | Notes |\n| ------------------------------------------ | ----------- | ------------------------------------------------------------------------------ |\n| `Extension-eRS-Shortlist-SearchCriteria` | `1..1` | The `SearchCriteria` used to retrieve the services included in the `Shortlist` |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-Shortlist-SearchCriteria", - "description": "Extension to detail the `SearchCriteria` associated with a `Shortlist`", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Shortlist-SearchCriteria-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#serviceSearchCriteria" - } - } - } - } - } - ] - } - }, - "resourceType": { - "type": "string", - "enum": [ - "List" - ], - "example": "List" - }, - "entry": { - "type": "array", - "items": { - "title": "Singular entry with service details", - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - }, - "display": { - "type": "string", - "example": "Good Cardiology Business Service" - } - } - } - } - }, - "minItems": 1, - "maxItems": 20 - } - } - }, - { - "title": "eRS-ServiceSearchCriteria-Parameters", - "description": "The criteria used to search for services", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "parameter" - ], - "properties": { - "id": { - "type": "string", - "example": "serviceSearchCriteria" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-ServiceSearchCriteria-Parameters-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Parameters" - ], - "example": "Parameters" - }, - "parameter": { - "type": "array", - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------------------------------------------------------- |\n| `Priority` | `1..1` | |\n| `Specialty` | `0..1` | |\n| `ClinicType` | `0..1` | |\n| `IndicativeAppointmentWaitTimeLimit` | `0..1` | |\n| `Postcode` | `0..1` | |\n| `DistanceLimit` | `0..1` | |\n| `ClinicalTerm` | `0..1` | |\n| `NamedClinician` | `0..1` | |\n| `AgeAndGenderAppropriate` | `1..1` | Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language. |\n| `CommissioningProvisioning` | `0..1` | This filter parameter is no longer supported as an input. If provided it will be ignored and a value of `ALL_AVAILABLE_FOR_BOOKING` used. Stored historical values will continue to be returned for output. |\n| `Organisation` | `0..1` | This parameter is not included in the response when retrieving the service search criteria. |\n| `Place` | `0..1` | Only supported in read mode, search by `place` is not possible currently. |\n", - "items": { - "anyOf": [ - { - "title": "Priority", - "description": "Details the priority parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "priority" - ], - "example": "priority" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - }, - { - "title": "Specialty", - "description": "Details the specialty parameter", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "specialty" - ], - "example": "specialty" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - } - } - } - } - }, - { - "title": "ClinicType", - "description": "Details the clinic type that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicType" - ], - "example": "clinicType" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ClinicType-1" - }, - "code": { - "type": "string", - "example": "HEART_FAILURE" - } - } - } - } - }, - { - "title": "IndicativeAppointmentWaitTimeLimit", - "description": "Details the indicative appointment wait time limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "indicativeAppointmentWaitTimeLimit" - ], - "example": "indicativeAppointmentWaitTimeLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 50 - } - } - }, - { - "title": "Postcode", - "description": "Details the postcode value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "postcode" - ], - "example": "postcode" - }, - "valueString": { - "type": "string", - "example": "LS1 2UT" - } - } - }, - { - "title": "DistanceLimit", - "description": "Details the distance limit value specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueUnsignedInt" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "distanceLimit" - ], - "example": "distanceLimit" - }, - "valueUnsignedInt": { - "type": "integer", - "minimum": 0, - "format": "int32", - "example": 123 - } - } - }, - { - "title": "ClinicalTerm", - "description": "Details the clinical term that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "clinicalTerm" - ], - "example": "clinicalTerm" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://snomed.info/sct" - ], - "example": "http://snomed.info/sct" - }, - "code": { - "type": "string", - "example": "1003" - } - } - } - } - }, - { - "title": "NamedClinician", - "description": "Details the named clinician that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "namedClinician" - ], - "example": "namedClinician" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - { - "title": "AgeAndGenderAppropriate", - "description": "Details the age and sex appropriate flag used in a search criteria. Content in the e-RS Professional Application has changed to replace 'Gender' with 'Sex'. This represents the data better and uses inclusive language.", - "type": "object", - "required": [ - "name", - "valueBoolean" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "ageAndGenderAppropriate" - ], - "example": "ageAndGenderAppropriate" - }, - "valueBoolean": { - "type": "boolean", - "example": true - } - } - }, - { - "title": "CommissioningProvisioning", - "description": "Details the commissioning provisioning flag detailed in a search criteria", - "type": "object", - "required": [ - "name", - "valueCoding" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "commissioningProvisioning" - ], - "example": "commissioningProvisioning" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommissioningProvisioning-1" - }, - "code": { - "type": "string", - "enum": [ - "ALL_AVAILABLE_FOR_BOOKING", - "ALL_SERVICES", - "LOCALLY_COMMISSIONABLE", - "NATIONALLY_AVAILABLE" - ], - "example": "ALL_AVAILABLE_FOR_BOOKING" - } - } - } - } - }, - { - "title": "Organisation", - "description": "Details the organisation that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueIdentifier" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "organisation" - ], - "example": "organisation" - }, - "valueIdentifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://directory.spineservices.nhs.uk/STU3/Organization" - ], - "example": "https://directory.spineservices.nhs.uk/STU3/Organization" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - { - "title": "Place", - "description": "Details the place that was specified in a search criteria", - "type": "object", - "required": [ - "name", - "valueString" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "place" - ], - "example": "place" - }, - "valueString": { - "type": "string", - "example": "Leeds" - } - } - } - ] - } - } - } - }, - { - "title": "DocumentReference", - "description": "A reference to a document", - "type": "object", - "required": [ - "meta", - "resourceType", - "type", - "status", - "indexed", - "content" - ], - "properties": { - "id": { - "type": "string", - "example": "DocumentReference-70002" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-DocumentReference-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "DocumentReference" - ], - "example": "DocumentReference" - }, - "type": { - "type": "object", - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AttachmentType-1" - }, - "code": { - "type": "string", - "enum": [ - "REFERRER", - "PROVIDER", - "ADVICE_REQUEST", - "GUIDANCE_RESPONSE" - ], - "example": "REFERRER" - }, - "display": { - "type": "string", - "enum": [ - "Referrer", - "Provider", - "Advice Request", - "Guidance Response" - ], - "example": "Referrer" - } - } - } - } - } - }, - "status": { - "type": "string", - "enum": [ - "current" - ], - "example": "current" - }, - "indexed": { - "type": "string", - "format": "date-time", - "example": "2021-04-22T10:00:00.000Z" - }, - "description": { - "type": "string", - "nullable": true, - "example": "upload png" - }, - "content": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "attachment" - ], - "properties": { - "attachment": { - "title": "A reference to an already created Attachment (http://hl7.org/fhir/stu3/datatypes.html#Attachment)", - "type": "object", - "required": [ - "contentType", - "url", - "size", - "title", - "creation" - ], - "properties": { - "id": { - "type": "string", - "example": "70002" - }, - "contentType": { - "type": "string", - "example": "image/png" - }, - "url": { - "type": "string", - "example": "Binary/19eb7224-dff3-4730-a5cb-67eac811f1a5" - }, - "size": { - "type": "integer", - "example": 6 - }, - "title": { - "type": "string", - "example": "upload.png" - }, - "creation": { - "type": "string", - "format": "date", - "example": "2021-04-22" - }, - "extension": { - "type": "array", - "minItems": 2, - "maxItems": 4, - "description": "\n| Field | Cardinality | Notes |\n| --------------------------------------- | ----------- | ------------------------------------------ |\n| `eRS-AvailabilityStatus` | `1..1` | |\n| `eRS-AttachedBy` | `1..1` | |\n| `eRS-AttachedByOrganisation` | `0..1` | |\n| `AttachedOnBehalfOf` | `0..1` | |\n", - "items": { - "oneOf": [ - { - "title": "Extension-eRS-AvailabilityStatus", - "description": "Details whether a file is available to be downloaded. See the Important note section for further information", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AvailabilityStatus-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AvailabilityStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "AVAILABLE", - "PENDING", - "THREATS_FOUND", - "VALIDATION_FAILED" - ], - "example": "AVAILABLE" - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedBy", - "description": "Extension to indicate the individual who attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-AttachedByOrganisation", - "description": "Extension to indicate the organisation that attached a file within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedByOrganisation-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-OnBehalfOf", - "description": "Extension to indicate the individual on whose behalf a file was attached within e-RS.", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedOnBehalfOf-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - } - } - } - ] - } - } - } - } - } - } - } - } - }, - { - "title": "CareConnect-PractitionerRole", - "description": "The PractitionerRole resource represents a specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "practitioner", - "organization" - ], - "properties": { - "id": { - "type": "string", - "example": "PractitionerRole-R69-000000000101" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - ], - "example": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-PractitionerRole-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "PractitionerRole" - ], - "example": "PractitionerRole" - }, - "practitioner": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/sds-user-id" - ], - "example": "http://fhir.nhs.net/Id/sds-user-id" - }, - "value": { - "type": "string", - "example": "021600556514" - } - } - } - } - }, - "organization": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - }, - "code": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1" - }, - "code": { - "type": "string", - "example": "REFERRING_CLINICIAN" - } - } - } - } - } - } - } - } - } - ] - } - }, - "extension": { - "type": "array", - "nullable": true, - "description": "\n| Field | Cardinality | Notes |\n| ----------------------------------------------- | ----------- | ------------------------------------------ |\n| `Extension-eRS-ReferralShortlist` | `1..1` | |\n| `Extension-eRS-ReferralPriority` | `1..1` | |\n| `Extension-eRS-ProviderConversionAuthorisation` | `1..1` | |\n| `Extension-eRS-Specialty` | `1..1` | |\n", - "items": { - "anyOf": [ - { - "title": "Extension-eRS-ReferralShortlist", - "description": "Extension to supply the current shortlist for a ReferralRequest", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralShortlist-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#shortlist" - } - } - } - } - }, - { - "title": "Extension-eRS-ReferralPriority", - "description": "Extension to supply the current priority of a ReferralRequest within e-RS", - "type": "object", - "required": [ - "url", - "valueCodeableConcept" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ReferralPriority-1" - }, - "valueCodeableConcept": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-Priority-1" - }, - "code": { - "type": "string", - "enum": [ - "ROUTINE", - "URGENT", - "TWO_WEEK_WAIT" - ], - "example": "URGENT" - }, - "display": { - "description": "display value is returned in response from the server", - "nullable": true, - "type": "string", - "example": "Urgent" - } - } - } - } - } - } - } - }, - { - "title": "Extension-eRS-ProviderConversionAuthorisation", - "description": "Extension to supply the conversion authorisation flag", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-ProviderConversionAuthorisation-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-ProviderConversionAuthorisation-1" - }, - "code": { - "type": "string", - "enum": [ - "AUTHORISED_TO_CONVERT", - "NOT_AUTHORISED_TO_CONVERT" - ], - "example": "NOT_AUTHORISED_TO_CONVERT" - }, - "display": { - "type": "string", - "example": "Referrer has NOT allowed the Service Provider to convert the Advice and Guidance to a Referral" - } - } - } - } - }, - { - "title": "Extension-eRS-Specialty", - "description": "Extension to supply the specialty", - "type": "object", - "required": [ - "url", - "valueCoding" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-Specialty-1" - }, - "valueCoding": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "example": "_baseUrl_/STU3/CodeSystem/SPECIALTY" - }, - "code": { - "type": "string", - "example": "CARDIOLOGY" - }, - "display": { - "type": "string", - "example": "Cardiology" - } - } - } - } - } - ] - } - }, - "status": { - "type": "string", - "enum": [ - "active", - "cancelled", - "completed" - ], - "example": "active" - }, - "category": { - "type": "array", - "nullable": true, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-AdviceAndGuidanceStatus-1" - }, - "code": { - "type": "string", - "enum": [ - "PROVIDER_RESPONSE_REQUIRED", - "REFERRER_TO_SUBMIT_FURTHER_INFORMATION", - "REFERRER_TO_REVIEW_RESPONSE", - "CONVERSATION_ENDED_CANCELLED", - "CONVERSATION_ENDED_CLOSED", - "ADVICE_CONVERTED" - ], - "example": "PROVIDER_RESPONSE_REQUIRED" - } - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/nhs-number" - ], - "example": "http://fhir.nhs.net/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - }, - "recipient": { - "type": "array", - "items": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-HealthcareService-Reference", - "description": "Extension to supply the service id", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - } - }, - "sender": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - }, - "requester": { - "type": "object", - "required": [ - "agent" - ], - "properties": { - "agent": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - } - } - }, - "payload": { - "type": "array", - "items": { - "type": "object", - "required": [ - "contentReference" - ], - "properties": { - "contentReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#DocumentReference-70002" - } - } - } - } - } - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "enum": [ - "https://fhir.nhs.uk/Id/ers-request-id" - ], - "example": "https://fhir.nhs.uk/Id/ers-request-id" - }, - "value": { - "type": "string", - "example": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - } - } - } - } - } - } - } - }, - { - "title": "createdCommunication", - "description": "The created initial request message within the conversation.", - "type": "object", - "required": [ - "name", - "resource" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "createdCommunication" - ], - "example": "createdCommunication" - }, - "resource": { - "title": "eRS-Communication-1", - "description": "A record of information transmitted from a sender to a receiver", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "status", - "category", - "recipient", - "sent", - "sender", - "note" - ], - "properties": { - "id": { - "type": "string", - "example": "appointment" - }, - "meta": { - "type": "object", - "required": [ - "profile" - ], - "properties": { - "profile": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1", - "https://fhir.hl7.org.uk/STU3/StructureDefinition/eRS-Communication-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-Communication-1" - } - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "Communication" - ], - "example": "Communication" - }, - "status": { - "type": "string", - "enum": [ - "completed" - ], - "example": "completed" - }, - "category": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-CommunicationSentBy-1" - }, - "code": { - "type": "string", - "enum": [ - "REQUESTER", - "RESPONDER", - "REFERRER_CLINICAL_INFORMATION_UPDATED" - ], - "example": "REQUESTER" - } - } - } - } - } - } - }, - "recipient": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "anyOf": [ - { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-HealthcareService-Reference", - "description": "Extension to supply the service id", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "http://fhir.nhs.net/Id/ers-service" - ], - "example": "http://fhir.nhs.net/Id/ers-service" - }, - "value": { - "type": "string", - "example": "11002" - } - } - } - } - } - } - } - } - } - }, - { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/ods-organization-code" - ], - "example": "https://fhir.nhs.uk/Id/ods-organization-code" - }, - "value": { - "type": "string", - "example": "R69" - } - } - } - } - } - ] - } - }, - "sent": { - "type": "string", - "format": "date-time", - "example": "2021-04-20T12:17:35.128Z" - }, - "sender": { - "type": "object", - "required": [ - "extension" - ], - "properties": { - "extension": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "title": "Extension-PractitionerRole-Reference", - "description": "Extension to supply practitioner details", - "type": "object", - "required": [ - "url", - "valueReference" - ], - "properties": { - "url": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-PractitionerRole-Reference-1" - }, - "valueReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "#PractitionerRole.021600556514.R68.REFERRING-CLINICIAN" - } - } - } - } - } - } - } - }, - "payload": { - "type": "array", - "items": { - "type": "object", - "required": [ - "contentReference" - ], - "properties": { - "contentReference": { - "type": "object", - "required": [ - "reference" - ], - "properties": { - "reference": { - "type": "string", - "example": "DocumentReference/70000" - } - } - } - } - } - }, - "note": { - "type": "array", - "minItems": 1, - "maxItems": 1, - "items": { - "type": "object", - "required": [ - "text" - ], - "properties": { - "text": { - "type": "string", - "example": "Example content...", - "description": "Maximum 8000 characters." - } - } - } - } - } - } - } - } - ] - } - } - } - }, - "examples": { - "rca-with-attachments": { - "summary": "Example created by RCA with attachments authorising the provider to convert to a referral request.", - "value": { - "$ref": "../../../examples/createAdviceAndGuidance/responses/ExampleRCAWithAttachments.json" - } - }, - "rc-without-attachments": { - "summary": "Example created by RC without attachments not authorising the provider to convert to a referral request.", - "value": { - "$ref": "../../../examples/createAdviceAndGuidance/responses/ExampleRCWithoutAttachments.json" - } - } - } - } - } - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Where status code 401 (Unauthorised) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| NO_ACCESS | | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "NO_ACCESS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| FORBIDDEN | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| NO_ACCESS | forbidden | [eRS Error Code](https://fhir.nhs.uk/CodeSystem/ers-error-codes) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "FORBIDDEN", - "display": "Forbidden" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Not Acceptable", - "headers": { - "Content-Type": { - "description": "Indicates the media type of the associated resource. \n", - "schema": { - "type": "string", - "enum": [ - "text/plain;charset=utf-8" - ], - "example": "text/plain;charset=utf-8" - } - } - }, - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "content": { - "text/plain;charset=utf-8": { - "schema": { - "type": "string" - } - } - } - }, - "422": { - "description": "Where status code 422 (Unprocessable Entity) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| Error code | Description |\n| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| REFERENCE_NOT_FOUND | A supplied reference could not be resolved to valid resource (e.g. a patient, clinician or an organisation). |\n| INAPPROPRIATE_VALUE | A value, which is acceptable under different conditions, is inappropriate in the context of the other information provided. |\n| TOO_MANY_ITEMS | In a list where a maximum number of items is specified (e.g. a Shortlist), too many entries are supplied. |\n| MISSING_VALUE | A field defined as mandatory for an endpoint has not been provided. |\n| VALUE_IS_REQUIRED | A business rule defines a value as mandatory but it has not been provided. |\n| FIELD_NOT_PERMITTED | A business rule defines a field as not permitted but it has been provided. |\n| PATIENT_ERROR | An error occurred while retrieving the requested patient. Do not attempt again. |\n| INVALID_VALUE | The input provided does not conform to the expected data types and format. |\n| INVALID_CODE | The input provided for a field is not one of the defined legal values. |\n| UNEXPECTED_FIELD | A field is provided that is not expected as part of the request. E.g. a field is mis-spelt, was defined on a previous version of the endpoint but has subsequently been removed. |\n| INVALID_FHIR_STRUCTURE | The FHIR data structure in the message body does not match the expected structure (e.g. an array is present for a value when no array is expected). |\n| REFERENCED_USER_IS_NOT_SPC | The user provided does not have the Service Provider Clinician authorisation in the e-RS. |\n| ORGANISATION_IS_CLOSED | The organisation supplied corresponds to an organisation that is closed. |\n| ORGANISATION_NOT_APPROPRIATE | The organisation supplied corresponds to an organisation that is not valid for the given request. |\n| DUPLICATE_SERVICE | Unique service value expected. |\n| SHORTLISTED_SERVICE_NOT_IN_RESULTS | The service selected for the shortlist submitted does not satisfy the search criteria provided. |\n| REFERENCED_USER_IS_NOT_ACTIVE | The user identified is not active. |\n| REFERENCED_USER_NOT_IN_ORG | The referenced user does not belong to organisation specified. |\n| NO_REG_GP_PRACTICE | The patient provided was found not to have a registered GP practice in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC | The user provided does not have the Referring Clinician authorisation in the e-RS. |\n| REFERENCED_USER_IS_NOT_RC_AT_ORG | The user provided does not have the Referring Clinician authorisation at the organisation specified. |\n| SNOMED_NOT_FOUND | A SNOMED code, while potentially valid in the latest version of the international dictionary, is not found in the e-RS dictionary. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "value", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "UNEXPECTED_FIELD", - "display": "Unexpected field" - } - ] - }, - "diagnostics": "'parameter[0]/resource/contained[0]/parameter[1]' (unknownParameter) unknown parameter name" - } - ] - } - } - } - }, - "429": { - "description": "The e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n" - }, - "500": { - "description": "Internal Server Error" - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an eRS-OperationOutcome-1 will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| Error code | Description |\n| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\n| SYSTEM_UNAVAILABLE | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "eRS-OperationOutcome", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "properties": { - "profile": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ], - "example": "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - }, - "minItems": 1, - "maxItems": 1 - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "example": "error" - }, - "code": { - "type": "string", - "example": "business-rule" - }, - "diagnostics": { - "type": "string", - "example": "'Shortlist/Service Id' (11002) cannot be added to a shortlist more than once." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code", - "display" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - ], - "example": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1" - }, - "code": { - "type": "string", - "example": "DUPLICATE_SERVICE" - }, - "display": { - "type": "string", - "example": "Duplicate service found in shortlist" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "meta": { - "profile": [ - "https://fhir.nhs.uk/STU3/StructureDefinition/eRS-OperationOutcome-1" - ] - }, - "resourceType": "OperationOutcome", - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-APIErrorCode-1", - "code": "SYSTEM_UNAVAILABLE", - "display": "System Unavailable" - } - ] - } - } - ] - } - } - } - } - } - } - }, - "/R4/ServiceRequest": { - "get": { - "security": [ - { - "bearerAuth": [] - } - ], - "description": "## Overview\n\n

\nWarning: This endpoint is part of a new suite of APIs currently in development. We currently advise against integrating with this endpoint as its definition may be subject to change. If you would still like to use this endpoint please contact us before you start integration.\n

\n\nThe e-RS FHIR API represents an advice and guidance request and a referral in FHIR R4 as a ServiceRequest. This endpoint allows you to search for attributes about a ServiceRequest.\n\nAt present the following is the only permitted use case for using this endpoint, but it is expected that additional use cases will be added as future needs are identified and prioritised.\n- For FHIR R4 endpoints, the e-RS FHIR API requires a unique identifier for the ServiceRequest, instead of the UBRN, to identify an advice and guidance request or referral request. To support partners to transition from previous FHIR versions, and utilise the newer FHIR endpoints, this endpoint can be used as a bridging mechanism so that you can search for the required unique identifiers using a UBRN. \n\n## Supported security patterns\n\n- Healthcare worker, user-restricted access\n\n## Pre-requisites\nTo use this endpoint, you must be an authenticated e-RS user and use one of the following e-RS roles:\n\n- `REFERRING_CLINICIAN`\n- `REFERRING_CLINICIAN_ADMIN`\n- `SERVICE_PROVIDER_CLINICIAN`\n- `SERVICE_PROVIDER_CLINICIAN_ADMIN`\n\nYou need to use the Unique Booking Reference Number (UBRN) of an advice and guidance request or referral request.\n\n\n## Important notes\n\nWhen searching for a unique identifier for a ServiceRequest, it's important to note that one UBRN can relate to both an advice and guidance request and a referral. In this case, the response could contain two unique identifiers: one relating to the advice and guidance request and one relating to the referral.\n\n## Use case\n\nAs an authenticated user\n\nI need the unique identifier for a given advice and guidance request or referral request\n\nSo that I can view or action an advice and guidance request or referral\n\n## Related endpoints\n\nOnce the ServiceRequest's unique identifier has been retrieved it can then be used to call the following endpoints to manage its clinical attachments:\n- [[HYPERLINK_A012]]\n\n## Sandbox test scenarios\nYou can test the following scenarios in our sandbox environment\n\n| Scenario | UBRN |\n| --------------------------------------------------------------------------------------- | -------------- |\n| A response containing a single Request ID for a `ServiceRequest` of category `referral` | `000000070000` |\n| A response containing a single Request ID for a `ServiceRequest` of category `request` | `000000070001` |\n| A response containing two Request IDs | `000000070002` |\n| A response containing an empty bundle | `000000070003` |\n", - "summary": "Search for service requests (A041, FHIR R4)", - "operationId": "a041-search-service-request", - "tags": [ - "Retrieve clinical information" - ], - "parameters": [ - { - "in": "header", - "name": "Authorization", - "description": "An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis).\n\nRequired in all environments except sandbox.\n", - "required": true, - "schema": { - "type": "string", - "format": "^Bearer\\ [[:ascii:]]+$", - "example": "Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM" - } - }, - { - "in": "header", - "name": "NHSD-eRS-Business-Function", - "description": "The e-RS Business Function of the caller\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "REFERRING_CLINICIAN", - "REFERRING_CLINICIAN_ADMIN", - "REFERRING_ADMIN", - "COMMISSIONER", - "SERVICE_PROVIDER_CLINICIAN_ADMIN", - "SERVICE_PROVIDER_CLINICIAN", - "SERVICE_PROVIDER_ADMIN", - "INFORMATION_ANALYST", - "BOOKING_MANAGER", - "ADDITIONAL_REQUIREMENTS_MANAGER" - ], - "example": "SERVICE_PROVIDER_CLINICIAN_ADMIN" - } - }, - { - "in": "header", - "name": "X-Correlation-ID", - "description": "Arbitrary string value provided by API Consumer\n\nTends to be unique, but does not have to be\n\nReturned, unchanged, in the response\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - { - "in": "header", - "name": "NHSD-End-User-Organisation-ODS", - "description": "The ODS code of the caller's Organisation\n", - "required": true, - "schema": { - "type": "string", - "example": "R69" - } - }, - { - "in": "header", - "name": "NHSD-eRS-On-Behalf-Of-User-ID", - "description": "The (SDS) user ID of the user that the authenticating user wishes to act on behalf of (OBO). \n\n\"On behalf of\" is only supported for a Service Provider Clinician Admin (SPCA) acting on behalf of a Service Provider Clinician (SPC). \n\nWhere an OBO User ID is supplied the authenticating user must be an SPCA and the OBO User ID must be that of an appropriate SPC. \n", - "required": false, - "schema": { - "type": "string", - "example": "021600556514" - } - }, - { - "name": "identifier", - "in": "query", - "description": "The Unique Booking Reference Number (UBRN) used to search for `ServiceRequest` resources.\nThe format follows that of a [token](https://www.hl7.org/fhir/r4/search.html#token), with `code` (UBRN) being mandatory and `system` being optional.\nIn this case, the code system will be eRS UBRN (https://fhir.nhs.uk/Id/UBRN).\n- [parameter]=[code]\n- [parameter]=[system]|[code]\n", - "required": true, - "style": "form", - "explode": false, - "schema": { - "type": "string", - "format": "token" - }, - "examples": { - "system_and_ubrn": { - "value": "https://fhir.nhs.uk/Id/UBRN|000000070000", - "summary": "Code system and UBRN" - }, - "ubrn": { - "value": "000000070000", - "summary": "UBRN only" - } - } - } - ], - "responses": { - "200": { - "description": "Bundle resource containing the `ServiceRequest` resources associated to the supplied UBRN. \nThe canonical URL: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Bundle\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "type": "object", - "required": [ - "id", - "meta", - "type", - "timestamp", - "total", - "link" - ], - "properties": { - "id": { - "type": "string", - "example": "123e4567-e89b-12d3-a456-426614174000" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "type": { - "type": "string", - "enum": [ - "searchset" - ], - "example": "searchset" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - }, - "total": { - "type": "integer", - "example": 1 - }, - "link": { - "type": "array", - "items": { - "type": "object", - "required": [ - "relation", - "url" - ], - "properties": { - "relation": { - "type": "string", - "enum": [ - "self" - ], - "example": "self" - }, - "url": { - "type": "string", - "example": "_baseUrl_/FHIR/R4/ServiceRequest?identifier=https://fhir.nhs.uk/Id/UBRN%7C000000070000" - } - } - } - }, - "entry": { - "type": "array", - "description": "| Field | Cardinality | Notes |\n| ---------------------- | ----------- | ------------------------------------------ |\n| `ServiceRequest` | `0..*` | |\n", - "items": { - "title": "ServiceRequest", - "type": "object", - "required": [ - "fullUrl", - "resource", - "search" - ], - "properties": { - "fullUrl": { - "type": "string", - "example": "_baseUrl_/FHIR/R4/ServiceRequest/r.123e4567-e89b-12d3-a456-426614174000" - }, - "resource": { - "title": "eRS-ServiceRequest", - "description": "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.\nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest\n", - "type": "object", - "required": [ - "id", - "meta", - "resourceType", - "identifier", - "status", - "intent", - "category", - "subject" - ], - "properties": { - "id": { - "type": "string", - "example": "r.832db7fa-ebdd-44b6-ab3b-8329c2d43149" - }, - "meta": { - "type": "object", - "required": [ - "versionId" - ], - "properties": { - "versionId": { - "type": "string", - "example": "5" - } - } - }, - "resourceType": { - "type": "string", - "enum": [ - "ServiceRequest" - ], - "example": "ServiceRequest" - }, - "identifier": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/UBRN" - ], - "example": "https://fhir.nhs.uk/Id/UBRN" - }, - "value": { - "type": "string", - "example": "000000070000" - } - } - } - }, - "status": { - "type": "string", - "description": "Whilst a potential value to return is `draft`, we are not currently returning this value, but may choose to do so in the future.\n\n| ServiceRequest.status | Description |\n|-----------------------|---------------------------------------------------------------------------------- |\n| active | The `ServiceRequest` is ready to be acted upon. |\n| completed | The `ServiceRequest` has been fully performed and no further activity will occur. |\n| draft | The `ServiceRequest` is incomplete and is not yet ready to be processed. |\n| revoked | The `ServiceRequest` has been terminated and no further activity will occur. |\n", - "enum": [ - "active", - "completed", - "draft", - "revoked" - ], - "example": "active" - }, - "intent": { - "type": "string", - "enum": [ - "order" - ], - "example": "order" - }, - "category": { - "type": "array", - "items": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/message-category-servicerequest" - ] - }, - "code": { - "type": "string", - "enum": [ - "referral", - "request" - ], - "example": "referral" - } - } - } - } - } - } - }, - "code": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/servicerequest-code" - ], - "example": "https://fhir.nhs.uk/CodeSystem/servicerequest-code" - }, - "code": { - "type": "string", - "enum": [ - "advice-and-guidance" - ], - "example": "advice-and-guidance" - } - } - } - } - } - }, - "subject": { - "type": "object", - "required": [ - "identifier" - ], - "properties": { - "identifier": { - "type": "object", - "required": [ - "system", - "value" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/Id/nhs-number" - ], - "example": "https://fhir.nhs.uk/Id/nhs-number" - }, - "value": { - "type": "string", - "example": "9912003888" - } - } - } - } - } - } - }, - "search": { - "type": "object", - "required": [ - "mode" - ], - "properties": { - "mode": { - "type": "string", - "enum": [ - "match" - ], - "example": "match" - } - } - } - } - } - } - } - }, - "examples": { - "minimal-example-empty": { - "summary": "An empty bundle might be returned when the search completes but matches no requests.", - "value": { - "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleEmpty.json" - } - }, - "minimal-example-referral": { - "summary": "A response containing a single Request ID for a `ServiceRequest` of category `referral`.", - "value": { - "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleReferral.json" - } - }, - "minimal-example-advice": { - "summary": "A response containing a single Request ID for a `ServiceRequest` of category `request`.", - "value": { - "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleAdvice.json" - } - }, - "complex-example-referral-and-advice": { - "summary": "A response containing two Request IDs.", - "value": { - "$ref": "../../../examples/searchServiceRequest/responses/ResponseExampleReferralAndAdvice.json" - } - } - } - } - } - }, - "400": { - "description": "Where status code 400 (Bad Request) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below. \nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------ |\n| REC_BAD_REQUEST | required | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | Incorrect or missing expected value. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "invalid", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_BAD_REQUEST" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "401": { - "description": "Where status code 401 (Unauthorized) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ACCESS_DENIED | | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to either no credentials being provided or the provided credentials no longer being valid. Callers receiving this code should reauthenticate. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "login", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "ACCESS_DENIED" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "403": { - "description": "Where status code 403 (Forbidden) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |\n| REC_FORBIDDEN | forbidden | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A call attempts to access or operate upon a resource without proper authorisation. |\n| ACCESS_DENIED | forbidden | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The request could not be authenticated due to insufficient credentials being provided. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "forbidden", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_FORBIDDEN" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "406": { - "description": "Where status code 406 (Not Acceptable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ------------- | ------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |\n| REC_NOT_ACCEPTABLE | not-supported | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The requested resource does not have a current representation that would be acceptable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "not-supported", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_NOT_ACCEPTABLE" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "429": { - "description": "Where status code 429 (Too Many Requests) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ----------------------------------------------------------------------------- | ---------------------------------- |\n| TOO_MANY_REQUESTS | throttled | [APIM Error Code](https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode) | The rate limit has been reached. |\n\nThe e-Referral service APIs limit the number of transactions you can make per unit of time.\nThis protects our service against excessive use and denial-of-service (DoS) attacks, and is also to encourage you to use our APIs efficiently.\n\nOur standard rate limit for the production environment is 10 requests per second per application.\nIf you go over the rate limit you'll receive a response with an HTTP status of 429 (Too Many Requests).\n\nOur path-to-live environments have very low rate limits.\nThey are for functional testing only - you should not use them for [[HYPERLINK_PERFORMANCE_TESTING]].\n\nIf you have problems with rate limits, [[HYPERLINK_CONTACT_US]] to discuss your application design and volumetrics,\nand to see whether it's appropriate to raise your rate limit.\n\nIf a 429 response is received, indicating a request has been rate limited, then you must back off and retry with exponentially increasing periods between requests.\nOnce a request is successful again, then you may continue to send requests inline with the documented rate limits.\n\nExample:\n - Receive a 429 response\n - Wait 1s and resend, but still receive a 429\n - Wait 2s and resend, but still receive a 429\n - Wait 4s, request is successful\n - Return to normal request cadence\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "throttled", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "code": "TOO_MANY_REQUESTS" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "500": { - "description": "Where status code 500 (Internal Server Error) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nCheck diagnostics property for specific information regarding the error.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |\n| REC_SERVER_ERROR | exception | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "exception", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_SERVER_ERROR" - } - ] - }, - "diagnostics": "Example diagnostics message." - } - ] - } - } - } - }, - "503": { - "description": "Where status code 503 (Service Unavailable) is returned then an [NHSDigital-OperationOutcome](https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome) will be included in the body, as detailed below.\nIn response to receiving this status code, it is recommended that clients retry at a later time based on a returned `Retry-After` header when provided.\n\n| issue.details.coding.code | issue.code | Coding System | Description |\n| ------------------------- | ---------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |\n| REC_UNAVAILABLE | transient | [BaRS Error Code](https://fhir.nhs.uk/CodeSystem/http-error-codes) | A request to an internal component timed out whilst attempting to serve a response or the system is currently otherwise unavailable. |\n", - "headers": { - "X-Correlation-ID": { - "description": "The X-Correlation-ID from the request header, if supplied, mirrored back.\n", - "required": false, - "schema": { - "type": "string", - "example": "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" - } - }, - "X-Request-ID": { - "description": "The e-RS transaction id\n", - "required": false, - "schema": { - "type": "string", - "example": "58621d65-d5ad-4c3a-959f-0438e355990e-1" - } - }, - "Content-Type": { - "description": "Indicates the media type of the associated resource.\n", - "required": true, - "schema": { - "type": "string", - "enum": [ - "application/fhir+json" - ], - "example": "application/fhir+json" - } - }, - "Retry-After": { - "description": "Defines a period (in seconds) after which the client should attempt their request again.\n", - "required": false, - "schema": { - "type": "string", - "example": "120" - } - } - }, - "content": { - "application/fhir+json": { - "schema": { - "title": "NHSDigital-OperationOutcome", - "description": "Operation outcomes are sets of error, warning and information messages that provide detailed information about the outcome of an attempted system operation. \nThe canonical URL: https://fhir.nhs.uk/StructureDefinition/NHSDigital-OperationOutcome \n", - "type": "object", - "required": [ - "resourceType", - "meta", - "issue" - ], - "properties": { - "resourceType": { - "type": "string", - "enum": [ - "OperationOutcome" - ], - "example": "OperationOutcome" - }, - "meta": { - "type": "object", - "required": [ - "lastUpdated" - ], - "properties": { - "lastUpdated": { - "type": "string", - "format": "date-time", - "example": "2021-08-04T14:35:00.000Z" - } - } - }, - "issue": { - "type": "array", - "items": { - "type": "object", - "required": [ - "severity", - "code", - "details" - ], - "properties": { - "severity": { - "type": "string", - "enum": [ - "fatal", - "error", - "warning", - "information" - ], - "example": "error" - }, - "code": { - "type": "string", - "example": "required" - }, - "diagnostics": { - "type": "string", - "example": "Incorrect or missing expected value." - }, - "details": { - "type": "object", - "required": [ - "coding" - ], - "properties": { - "coding": { - "type": "array", - "items": { - "type": "object", - "required": [ - "system", - "code" - ], - "properties": { - "system": { - "type": "string", - "enum": [ - "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "https://fhir.nhs.uk/CodeSystem/NHSD-API-ErrorOrWarningCode", - "https://fhir.nhs.uk/CodeSystem/ers-error-codes" - ], - "example": "https://fhir.nhs.uk/CodeSystem/http-error-codes" - }, - "code": { - "type": "string", - "example": "REC_BAD_REQUEST" - } - } - } - } - } - } - } - } - } - } - }, - "example": { - "resourceType": "OperationOutcome", - "meta": { - "lastUpdated": "2022-03-01T10:00:00.42Z" - }, - "issue": [ - { - "severity": "error", - "code": "transient", - "details": { - "coding": [ - { - "system": "https://fhir.nhs.uk/CodeSystem/http-error-codes", - "code": "REC_UNAVAILABLE" - } - ] - } - } - ] - } - } - } - } - } - } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - }, - "mediaTypes": { - "FileContentTypeSchemaDownload": { - "text/plain": { - "schema": { - "type": "string", - "format": "binary" - }, - "example": "This is some example text." - }, - "text/html": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/xml": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/rtf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/basic": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/gif": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/tiff": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "video/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/msword": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/dicom": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "FileContentTypeSchemaUpload": { - "text/plain": { - "schema": { - "type": "string", - "format": "binary" - }, - "example": "This is some example text." - }, - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/xml": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/rtf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/basic": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "audio/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/gif": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/tiff": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "video/mpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/msword": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/dicom": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - }, - "x-nhsd-api-platform": { - "meta": { - "service_name": "e-referrals-service-api", - "short_service_name": "ers", - "service_base_path": "referrals", - "product_display_name": "e-Referrals-Service", - "product_description": "The NHS e-RS vision is to enable local innovation and adoption of paperless referrals. To support this vision NHS Digital have created a set of APIs which provide a well-defined, simple to use data interface to the NHS e-Referral Service (e-RS). See https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir", - "pipeline_name_prefix": "E-Referrals-Service" - } - } -} \ No newline at end of file