From e45706013c886f60d388e6e1ec3692a492e3808a Mon Sep 17 00:00:00 2001 From: Declan Kieran Date: Wed, 27 Mar 2024 22:15:32 +0000 Subject: [PATCH 1/5] fix references in transaction bundle in flag extension so they work with hapi starter --- ...003-AddRARecordTransactionExample1-bundle.fsh | 8 ++++---- ...004-AddRARecordTransactionExample2-bundle.fsh | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/input/fsh/examples/0003-AddRARecordTransactionExample1-bundle.fsh b/input/fsh/examples/0003-AddRARecordTransactionExample1-bundle.fsh index 1cfc9bf..cce5200 100644 --- a/input/fsh/examples/0003-AddRARecordTransactionExample1-bundle.fsh +++ b/input/fsh/examples/0003-AddRARecordTransactionExample1-bundle.fsh @@ -15,11 +15,11 @@ Usage: #example * entry[=].resource = RAConditionExample1 * entry[=].request.method = #PUT * entry[=].request.url = "Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" -* entry[+].fullUrl = "urn:uuid:fba99f70-fe1d-42e2-b77a-916e44b53c19" +* entry[+].fullUrl = "Flag/RAPatientFlagExample1" * entry[=].resource = RAPatientFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19" -* entry[+].fullUrl = "urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85" +* entry[=].request.url = "Flag/RAPatientFlagExample1" +* entry[+].fullUrl = "Flag/RAFlagExample1" * entry[=].resource = RAFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85" +* entry[=].request.url = "Flag/RAFlagExample1" diff --git a/input/fsh/examples/0004-AddRARecordTransactionExample2-bundle.fsh b/input/fsh/examples/0004-AddRARecordTransactionExample2-bundle.fsh index a00e0b5..7afd80e 100644 --- a/input/fsh/examples/0004-AddRARecordTransactionExample2-bundle.fsh +++ b/input/fsh/examples/0004-AddRARecordTransactionExample2-bundle.fsh @@ -15,19 +15,19 @@ Usage: #example * entry[=].resource = RAConditionExample1 * entry[=].request.method = #PUT * entry[=].request.url = "Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" -* entry[+].fullUrl = "urn:uuid:fba99f70-fe1d-42e2-b77a-916e44b53c19" +* entry[+].fullUrl = "Flag/RAPatientFlagExample1" * entry[=].resource = RAPatientFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19" -* entry[+].fullUrl = "urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85" +* entry[=].request.url = "Flag/RAPatientFlagExample1" +* entry[+].fullUrl = "Flag/RAFlagExample1" * entry[=].resource = RAFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85" -* entry[+].fullUrl = "urn:uuid:b19124e9-f742-49b4-9247-5c2d58ac1ef4" +* entry[=].request.url = "Flag/RAFlagExample1" +* entry[+].fullUrl = "Condition/RAConditionExample2" * entry[=].resource = RAConditionExample2 * entry[=].request.method = #PUT -* entry[=].request.url = "Condition/b19124e9-f742-49b4-9247-5c2d58ac1ef4" -* entry[+].fullUrl = "urn:uuid:212c1018-f52a-4db7-9bc2-59a88622eb4f" +* entry[=].request.url = "Condition/RAConditionExample2" +* entry[+].fullUrl = "Flag/RAFlagExample2" * entry[=].resource = RAFlagExample2 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/212c1018-f52a-4db7-9bc2-59a88622eb4f" +* entry[=].request.url = "Flag/RAFlagExample2" From f32dd144b4446c1689e0f2cd4bb6c8c6e338a0ae Mon Sep 17 00:00:00 2001 From: Declan Kieran Date: Wed, 27 Mar 2024 23:16:18 +0000 Subject: [PATCH 2/5] remove ci --- .../0005-add-ra-record-transaction-example.md | 1 - .../0006-add-ra-record-transaction-example.md | 1 - .../0007-add-ra-record-transaction-example.md | 1 - input/ci/queries/0008-get-all-flags.md | 1 - input/ci/queries/0009-get-flag-by-category.md | 1 - .../0010-get-flag-by-category-and-code.md | 1 - input/ci/queries/0011-delete-flag-by-id.md | 1 - ...dCPISRecordTransactionExample1-bundle.fsh} | 0 ...ddFGMRecordTransactionExample1-bundle.fsh} | 0 ...AddRARecordTransactionExample1-bundle.fsh} | 0 ...AddRARecordTransactionExample2-bundle.fsh} | 0 ...Example1.fsh => CPISConditionExample1.fsh} | 0 ...sentExample.fsh => CPISConsentExample.fsh} | 0 ...SFlagExample1.fsh => CPISFlagExample1.fsh} | 0 ...ample1.fsh => CPISPatientFlagExample1.fsh} | 0 ...nExample1.fsh => FGMConditionExample1.fsh} | 0 ...nsentExample.fsh => FGMConsentExample.fsh} | 0 ...GMFlagExample1.fsh => FGMFlagExample1.fsh} | 0 ...xample1.fsh => FGMPatientFlagExample1.fsh} | 0 ...atientExample1.fsh => PatientExample1.fsh} | 0 ...onExample1.fsh => RAConditionExample1.fsh} | 0 ...onExample2.fsh => RAConditionExample2.fsh} | 0 ...sentExample1.fsh => RAConsentExample1.fsh} | 0 ...issent.fsh => RAConsentExampleDissent.fsh} | 0 ...evoked.fsh => RAConsentExampleRevoked.fsh} | 0 ...-RAFlagExample1.fsh => RAFlagExample1.fsh} | 0 ...-RAFlagExample2.fsh => RAFlagExample2.fsh} | 0 ...Example1.fsh => RAPatientFlagExample1.fsh} | 0 ...dExample.fsh => RemoveRARecordExample.fsh} | 0 input/pagecontent/server-examples.md | 136 +----------------- scripts/run-examples.sh | 75 ---------- 31 files changed, 1 insertion(+), 217 deletions(-) delete mode 100644 input/ci/queries/0005-add-ra-record-transaction-example.md delete mode 100644 input/ci/queries/0006-add-ra-record-transaction-example.md delete mode 100644 input/ci/queries/0007-add-ra-record-transaction-example.md delete mode 100644 input/ci/queries/0008-get-all-flags.md delete mode 100644 input/ci/queries/0009-get-flag-by-category.md delete mode 100644 input/ci/queries/0010-get-flag-by-category-and-code.md delete mode 100644 input/ci/queries/0011-delete-flag-by-id.md rename input/fsh/examples/{0024-AddCPISRecordTransactionExample1-bundle.fsh => AddCPISRecordTransactionExample1-bundle.fsh} (100%) rename input/fsh/examples/{0029-AddFGMRecordTransactionExample1-bundle.fsh => AddFGMRecordTransactionExample1-bundle.fsh} (100%) rename input/fsh/examples/{0003-AddRARecordTransactionExample1-bundle.fsh => AddRARecordTransactionExample1-bundle.fsh} (100%) rename input/fsh/examples/{0004-AddRARecordTransactionExample2-bundle.fsh => AddRARecordTransactionExample2-bundle.fsh} (100%) rename input/fsh/examples/{0023-CPISConditionExample1.fsh => CPISConditionExample1.fsh} (100%) rename input/fsh/examples/{0020-CPISConsentExample.fsh => CPISConsentExample.fsh} (100%) rename input/fsh/examples/{0022-CPISFlagExample1.fsh => CPISFlagExample1.fsh} (100%) rename input/fsh/examples/{0021-CPISPatientFlagExample1.fsh => CPISPatientFlagExample1.fsh} (100%) rename input/fsh/examples/{0028-FGMConditionExample1.fsh => FGMConditionExample1.fsh} (100%) rename input/fsh/examples/{0025-FGMConsentExample.fsh => FGMConsentExample.fsh} (100%) rename input/fsh/examples/{0027-FGMFlagExample1.fsh => FGMFlagExample1.fsh} (100%) rename input/fsh/examples/{0026-FGMPatientFlagExample1.fsh => FGMPatientFlagExample1.fsh} (100%) rename input/fsh/examples/{0014-PatientExample1.fsh => PatientExample1.fsh} (100%) rename input/fsh/examples/{0017-RAConditionExample1.fsh => RAConditionExample1.fsh} (100%) rename input/fsh/examples/{0019-RAConditionExample2.fsh => RAConditionExample2.fsh} (100%) rename input/fsh/examples/{0013-RAConsentExample1.fsh => RAConsentExample1.fsh} (100%) rename input/fsh/examples/{0030-RAConsentExampleDissent.fsh => RAConsentExampleDissent.fsh} (100%) rename input/fsh/examples/{0031-RAConsentExampleRevoked.fsh => RAConsentExampleRevoked.fsh} (100%) rename input/fsh/examples/{0016-RAFlagExample1.fsh => RAFlagExample1.fsh} (100%) rename input/fsh/examples/{0018-RAFlagExample2.fsh => RAFlagExample2.fsh} (100%) rename input/fsh/examples/{0015-RAPatientFlagExample1.fsh => RAPatientFlagExample1.fsh} (100%) rename input/fsh/examples/{0012-RemoveRARecordExample.fsh => RemoveRARecordExample.fsh} (100%) delete mode 100755 scripts/run-examples.sh diff --git a/input/ci/queries/0005-add-ra-record-transaction-example.md b/input/ci/queries/0005-add-ra-record-transaction-example.md deleted file mode 100644 index 35ce7e1..0000000 --- a/input/ci/queries/0005-add-ra-record-transaction-example.md +++ /dev/null @@ -1 +0,0 @@ -GET /Patient?identifier=9912003888&_revinclude=Consent:patient&_revinclude=Flag:patient&_revinclude=Condition:patient diff --git a/input/ci/queries/0006-add-ra-record-transaction-example.md b/input/ci/queries/0006-add-ra-record-transaction-example.md deleted file mode 100644 index 35ce7e1..0000000 --- a/input/ci/queries/0006-add-ra-record-transaction-example.md +++ /dev/null @@ -1 +0,0 @@ -GET /Patient?identifier=9912003888&_revinclude=Consent:patient&_revinclude=Flag:patient&_revinclude=Condition:patient diff --git a/input/ci/queries/0007-add-ra-record-transaction-example.md b/input/ci/queries/0007-add-ra-record-transaction-example.md deleted file mode 100644 index ad0f11f..0000000 --- a/input/ci/queries/0007-add-ra-record-transaction-example.md +++ /dev/null @@ -1 +0,0 @@ -GET /Flag?patient:Patient.identifier=9912003888 \ No newline at end of file diff --git a/input/ci/queries/0008-get-all-flags.md b/input/ci/queries/0008-get-all-flags.md deleted file mode 100644 index 06eace2..0000000 --- a/input/ci/queries/0008-get-all-flags.md +++ /dev/null @@ -1 +0,0 @@ -GET /Flag/ \ No newline at end of file diff --git a/input/ci/queries/0009-get-flag-by-category.md b/input/ci/queries/0009-get-flag-by-category.md deleted file mode 100644 index 8cb8491..0000000 --- a/input/ci/queries/0009-get-flag-by-category.md +++ /dev/null @@ -1 +0,0 @@ -GET /Flag?category=NRAF \ No newline at end of file diff --git a/input/ci/queries/0010-get-flag-by-category-and-code.md b/input/ci/queries/0010-get-flag-by-category-and-code.md deleted file mode 100644 index ff67fc0..0000000 --- a/input/ci/queries/0010-get-flag-by-category-and-code.md +++ /dev/null @@ -1 +0,0 @@ -GET /Flag?category=NRAF&code=001 \ No newline at end of file diff --git a/input/ci/queries/0011-delete-flag-by-id.md b/input/ci/queries/0011-delete-flag-by-id.md deleted file mode 100644 index e8e2dc5..0000000 --- a/input/ci/queries/0011-delete-flag-by-id.md +++ /dev/null @@ -1 +0,0 @@ -DELETE /Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85 \ No newline at end of file diff --git a/input/fsh/examples/0024-AddCPISRecordTransactionExample1-bundle.fsh b/input/fsh/examples/AddCPISRecordTransactionExample1-bundle.fsh similarity index 100% rename from input/fsh/examples/0024-AddCPISRecordTransactionExample1-bundle.fsh rename to input/fsh/examples/AddCPISRecordTransactionExample1-bundle.fsh diff --git a/input/fsh/examples/0029-AddFGMRecordTransactionExample1-bundle.fsh b/input/fsh/examples/AddFGMRecordTransactionExample1-bundle.fsh similarity index 100% rename from input/fsh/examples/0029-AddFGMRecordTransactionExample1-bundle.fsh rename to input/fsh/examples/AddFGMRecordTransactionExample1-bundle.fsh diff --git a/input/fsh/examples/0003-AddRARecordTransactionExample1-bundle.fsh b/input/fsh/examples/AddRARecordTransactionExample1-bundle.fsh similarity index 100% rename from input/fsh/examples/0003-AddRARecordTransactionExample1-bundle.fsh rename to input/fsh/examples/AddRARecordTransactionExample1-bundle.fsh diff --git a/input/fsh/examples/0004-AddRARecordTransactionExample2-bundle.fsh b/input/fsh/examples/AddRARecordTransactionExample2-bundle.fsh similarity index 100% rename from input/fsh/examples/0004-AddRARecordTransactionExample2-bundle.fsh rename to input/fsh/examples/AddRARecordTransactionExample2-bundle.fsh diff --git a/input/fsh/examples/0023-CPISConditionExample1.fsh b/input/fsh/examples/CPISConditionExample1.fsh similarity index 100% rename from input/fsh/examples/0023-CPISConditionExample1.fsh rename to input/fsh/examples/CPISConditionExample1.fsh diff --git a/input/fsh/examples/0020-CPISConsentExample.fsh b/input/fsh/examples/CPISConsentExample.fsh similarity index 100% rename from input/fsh/examples/0020-CPISConsentExample.fsh rename to input/fsh/examples/CPISConsentExample.fsh diff --git a/input/fsh/examples/0022-CPISFlagExample1.fsh b/input/fsh/examples/CPISFlagExample1.fsh similarity index 100% rename from input/fsh/examples/0022-CPISFlagExample1.fsh rename to input/fsh/examples/CPISFlagExample1.fsh diff --git a/input/fsh/examples/0021-CPISPatientFlagExample1.fsh b/input/fsh/examples/CPISPatientFlagExample1.fsh similarity index 100% rename from input/fsh/examples/0021-CPISPatientFlagExample1.fsh rename to input/fsh/examples/CPISPatientFlagExample1.fsh diff --git a/input/fsh/examples/0028-FGMConditionExample1.fsh b/input/fsh/examples/FGMConditionExample1.fsh similarity index 100% rename from input/fsh/examples/0028-FGMConditionExample1.fsh rename to input/fsh/examples/FGMConditionExample1.fsh diff --git a/input/fsh/examples/0025-FGMConsentExample.fsh b/input/fsh/examples/FGMConsentExample.fsh similarity index 100% rename from input/fsh/examples/0025-FGMConsentExample.fsh rename to input/fsh/examples/FGMConsentExample.fsh diff --git a/input/fsh/examples/0027-FGMFlagExample1.fsh b/input/fsh/examples/FGMFlagExample1.fsh similarity index 100% rename from input/fsh/examples/0027-FGMFlagExample1.fsh rename to input/fsh/examples/FGMFlagExample1.fsh diff --git a/input/fsh/examples/0026-FGMPatientFlagExample1.fsh b/input/fsh/examples/FGMPatientFlagExample1.fsh similarity index 100% rename from input/fsh/examples/0026-FGMPatientFlagExample1.fsh rename to input/fsh/examples/FGMPatientFlagExample1.fsh diff --git a/input/fsh/examples/0014-PatientExample1.fsh b/input/fsh/examples/PatientExample1.fsh similarity index 100% rename from input/fsh/examples/0014-PatientExample1.fsh rename to input/fsh/examples/PatientExample1.fsh diff --git a/input/fsh/examples/0017-RAConditionExample1.fsh b/input/fsh/examples/RAConditionExample1.fsh similarity index 100% rename from input/fsh/examples/0017-RAConditionExample1.fsh rename to input/fsh/examples/RAConditionExample1.fsh diff --git a/input/fsh/examples/0019-RAConditionExample2.fsh b/input/fsh/examples/RAConditionExample2.fsh similarity index 100% rename from input/fsh/examples/0019-RAConditionExample2.fsh rename to input/fsh/examples/RAConditionExample2.fsh diff --git a/input/fsh/examples/0013-RAConsentExample1.fsh b/input/fsh/examples/RAConsentExample1.fsh similarity index 100% rename from input/fsh/examples/0013-RAConsentExample1.fsh rename to input/fsh/examples/RAConsentExample1.fsh diff --git a/input/fsh/examples/0030-RAConsentExampleDissent.fsh b/input/fsh/examples/RAConsentExampleDissent.fsh similarity index 100% rename from input/fsh/examples/0030-RAConsentExampleDissent.fsh rename to input/fsh/examples/RAConsentExampleDissent.fsh diff --git a/input/fsh/examples/0031-RAConsentExampleRevoked.fsh b/input/fsh/examples/RAConsentExampleRevoked.fsh similarity index 100% rename from input/fsh/examples/0031-RAConsentExampleRevoked.fsh rename to input/fsh/examples/RAConsentExampleRevoked.fsh diff --git a/input/fsh/examples/0016-RAFlagExample1.fsh b/input/fsh/examples/RAFlagExample1.fsh similarity index 100% rename from input/fsh/examples/0016-RAFlagExample1.fsh rename to input/fsh/examples/RAFlagExample1.fsh diff --git a/input/fsh/examples/0018-RAFlagExample2.fsh b/input/fsh/examples/RAFlagExample2.fsh similarity index 100% rename from input/fsh/examples/0018-RAFlagExample2.fsh rename to input/fsh/examples/RAFlagExample2.fsh diff --git a/input/fsh/examples/0015-RAPatientFlagExample1.fsh b/input/fsh/examples/RAPatientFlagExample1.fsh similarity index 100% rename from input/fsh/examples/0015-RAPatientFlagExample1.fsh rename to input/fsh/examples/RAPatientFlagExample1.fsh diff --git a/input/fsh/examples/0012-RemoveRARecordExample.fsh b/input/fsh/examples/RemoveRARecordExample.fsh similarity index 100% rename from input/fsh/examples/0012-RemoveRARecordExample.fsh rename to input/fsh/examples/RemoveRARecordExample.fsh diff --git a/input/pagecontent/server-examples.md b/input/pagecontent/server-examples.md index 9979eab..523064e 100644 --- a/input/pagecontent/server-examples.md +++ b/input/pagecontent/server-examples.md @@ -24,140 +24,6 @@ The HAPI starter project provides an OAS interface to the supported FHIR API. A http://localhost:8080/fhir/swagger-ui/index.html ``` -#### CI Build - -These examples are loaded into a running FHIR server during the IG build. Some resources (queries) are dynamically generated and added to the IG at build time. (TODO add a list of dynamically generated resources somewhere). - #### Postman -All examples are available in a [Postman collection](assets/postman/postman_collection.json). - -### Examples - -The examples here describe the API options related to the workflow given in the use case [Add RA Record](add-reasonable-adjustment-record.html). - -See the [Data Model](data-model.html) for details on the relationships between the resources. - -#### Add RA Record - -This section provides examples for those given in the use case [Add RA Record](add-reasonable-adjustment-record.html). - -##### Example 1 - -TODO - -##### Example 2 - -The first example [Bundle transaction](Bundle-AddRARecordTransactionExample1.html) adds an RA record consisting of - -* a Patient resource -* a Consent resource -* a (patient) Flag resource (is this really needed?) -* a Condition resource (associated with the following Flag) -* a Flag resource (associated with the Condition) - -These resources are contained in a transaction Bundle, which provides atomicity as well as a more network efficent call. - -Each Flag resource (TODO embed in all or make separate)has a Provenance resource embedded in it. (TODO maybe a futher discussion section somewhere on options for provenance, i.e. linking to versions, _history and transaction considerations, options to use etag or X-provenance). - -Another example [Bundle transaction](Bundle-AddRARecordTransactionExample2.html) modifies the first transaction by adding additional resources for another Condition and adjustment (Flag). - -The transactions are using PUT's to provide (upsert)[https://hl7.org/fhir/http.html#upsert] functionality. The HAPI Starter Server (provided via docker) supports this part of the specification. - -#### Retrieve RA Record - -This section provides examples for those given in the use case [Retrieve RA Record](retrieve-reasonable-adjustment-record.html). - -##### Example 1 - -For each transaction example provided in the previous section, the following query will performed (dynamically during the IG build) - -``` -GET /Patient?identifier=9912003888&_revinclude=Consent:patient&_revinclude=Flag:patient&_revinclude=Condition:patient -``` - -This query will return the Patient resource using the patients NHS number (TODO will be profiled to check for this, reference this later). The assocaited resources that make up the RA are also returned, such as -* Consent resources (maybe link to profiles here) -* Flag resources -* Condition resources -which are all returned using default Patient SearchParameters (defined in the base specification). - -First Bundle example: - -* [Bundle transaction](Bundle-AddRARecordTransactionExample1.html) -* [Query output](Bundle-QUERY-OUTPUT--0005-add-ra-record-transaction-example.html) - -Second Bundle example: - -* [Bundle transaction](Bundle-AddRARecordTransactionExample2.html) -* [Query output](Bundle-QUERY-OUTPUT--0006-add-ra-record-transaction-example.html) - -#### Remove RA Record - -This section provides examples for those given in the use case [Remove RA Record](todo.html). - -##### Example 1 - -TODO (@vickyjaiswal0308) - -### Other Query Examples - -These queries are ran after all other write (Create, Update) examples and corresponding queries have been ran. - -#### Read all Flags - -Query: -``` -GET /Flag -``` - -* [Query output](Bundle-QUERY-OUTPUT--0008-get-all-flags.html) - -#### Get Flag by Category - -**Note:** this requires a [custom SearchParameter](SearchParameter-FlagCategory.html) - -Query: -``` -GET /Flag?category=NRAF -``` - -* [Query output](Bundle-QUERY-OUTPUT--0009-get-flag-by-category.html) - -#### Get Flag by Category and Code - -**Note:** this requires a [custom SearchParameter](SearchParameter-FlagCode.html) - -Query: -``` -GET /Flag?category=NRAF&code=001 -``` - -* [Query output](Bundle-QUERY-OUTPUT--0010-get-flag-by-category-and-code.html) - -#### Get Flag by Category and Code and supporting resources - -**Note:** this requires [an extension] to link to the supporting resources and a [custom SearchParameter](todo.html) to allow for the use of [_include parameters](https://www.hl7.org/fhir/search.html#include) - -* [Query output](todo.html) - -#### Delete Flag by ID - -Query: -``` -GET /Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85 -``` - -* [Query output](OperationOutcome-QUERY-OUTPUT--0011-delete-flag-by-id.html) - -#### POST to /Resource - -TODO - -#### Delete supporting resource - -will be covered by remove RA record - -#### Delete a resource using it's ID - -This seems to be covered in section 'Delete Flag by ID'? \ No newline at end of file +All examples and some queries are available in a [Postman collection](assets/postman/postman_collection.json). diff --git a/scripts/run-examples.sh b/scripts/run-examples.sh deleted file mode 100755 index 49d64a5..0000000 --- a/scripts/run-examples.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -# TODO Document how to organise the examples and queries in the IG -# Probably makes more sense just to describe the queries and add output in statically, rather trying to combine integrations testing -# into the build of the IG. See if it serves as a useful example... - -# TODO - Make the script runnable from any path, currently needs to be ran from root of repo -SCRIPT_ROOT=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ); - -# Use SUSHI to generate resources from fsh -sushi . - -SERVER_BASE="http://localhost:8080/fhir/" -HEADERS="Content-type:application/fhir+json;fhirVersion=4.0" - -# SearchParameters need to be loaded first, otherwise its likely they'll not have been indexed by the HAPI server -SEARCHPARAMETERS_DIR=fsh-generated/resources/SearchParameter* - -for file in $SEARCHPARAMETERS_DIR; do - curl -X POST -H $HEADERS -d @$file $SERVER_BASE/SearchParameter; -done - -# TODO Parameterise this to make it general for sushi and standalone hl7 publisher, few other things would need tweaked as well... -FSH_EXAMPLES_DIR=input/fsh/examples -FSH_GENERATED_DIR=fsh-generated/resources -QUERIES_DIR=input/ci/queries - -# Make resources folder if it doesn't already exist -mkdir -p ./input/resources - -for file in $(find {$FSH_EXAMPLES_DIR,$QUERIES_DIR} -type f | sort -t\/ -k4); do - case $(dirname $file) in - - $FSH_EXAMPLES_DIR) - # Get the example ID from the filename - EXAMPLE_ID=$(basename ${file%.*} | awk -F '-' '{print $2}'); - - # Construct path to generated JSON resource - TODO this implies the id will be unique and not a subset of another... - GENERATED=$(echo ./$FSH_GENERATED_DIR/*$EXAMPLE_ID*); - echo "---------------------"; - echo $GENERATED; - echo "---------------------"; - - # Sushi will prepend the name of the Resource, which will be used in the server calls. - RESOURCE_NAME=$(echo $GENERATED | awk -F '/' '{print $4}' | awk -F '-' '{print $1}'); - - # Assumption here that Bundle examples will be transactions, guessing it'll fail if not... - # Set RESOURCE_NAME to empty string so post is made to the base server url. - if [ "$RESOURCE_NAME" == "Bundle" ]; then - RESOURCE_NAME="" - fi; - - curl -X POST -H $HEADERS -d @$GENERATED $SERVER_BASE$RESOURCE_NAME; - ;; - - $QUERIES_DIR) - # Get HTTP verb and Query path - QUERY=$(cat $file); - - # Tokinise the query string, ReST verb and path separated by space - QUERY_TOKENS=(${QUERY// / }) - - # Strip the path and the extension - QUERY_FILE=$(basename $file | awk -F '.' '{print $1}'); - - # Run the query and output the result - curl -X ${QUERY_TOKENS[0]} $SERVER_BASE${QUERY_TOKENS[1]} | jq '.id = "QUERY-OUTPUT--'$QUERY_FILE'"' > ./input/resources/QUERY-OUTPUT--$QUERY_FILE.json - ;; - - *) - echo "Unknown directory: $(dirname $file)" - exit 1 - ;; - esac -done From 26d40d1bb7aefc6196076dda1bb9d21095fa5bad Mon Sep 17 00:00:00 2001 From: Declan Kieran Date: Wed, 27 Mar 2024 23:39:01 +0000 Subject: [PATCH 3/5] tidy id's and updated postman collection --- .../assets/postman/postman_collection.json | 455 ++++++++++++++++-- ...ddCPISRecordTransactionExample1-bundle.fsh | 20 +- ...AddFGMRecordTransactionExample1-bundle.fsh | 20 +- .../AddRARecordTransactionExample1-bundle.fsh | 12 +- .../AddRARecordTransactionExample2-bundle.fsh | 12 +- input/pagecontent/server-examples.md | 2 +- 6 files changed, 453 insertions(+), 68 deletions(-) diff --git a/ig-template/package/content/assets/postman/postman_collection.json b/ig-template/package/content/assets/postman/postman_collection.json index 459cff9..c531d18 100644 --- a/ig-template/package/content/assets/postman/postman_collection.json +++ b/ig-template/package/content/assets/postman/postman_collection.json @@ -1,7 +1,7 @@ { "info": { - "_postman_id": "adb3f331-e89f-4548-b96b-b781a41eba64", - "name": "ReasonableAdjustmentsExamples", + "_postman_id": "5911c4df-e4e8-4ef1-ae75-bf22a688d9cc", + "name": "Reasonable Adjustments Examples", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "32605342" }, @@ -68,14 +68,29 @@ "response": [] }, { - "name": "Extension Flag.detail - TODO", + "name": "Extension Flag.detail", "request": { "method": "POST", "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"SearchParameter\",\n \"id\": \"FlagDetail\",\n \"url\": \"http://localhost:8080/fhir/SearchParameter/FlagDetail\",\n \"name\": \"SearchParameter for flag detail extension used in Flag\",\n \"title\": \"SearchParameter for Flag.extension where url=http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"status\": \"active\",\n \"description\": \"Search using extension for flag detail extension in Flag resource\",\n \"code\": \"detail\",\n \"base\": [\"Flag\"],\n \"type\": \"reference\",\n \"expression\": \"Flag.extension('http://hl7.org/fhir/StructureDefinition/flag-detail')\",\n \"target\": [\"Condition\", \"Flag\", \"Consent\"]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, "url": { - "raw": "TODO", + "raw": "http://localhost:8080/fhir/SearchParameter", + "protocol": "http", "host": [ - "TODO" + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "SearchParameter" ] } }, @@ -84,30 +99,44 @@ ] }, { - "name": "Add RA Record", + "name": "Transaction Bundles", "item": [ { - "name": "Example 1", + "name": "AddRARecordTransactionExample1", "request": { "method": "POST", "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"AddRARecordTransactionExample1\",\n \"entry\": [\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Patient/PatientExample1\"\n },\n \"fullUrl\": \"Patient/PatientExample1\",\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"PatientExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ]\n },\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9912003888\"\n }\n ],\n \"name\": [\n {\n \"given\": [\n \"Alan\"\n ],\n \"use\": \"official\",\n \"family\": \"Mann\"\n }\n ],\n \"active\": true,\n \"gender\": \"male\",\n \"birthDate\": \"1970-01-01\"\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Consent/RAConsentExample1\"\n },\n \"fullUrl\": \"Consent/RAConsentExample1\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"RAConsentExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagConsent\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent create summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentCreateSummary\"\n },\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent remove summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentRemoveSummary\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"code\": \"RACONSENT\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConsentPurpose\",\n \"display\": \"Reasonable Adjustments - Consent to record Reasonable Adjustments\"\n }\n ]\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"4c75ce1f-1ad7-4391-b5f6-104754c7e904\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/PatientExample1\"\n },\n \"policyRule\": {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FlagProxyRole\"\n }\n ]\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition/RAConditionExample1\"\n },\n \"fullUrl\": \"Condition/RAConditionExample1\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"RAConditionExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagCondition\"\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"issue\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCategory\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"6a6b18a7-c077-49da-929f-a8dd38468f79\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"code\": {\n \"coding\": [\n {\n \"code\": \"5\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCode\",\n \"display\": \"Learning or understanding or concentrating\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/RAPatientFlagExample1\"\n },\n \"fullUrl\": \"Flag/RAPatientFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"RAPatientFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/PatientFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in patient flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n },\n {\n \"valueReference\": {\n \"reference\": \"Condition/RAConditionExample1\",\n \"type\": \"Condition\"\n },\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\"\n },\n {\n \"valueReference\": {\n \"reference\": \"Consent/RAConsentExample1\",\n \"type\": \"Consent\"\n },\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\"\n },\n {\n \"valueReference\": {\n \"reference\": \"Flag/RAFlagExample1\",\n \"type\": \"Flag\"\n },\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"c4e2e862-3bf4-4176-a186-9f1732938260\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/RAFlagExample1\"\n },\n \"fullUrl\": \"Flag/RAFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"RAFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/ProgrammeFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in adjustment flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-FlagCategory\",\n \"display\": \"Communication support\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"873a38eb-0f9c-4a66-a4e9-8e4be2350d6b\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"1082681000000103\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Requires support for receptive communication needs\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n }\n ],\n \"type\": \"transaction\"\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, "url": { - "raw": "TODO", + "raw": "http://localhost:8080/fhir", + "protocol": "http", "host": [ - "TODO" + "localhost" + ], + "port": "8080", + "path": [ + "fhir" ] } }, "response": [] }, { - "name": "Example 2.1", + "name": "AddRARecordTransactionExample2", "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"add-condition-transaction-example-1\",\n \"type\": \"transaction\",\n \"entry\": [\n {\n \"fullUrl\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\",\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"patient-example-1\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9912003888\"\n }\n ],\n \"active\": true,\n \"name\": [\n {\n \"use\": \"official\",\n \"family\": \"Duck\",\n \"given\": [\n \"Donald\"\n ]\n }\n ],\n \"gender\": \"male\",\n \"birthDate\": \"1970-01-01\"\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Patient?identifier=9912003888\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"consent-example-1\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"code\": \"370856009\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Limiting access to confidential patient information\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ]\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Consent?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"condition-example-1\",\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"issue\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"code\": \"5\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ConditionCode-1\",\n \"display\": \"Learning or understanding or concentrating\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n }\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"master-flag-example-1\",\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n },\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://hl7.org/fhir/v3/DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ]\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"condition-flag-example-1\",\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1\",\n \"display\": \"Communication support\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n },\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://hl7.org/fhir/v3/DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ]\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85\"\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"AddRARecordTransactionExample2\",\n \"entry\": [\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Patient/PatientExample1\"\n },\n \"fullUrl\": \"Patient/PatientExample1\",\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"PatientExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ]\n },\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9912003888\"\n }\n ],\n \"name\": [\n {\n \"given\": [\n \"Alan\"\n ],\n \"use\": \"official\",\n \"family\": \"Mann\"\n }\n ],\n \"active\": true,\n \"gender\": \"male\",\n \"birthDate\": \"1970-01-01\"\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Consent/RAConsentExample1\"\n },\n \"fullUrl\": \"Consent/RAConsentExample1\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"RAConsentExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagConsent\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent create summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentCreateSummary\"\n },\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent remove summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentRemoveSummary\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"code\": \"RACONSENT\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConsentPurpose\",\n \"display\": \"Reasonable Adjustments - Consent to record Reasonable Adjustments\"\n }\n ]\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"4c75ce1f-1ad7-4391-b5f6-104754c7e904\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/PatientExample1\"\n },\n \"policyRule\": {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FlagProxyRole\"\n }\n ]\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition/RAConditionExample1\"\n },\n \"fullUrl\": \"Condition/RAConditionExample1\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"RAConditionExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagCondition\"\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"issue\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCategory\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"6a6b18a7-c077-49da-929f-a8dd38468f79\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"code\": {\n \"coding\": [\n {\n \"code\": \"5\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCode\",\n \"display\": \"Learning or understanding or concentrating\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/RAPatientFlagExample1\"\n },\n \"fullUrl\": \"Flag/RAPatientFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"RAPatientFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/PatientFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in patient flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n },\n {\n \"valueReference\": {\n \"reference\": \"Condition/RAConditionExample1\",\n \"type\": \"Condition\"\n },\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\"\n },\n {\n \"valueReference\": {\n \"reference\": \"Consent/RAConsentExample1\",\n \"type\": \"Consent\"\n },\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\"\n },\n {\n \"valueReference\": {\n \"reference\": \"Flag/RAFlagExample1\",\n \"type\": \"Flag\"\n },\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"c4e2e862-3bf4-4176-a186-9f1732938260\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/RAFlagExample1\"\n },\n \"fullUrl\": \"Flag/RAFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"RAFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/ProgrammeFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in adjustment flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-FlagCategory\",\n \"display\": \"Communication support\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"873a38eb-0f9c-4a66-a4e9-8e4be2350d6b\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"1082681000000103\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Requires support for receptive communication needs\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition/RAConditionExample2\"\n },\n \"fullUrl\": \"Condition/RAConditionExample2\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"RAConditionExample2\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagCondition\"\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"issue\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCategory\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"f55e1edc-8ac7-4e06-b322-25fd34e62249\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"code\": {\n \"coding\": [\n {\n \"code\": \"9\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-ConditionCode\",\n \"display\": \"Social or behavioural (for example associated with autism spectrum disorder (ASD) which includes Asperger’s, or attention deficit hyperactivity disorder (ADHD))\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/RAFlagExample2\"\n },\n \"fullUrl\": \"Flag/RAFlagExample2\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"RAFlagExample2\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/ProgrammeFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of adjustment notes extension text in adjustment flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"011\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/RA-FlagCategory\",\n \"display\": \"Bespoke Reasonable adjustments\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"71f8bcda-242d-4401-a59c-6924a6cb1c0e\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"73618009\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Autistic spectrum disorder with isolated skills\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n }\n ],\n \"type\": \"transaction\"\n}\n", "options": { "raw": { "language": "json" @@ -129,13 +158,80 @@ "response": [] }, { - "name": "Example 2.1", + "name": "RemoveRARecordExample", "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"add-condition-transaction-example-1\",\n \"type\": \"transaction\",\n \"entry\": [\n {\n \"fullUrl\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\",\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"patient-example-1\",\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9912003888\"\n }\n ],\n \"active\": true,\n \"name\": [\n {\n \"use\": \"official\",\n \"family\": \"Duck\",\n \"given\": [\n \"Donald\"\n ]\n }\n ],\n \"gender\": \"male\",\n \"birthDate\": \"1970-01-01\"\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Patient?identifier=9912003888\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"consent-example-1\",\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"code\": \"370856009\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Limiting access to confidential patient information\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ]\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Consent?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"master-flag-example-1\",\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n },\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://hl7.org/fhir/v3/DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ]\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"condition-example-1\",\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"issue\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"code\": \"5\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ConditionCode-1\",\n \"display\": \"Learning or understanding or concentrating\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n }\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:04adcb5b-3de7-4f67-97f0-b2fdf941ba85\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"condition-flag-example-1\",\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1\",\n \"display\": \"Communication support\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n },\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://hl7.org/fhir/v3/DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ]\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:09264d2-3986-458b-91eb-e7482b4c3025\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"condition-example-2\",\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"issue\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"code\": \"73618009\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Autistic spectrum disorder with isolated skills\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n }\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition/09264d2-3986-458b-91eb-e7482b4c3025\"\n }\n },\n {\n \"fullUrl\": \"urn:uuid:212c1018-f52a-4db7-9bc2-59a88622eb4f\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"condition-flag-example-2\",\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1\",\n \"display\": \"Communication support\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"NRAF\",\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"subject\": {\n \"reference\": \"urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77\"\n },\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://hl7.org/fhir/v3/DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ]\n },\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/212c1018-f52a-4db7-9bc2-59a88622eb4f\"\n }\n }\n ]\n}", + "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"RemoveRARecordExample\",\n \"entry\": [\n {\n \"request\": {\n \"method\": \"DELETE\",\n \"url\": \"Flag/RAPatientFlagExample1\"\n }\n },\n {\n \"request\": {\n \"method\": \"DELETE\",\n \"url\": \"Consent/RAConsentExample1\"\n }\n },\n {\n \"request\": {\n \"method\": \"DELETE\",\n \"url\": \"Condition/RAConditionExample1\"\n }\n }\n ],\n \"type\": \"transaction\"\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8080/fhir", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "fhir" + ] + } + }, + "response": [] + }, + { + "name": "AddCPISRecordTransactionExample1", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"AddCPISRecordTransactionExample1\",\n \"entry\": [\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Patient/PatientExample1\"\n },\n \"fullUrl\": \"Patient/PatientExample1\",\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"PatientExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ]\n },\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9912003888\"\n }\n ],\n \"name\": [\n {\n \"given\": [\n \"Alan\"\n ],\n \"use\": \"official\",\n \"family\": \"Mann\"\n }\n ],\n \"active\": true,\n \"gender\": \"male\",\n \"birthDate\": \"1970-01-01\"\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Consent/CPISConsentExample1\"\n },\n \"fullUrl\": \"Consent/CPISConsentExample1\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"CPISConsentExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagConsent\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent create summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentCreateSummary\"\n },\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent remove summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentRemoveSummary\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"CP-IS\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Child Protection - Information Sharing Flag\"\n }\n ]\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"code\": \"CPISCONSENT\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/CPIS-ConsentPurpose\",\n \"display\": \"CPIS - Consent to record CPIS flags\"\n }\n ]\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"51a731b3-1c46-47ba-abad-04209bd264e6\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/PatientExample1\"\n },\n \"policyRule\": {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FlagProxyRole\"\n }\n ]\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition/CPISConditionExample1\"\n },\n \"fullUrl\": \"Condition/CPISConditionExample1\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"CPISConditionExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagCondition\"\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"CP-IS\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Child Protection - Information Sharing Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"cpis-example-condition-category\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/CPIS-ConditionCategory\",\n \"display\": \"CPIS example condition category\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"482155c0-9ed3-4b22-b7b8-009f265606cc\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"code\": {\n \"coding\": [\n {\n \"code\": \"1\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/CPIS-ConditionCode\",\n \"display\": \"CPIS example condition code\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/CPISPatientFlagExample1\"\n },\n \"fullUrl\": \"Flag/CPISPatientFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"CPISPatientFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/PatientFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in patient flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"42b9f285-0f1b-435a-ba6e-c72762d6502e\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"CP-IS\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Child Protection - Information Sharing Flag\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/CPISFlagExample1\"\n },\n \"fullUrl\": \"Flag/CPISFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"CPISFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/ProgrammeFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in adjustment flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"CP-IS\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Child Protection - Information Sharing Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/CPIS-FlagCategory\",\n \"display\": \"Example CPIS category\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"ea77b434-585a-48b9-a789-eac610f0363e\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"224353004\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Child protection finding (finding)\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n }\n ],\n \"type\": \"transaction\"\n}\n", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:8080/fhir/Flag?patient=patient-example-1&category=PatientFlag", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "Flag" + ], + "query": [ + { + "key": "patient", + "value": "patient-example-1" + }, + { + "key": "category", + "value": "PatientFlag" + } + ] + } + }, + "response": [] + }, + { + "name": "AddFGMRecordTransactionExample1", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"AddFGMRecordTransactionExample1\",\n \"entry\": [\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Patient/PatientExample1\"\n },\n \"fullUrl\": \"Patient/PatientExample1\",\n \"resource\": {\n \"resourceType\": \"Patient\",\n \"id\": \"PatientExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient\"\n ]\n },\n \"identifier\": [\n {\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\n \"value\": \"9912003888\"\n }\n ],\n \"name\": [\n {\n \"given\": [\n \"Alan\"\n ],\n \"use\": \"official\",\n \"family\": \"Mann\"\n }\n ],\n \"active\": true,\n \"gender\": \"male\",\n \"birthDate\": \"1970-01-01\"\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Consent/FGMConsentExample1\"\n },\n \"fullUrl\": \"Consent/FGMConsentExample1\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"FGMConsentExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagConsent\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent create summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentCreateSummary\"\n },\n {\n \"valueAnnotation\": {\n \"text\": \"Example of consent remove summary extension text\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-ConsentRemoveSummary\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"FGM\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Female Genital Mutilation Flag\"\n }\n ]\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"code\": \"FGMCONSENT\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FGM-ConsentPurpose\",\n \"display\": \"FGM - Consent to record FGM flags\"\n }\n ]\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"bc0dbfb1-7432-46fa-b1b8-0e3648827754\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"code\": \"patient-privacy\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\"\n }\n ]\n },\n \"patient\": {\n \"reference\": \"Patient/PatientExample1\"\n },\n \"policyRule\": {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FlagProxyRole\"\n }\n ]\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Condition/FGMConditionExample1\"\n },\n \"fullUrl\": \"Condition/FGMConditionExample1\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"FGMConditionExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/FlagCondition\"\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"FGM\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Female Genital Mutilation Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"fgm-example-condition-category\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FGM-ConditionCategory\",\n \"display\": \"FGM example condition category\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"e78b78b2-31f9-453d-b278-6d5720001073\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"code\": \"active\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\"\n }\n ]\n },\n \"code\": {\n \"coding\": [\n {\n \"code\": \"1\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FGM-ConditionCode\",\n \"display\": \"FGM example condition code\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/FGMPatientFlagExample1\"\n },\n \"fullUrl\": \"Flag/FGMPatientFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"FGMPatientFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/PatientFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in patient flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"3fc83fd8-4a6d-48e4-91ab-12bb10a4a834\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"FGM\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Female Genital Mutilation Flag\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n },\n {\n \"request\": {\n \"method\": \"PUT\",\n \"url\": \"Flag/FGMFlagExample1\"\n },\n \"fullUrl\": \"Flag/FGMFlagExample1\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"FGMFlagExample1\",\n \"meta\": {\n \"profile\": [\n \"https://fhir.nhs.uk/England/StructureDefinition/ProgrammeFlag\"\n ]\n },\n \"extension\": [\n {\n \"valueAnnotation\": {\n \"text\": \"Example of flag notes extension text in adjustment flag\"\n },\n \"url\": \"https://fhir.nhs.uk/England/StructureDefinition/Extension-FlagNotes\"\n }\n ],\n \"category\": [\n {\n \"coding\": [\n {\n \"code\": \"FGM\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/PatientFlagCategory\",\n \"display\": \"Female Genital Mutilation Flag\"\n }\n ]\n },\n {\n \"coding\": [\n {\n \"code\": \"001\",\n \"system\": \"https://fhir.nhs.uk/England/CodeSystem/FGM-FlagCategory\",\n \"display\": \"Example FGM category\"\n }\n ]\n }\n ],\n \"contained\": [\n {\n \"resourceType\": \"Provenance\",\n \"id\": \"9b5f2d1b-8175-407f-a49d-b4f04c9d4300\",\n \"target\": [\n {\n \"reference\": \"#\"\n }\n ],\n \"recorded\": \"2024-01-01T11:00:00+00:00\",\n \"activity\": {\n \"coding\": [\n {\n \"code\": \"CREATE\",\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-DataOperation\",\n \"display\": \"create\"\n }\n ]\n },\n \"agent\": [\n {\n \"role\": [\n {\n \"coding\": [\n {\n \"code\": \"R0260\",\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1\",\n \"display\": \"General Medical Practitioner\"\n }\n ]\n }\n ],\n \"who\": {\n \"reference\": \"https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9\"\n },\n \"onBehalfOf\": {\n \"reference\": \"https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7\"\n }\n }\n ]\n }\n ],\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"code\": \"902961000000107\",\n \"system\": \"https://snomed.info/sct\",\n \"display\": \"Family history of female genital mutilation (situation)\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/PatientExample1\"\n }\n }\n }\n ],\n \"type\": \"transaction\"\n}\n", "options": { "raw": { "language": "json" @@ -159,10 +255,10 @@ ] }, { - "name": "Retrieve RA Record", + "name": "Patient Endpoint Queries", "item": [ { - "name": "Example 1", + "name": "Return all NRAF associated resources for a patient", "request": { "method": "GET", "header": [], @@ -202,21 +298,324 @@ ] }, { - "name": "Remove RA Record", + "name": "Flag Endpoint Queries", "item": [ { - "name": "TODO", + "name": "Get all top level Flags (FGM, CPIS flags don't exist but would be returned if they did) (not including provenance here)", "request": { - "method": "POST", + "method": "GET", "header": [], "url": { - "raw": "TODO", + "raw": "http://localhost:8080/fhir/Flag?patient=patient-example-1&code=NRAF,FGM,CPIS", + "protocol": "http", "host": [ - "TODO" + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "Flag" + ], + "query": [ + { + "key": "patient", + "value": "patient-example-1" + }, + { + "key": "code", + "value": "NRAF,FGM,CPIS" + } ] } }, - "response": [] + "response": [ + { + "name": "New Request", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:8080/fhir/Flag?patient=patient-example-1&code=NRAF,FGM,CPIS", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "Flag" + ], + "query": [ + { + "key": "patient", + "value": "patient-example-1" + }, + { + "key": "code", + "value": "NRAF,FGM,CPIS" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "HAPI FHIR 6.10.0 REST Server (FHIR Server; FHIR 4.0.1/R4)" + }, + { + "key": "X-Request-ID", + "value": "zn9AY0CZdZGAvRFF" + }, + { + "key": "Last-Modified", + "value": "Fri, 09 Feb 2024 02:11:22 GMT" + }, + { + "key": "Content-Encoding", + "value": "gzip" + }, + { + "key": "Content-Type", + "value": "application/fhir+json;charset=UTF-8" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + }, + { + "key": "Date", + "value": "Fri, 09 Feb 2024 02:11:29 GMT" + }, + { + "key": "Keep-Alive", + "value": "timeout=60" + }, + { + "key": "Connection", + "value": "keep-alive" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"79d057f0-7e1b-49db-8726-d046d4523191\",\n \"meta\": {\n \"lastUpdated\": \"2024-02-09T02:11:22.336+00:00\"\n },\n \"type\": \"searchset\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"http://localhost:8080/fhir/Flag?code=NRAF%2CFGM%2CCPIS&patient=patient-example-1\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"code\": \"NRAF\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"match\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Get all RA records (flags) for a patient (not including provenance here)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:8080/fhir/Flag?patient=patient-example-1&_include=Flag:detail", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "Flag" + ], + "query": [ + { + "key": "patient", + "value": "patient-example-1" + }, + { + "key": "_include", + "value": "Flag:detail" + } + ] + } + }, + "response": [ + { + "name": "New Request", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:8080/fhir/Flag?patient=patient-example-1&_include=Flag:detail", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "Flag" + ], + "query": [ + { + "key": "patient", + "value": "patient-example-1" + }, + { + "key": "_include", + "value": "Flag:detail" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "HAPI FHIR 6.10.0 REST Server (FHIR Server; FHIR 4.0.1/R4)" + }, + { + "key": "X-Request-ID", + "value": "5tLsi8qnIw4wJJRp" + }, + { + "key": "Last-Modified", + "value": "Fri, 09 Feb 2024 02:11:41 GMT" + }, + { + "key": "Content-Encoding", + "value": "gzip" + }, + { + "key": "Content-Type", + "value": "application/fhir+json;charset=UTF-8" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + }, + { + "key": "Date", + "value": "Fri, 09 Feb 2024 02:11:41 GMT" + }, + { + "key": "Keep-Alive", + "value": "timeout=60" + }, + { + "key": "Connection", + "value": "keep-alive" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"a5a39cdf-f628-4bb7-bfe8-c5c5381d0a12\",\n \"meta\": {\n \"lastUpdated\": \"2024-02-09T02:11:41.787+00:00\"\n },\n \"type\": \"searchset\",\n \"total\": 3,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"http://localhost:8080/fhir/Flag?_include=Flag%3Adetail&patient=patient-example-1\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"code\": \"NRAF\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"04adcb5b-3de7-4f67-97f0-b2fdf941ba85\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Condition/41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"type\": \"Condition\"\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"type\": \"Flag\"\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Consent/consent-example-1\",\n \"type\": \"Consent\"\n }\n }\n ],\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1\",\n \"code\": \"001\",\n \"display\": \"Communication support\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://snomed.info/sct\",\n \"code\": \"957371000000106\",\n \"display\": \"Requires written information in at least 28 point sans serif font\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Flag/c357a25c-2282-4440-bc93-6fa7a4965d4a\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"c357a25c-2282-4440-bc93-6fa7a4965d4a\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Condition/da03d375-e3c0-4856-a8b9-994cf4de4f46\",\n \"type\": \"Condition\"\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"type\": \"Flag\"\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Consent/consent-example-1\",\n \"type\": \"Consent\"\n }\n }\n ],\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1\",\n \"code\": \"010\",\n \"display\": \"Adjustments to support Additional needs\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://snomed.info/sct\",\n \"code\": \"225861007\",\n \"display\": \"Unsafe to be left alone\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Condition/41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n \"code\": \"active\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1\",\n \"code\": \"issue\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ConditionCode-1\",\n \"code\": \"5\",\n \"display\": \"Learning or understanding or concentrating\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Condition/da03d375-e3c0-4856-a8b9-994cf4de4f46\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"da03d375-e3c0-4856-a8b9-994cf4de4f46\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n \"code\": \"active\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1\",\n \"code\": \"issue\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://snomed.info/sct\",\n \"code\": \"73618009\",\n \"display\": \"Autistic spectrum disorder with isolated skills\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Consent/consent-example-1\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"consent-example-1\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"code\": \"NRAF\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"patient\": {\n \"reference\": \"Patient/patient-example-1\"\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"system\": \"https://snomed.info/sct\",\n \"code\": \"370856009\",\n \"display\": \"Limiting access to confidential patient information\"\n }\n ]\n }\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] + }, + { + "name": "Get RA record (flag) for a patient and restrict by adjustment code (not including provenance here)", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:8080/fhir/Flag?patient=patient-example-1&code=957371000000106&_include=Flag:detail", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "Flag" + ], + "query": [ + { + "key": "patient", + "value": "patient-example-1" + }, + { + "key": "code", + "value": "957371000000106" + }, + { + "key": "_include", + "value": "Flag:detail" + } + ] + } + }, + "response": [ + { + "name": "Get RA record (flag) for a patient based on adjustment code, i.e. Flag.code (not including provenance here)", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "http://localhost:8080/fhir/Flag?patient=patient-example-1&code=957371000000106&_include=Flag:detail", + "protocol": "http", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "fhir", + "Flag" + ], + "query": [ + { + "key": "patient", + "value": "patient-example-1" + }, + { + "key": "code", + "value": "957371000000106" + }, + { + "key": "_include", + "value": "Flag:detail" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "HAPI FHIR 6.10.0 REST Server (FHIR Server; FHIR 4.0.1/R4)" + }, + { + "key": "X-Request-ID", + "value": "hn2yI8JHGdmP5ZWZ" + }, + { + "key": "Last-Modified", + "value": "Fri, 09 Feb 2024 02:11:55 GMT" + }, + { + "key": "Content-Encoding", + "value": "gzip" + }, + { + "key": "Content-Type", + "value": "application/fhir+json;charset=UTF-8" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + }, + { + "key": "Date", + "value": "Fri, 09 Feb 2024 02:11:55 GMT" + }, + { + "key": "Keep-Alive", + "value": "timeout=60" + }, + { + "key": "Connection", + "value": "keep-alive" + } + ], + "cookie": [], + "body": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"8612520f-fbc0-41ec-a2ac-d5938eadae68\",\n \"meta\": {\n \"lastUpdated\": \"2024-02-09T02:11:55.868+00:00\"\n },\n \"type\": \"searchset\",\n \"total\": 1,\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"http://localhost:8080/fhir/Flag?_include=Flag%3Adetail&code=957371000000106&patient=patient-example-1\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"04adcb5b-3de7-4f67-97f0-b2fdf941ba85\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"extension\": [\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Condition/41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"type\": \"Condition\"\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"type\": \"Flag\"\n }\n },\n {\n \"url\": \"http://hl7.org/fhir/StructureDefinition/flag-detail\",\n \"valueReference\": {\n \"reference\": \"Consent/consent-example-1\",\n \"type\": \"Consent\"\n }\n }\n ],\n \"status\": \"active\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-AdjustmentCategory-1\",\n \"code\": \"001\",\n \"display\": \"Communication support\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://snomed.info/sct\",\n \"code\": \"957371000000106\",\n \"display\": \"Requires written information in at least 28 point sans serif font\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"match\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Condition/41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"resource\": {\n \"resourceType\": \"Condition\",\n \"id\": \"41a84a93-1c95-4162-b13c-1c617509e6e2\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"clinicalStatus\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n \"code\": \"active\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1\",\n \"code\": \"issue\",\n \"display\": \"Issue\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ConditionCode-1\",\n \"code\": \"5\",\n \"display\": \"Learning or understanding or concentrating\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Flag/fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"resource\": {\n \"resourceType\": \"Flag\",\n \"id\": \"fba99f70-fe1d-42e2-b77a-916e44b53c19\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"status\": \"active\",\n \"code\": {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"code\": \"NRAF\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n },\n \"subject\": {\n \"reference\": \"Patient/patient-example-1\"\n }\n },\n \"search\": {\n \"mode\": \"include\"\n }\n },\n {\n \"fullUrl\": \"http://localhost:8080/fhir/Consent/consent-example-1\",\n \"resource\": {\n \"resourceType\": \"Consent\",\n \"id\": \"consent-example-1\",\n \"meta\": {\n \"versionId\": \"1\",\n \"lastUpdated\": \"2024-02-09T02:11:07.443+00:00\",\n \"source\": \"#2BVDta2nrOmwFe3M\"\n },\n \"status\": \"active\",\n \"scope\": {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n \"code\": \"patient-privacy\"\n }\n ]\n },\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/RARecord-FlagCategory-1\",\n \"code\": \"NRAF\",\n \"display\": \"National Reasonable Adjustments Flag\"\n }\n ]\n }\n ],\n \"patient\": {\n \"reference\": \"Patient/patient-example-1\"\n },\n \"policy\": [\n {\n \"authority\": \"https://www.gov.uk/\",\n \"uri\": \"https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf\"\n }\n ],\n \"provision\": {\n \"purpose\": [\n {\n \"system\": \"https://snomed.info/sct\",\n \"code\": \"370856009\",\n \"display\": \"Limiting access to confidential patient information\"\n }\n ]\n }\n },\n \"search\": {\n \"mode\": \"include\"\n }\n }\n ]\n}" + } + ] } ] }, @@ -299,20 +698,6 @@ }, "response": [] }, - { - "name": "Get Flag by Category and Code and supporting resources", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "TODO", - "host": [ - "TODO" - ] - } - }, - "response": [] - }, { "name": "Delete Flag by ID", "request": { diff --git a/input/fsh/examples/AddCPISRecordTransactionExample1-bundle.fsh b/input/fsh/examples/AddCPISRecordTransactionExample1-bundle.fsh index f602479..594caf7 100644 --- a/input/fsh/examples/AddCPISRecordTransactionExample1-bundle.fsh +++ b/input/fsh/examples/AddCPISRecordTransactionExample1-bundle.fsh @@ -3,23 +3,23 @@ InstanceOf: Bundle Title: "CPIS Example of adding a record with a Transaction" Usage: #example * type = #transaction -* entry[0].fullUrl = "urn:uuid:f7898b1c-4314-4331-9477-cca32861e858" +* entry[0].fullUrl = "Patient/PatientExample1" * entry[=].resource = PatientExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Patient?identifier=9912003888" -* entry[+].fullUrl = "urn:uuid:921cd5d5-e1e9-4986-bf8e-5826832db2ff" +* entry[=].request.url = "Patient/PatientExample1" +* entry[+].fullUrl = "Consent/CPISConsentExample1" * entry[=].resource = CPISConsentExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Consent?patient=urn:uuid:f7898b1c-4314-4331-9477-cca32861e858" -* entry[+].fullUrl = "urn:uuid:7dd8fe1e-e782-42c6-9ef4-1bebce3a43cc" +* entry[=].request.url = "Consent/CPISConsentExample1" +* entry[+].fullUrl = "Condition/CPISConditionExample1" * entry[=].resource = CPISConditionExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Condition?patient=urn:uuid:f7898b1c-4314-4331-9477-cca32861e858" -* entry[+].fullUrl = "urn:uuid:066fbb4b-2a8d-471e-8732-42e85ab1de1a" +* entry[=].request.url = "Condition/CPISConditionExample1" +* entry[+].fullUrl = "Flag/CPISPatientFlagExample1" * entry[=].resource = CPISPatientFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/066fbb4b-2a8d-471e-8732-42e85ab1de1a" -* entry[+].fullUrl = "urn:uuid:621c9e76-19e1-4aa0-adb0-8d79979ea27c" +* entry[=].request.url = "Flag/CPISPatientFlagExample1" +* entry[+].fullUrl = "Flag/CPISFlagExample1" * entry[=].resource = CPISFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/066fbb4b-2a8d-471e-8732-42e85ab1de1a" +* entry[=].request.url = "Flag/CPISFlagExample1" diff --git a/input/fsh/examples/AddFGMRecordTransactionExample1-bundle.fsh b/input/fsh/examples/AddFGMRecordTransactionExample1-bundle.fsh index f2eb909..bb4ac74 100644 --- a/input/fsh/examples/AddFGMRecordTransactionExample1-bundle.fsh +++ b/input/fsh/examples/AddFGMRecordTransactionExample1-bundle.fsh @@ -3,23 +3,23 @@ InstanceOf: Bundle Title: "FGM Example of adding a record with a Transaction" Usage: #example * type = #transaction -* entry[0].fullUrl = "urn:uuid:9580a1de-f418-432b-85da-eba186b7cfa5" +* entry[0].fullUrl = "Patient/PatientExample1" * entry[=].resource = PatientExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Patient?identifier=9912003888" -* entry[+].fullUrl = "urn:uuid:cd1de51b-2007-4409-8a96-cfcc1e0a0b6b" +* entry[=].request.url = "Patient/PatientExample1" +* entry[+].fullUrl = "Consent/FGMConsentExample1" * entry[=].resource = FGMConsentExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Consent?patient=urn:uuid:9580a1de-f418-432b-85da-eba186b7cfa5" -* entry[+].fullUrl = "urn:uuid:7dd8fe1e-e782-42c6-9ef4-1bebce3a43cc" +* entry[=].request.url = "Consent/FGMConsentExample1" +* entry[+].fullUrl = "Condition/FGMConditionExample1" * entry[=].resource = FGMConditionExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Condition?patient=urn:uuid:9580a1de-f418-432b-85da-eba186b7cfa5" -* entry[+].fullUrl = "urn:uuid:97c6d9be-1431-4112-b99c-5cecd318ede0" +* entry[=].request.url = "Condition/FGMConditionExample1" +* entry[+].fullUrl = "Flag/FGMPatientFlagExample1" * entry[=].resource = FGMPatientFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/97c6d9be-1431-4112-b99c-5cecd318ede0" -* entry[+].fullUrl = "urn:uuid:38f67aa3-5ea8-4a29-9cd5-54ba7acf79a8" +* entry[=].request.url = "Flag/FGMPatientFlagExample1" +* entry[+].fullUrl = "Flag/FGMFlagExample1" * entry[=].resource = FGMFlagExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Flag/38f67aa3-5ea8-4a29-9cd5-54ba7acf79a8" +* entry[=].request.url = "Flag/FGMFlagExample1" diff --git a/input/fsh/examples/AddRARecordTransactionExample1-bundle.fsh b/input/fsh/examples/AddRARecordTransactionExample1-bundle.fsh index cce5200..cd4417d 100644 --- a/input/fsh/examples/AddRARecordTransactionExample1-bundle.fsh +++ b/input/fsh/examples/AddRARecordTransactionExample1-bundle.fsh @@ -3,18 +3,18 @@ InstanceOf: Bundle Title: "RA Example of adding a record with a Transaction" Usage: #example * type = #transaction -* entry[0].fullUrl = "urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" +* entry[0].fullUrl = "Patient/PatientExample1" * entry[=].resource = PatientExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Patient?identifier=9912003888" -* entry[+].fullUrl = "urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e" +* entry[=].request.url = "Patient/PatientExample1" +* entry[+].fullUrl = "Consent/RAConsentExample1" * entry[=].resource = RAConsentExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Consent?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" -* entry[+].fullUrl = "urn:uuid:41a84a93-1c95-4162-b13c-1c617509e6e2" +* entry[=].request.url = "Consent/RAConsentExample1" +* entry[+].fullUrl = "Condition/RAConditionExample1" * entry[=].resource = RAConditionExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" +* entry[=].request.url = "Condition/RAConditionExample1" * entry[+].fullUrl = "Flag/RAPatientFlagExample1" * entry[=].resource = RAPatientFlagExample1 * entry[=].request.method = #PUT diff --git a/input/fsh/examples/AddRARecordTransactionExample2-bundle.fsh b/input/fsh/examples/AddRARecordTransactionExample2-bundle.fsh index 7afd80e..7b19165 100644 --- a/input/fsh/examples/AddRARecordTransactionExample2-bundle.fsh +++ b/input/fsh/examples/AddRARecordTransactionExample2-bundle.fsh @@ -3,18 +3,18 @@ InstanceOf: Bundle Title: "RA Example of idempotent update of a record with a Transaction" Usage: #example * type = #transaction -* entry[0].fullUrl = "urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" +* entry[0].fullUrl = "Patient/PatientExample1" * entry[=].resource = PatientExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Patient?identifier=9912003888" -* entry[+].fullUrl = "urn:uuid:959fbc3c-0907-419e-aa3d-ab88f2d90c5e" +* entry[=].request.url = "Patient/PatientExample1" +* entry[+].fullUrl = "Consent/RAConsentExample1" * entry[=].resource = RAConsentExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Consent?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" -* entry[+].fullUrl = "urn:uuid:41a84a93-1c95-4162-b13c-1c617509e6e2" +* entry[=].request.url = "Consent/RAConsentExample1" +* entry[+].fullUrl = "Condition/RAConditionExample1" * entry[=].resource = RAConditionExample1 * entry[=].request.method = #PUT -* entry[=].request.url = "Condition?patient=urn:uuid:6253c43b-5cc8-4645-93b1-38e41be82a77" +* entry[=].request.url = "Condition/RAConditionExample1" * entry[+].fullUrl = "Flag/RAPatientFlagExample1" * entry[=].resource = RAPatientFlagExample1 * entry[=].request.method = #PUT diff --git a/input/pagecontent/server-examples.md b/input/pagecontent/server-examples.md index 523064e..7ee1ae1 100644 --- a/input/pagecontent/server-examples.md +++ b/input/pagecontent/server-examples.md @@ -26,4 +26,4 @@ http://localhost:8080/fhir/swagger-ui/index.html #### Postman -All examples and some queries are available in a [Postman collection](assets/postman/postman_collection.json). +Some transaction and basic query examples are available in a [Postman collection](assets/postman/postman_collection.json). From aacdd3cd5e58d8052c84b1d22de7f50285750256 Mon Sep 17 00:00:00 2001 From: Declan Kieran Date: Wed, 27 Mar 2024 23:49:58 +0000 Subject: [PATCH 4/5] update example page --- .../{server-examples.md => basic-query-examples.md} | 4 +++- sushi-config.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) rename input/pagecontent/{server-examples.md => basic-query-examples.md} (69%) diff --git a/input/pagecontent/server-examples.md b/input/pagecontent/basic-query-examples.md similarity index 69% rename from input/pagecontent/server-examples.md rename to input/pagecontent/basic-query-examples.md index 7ee1ae1..cebbe38 100644 --- a/input/pagecontent/server-examples.md +++ b/input/pagecontent/basic-query-examples.md @@ -4,7 +4,7 @@ The [HAPI FHIR Starter Server](https://github.com/hapifhir/hapi-fhir-jpaserver-s #### Docker invocation of the HAPI Starter Project -This command starts the server on port 8080 and use UUID (as opposed to sequential numbers) for resource ID's. +This command starts the server on port 8080 and use UUID (as opposed to sequential numbers) for resource ID's. For more options see this [config](https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/resources/application.yaml). ``` docker run -p 8080:8080 -e hapi.fhir.daoconfig_client_id_strategy=UUID -e hapi.fhir.client_id_strategy=ANY hapiproject/hapi:latest @@ -27,3 +27,5 @@ http://localhost:8080/fhir/swagger-ui/index.html #### Postman Some transaction and basic query examples are available in a [Postman collection](assets/postman/postman_collection.json). + +**NOTE:** Posting the SearchParameters first to the [HAPI FHIR Starter Server](https://github.com/hapifhir/hapi-fhir-jpaserver-starter) will allow them to index/load quicker so they work in the query examples. diff --git a/sushi-config.yaml b/sushi-config.yaml index 71dfa2e..5ef1a5f 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -85,7 +85,7 @@ menu: Remove Reasonable Adjustment Record: remove-reasonable-adjustment-record.html Additional Examples: CPIS/FGM demo: additional-examples.html - Server Examples: server-examples.html + Basic Query Examples: basic-query-examples.html Artifacts: artifacts.html About: Downloads: todo.html From aeaee388c9b0afb49077764106c820c74be36f78 Mon Sep 17 00:00:00 2001 From: Declan Kieran Date: Wed, 27 Mar 2024 23:52:56 +0000 Subject: [PATCH 5/5] remove ci steps from pipeline --- .github/workflows/publish.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1a00ab4..44fb12c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,15 +37,6 @@ jobs: - name: Install Graphvix run: sudo apt install graphviz - - name: Run FHIR server (TODO - load package from vars and validate - maybe just let the publisher handle that...) - run: docker run -d -p 8080:8080 -e hapi.fhir.daoconfig_client_id_strategy=UUID -e hapi.fhir.client_id_strategy=ANY hapiproject/hapi:latest - - - name: Sleep to give server time to start - run: sleep 90 - - - name: Convert FSH, load examples and run queries to be added to IG - run: ./scripts/run-examples.sh - - name: Build IG run: ./_genonce.sh ${{ vars.VALIDATOR_OFFLINE }}