From 61db7a104a52eadf2f3f2c4b54eae696f3b9cf4b Mon Sep 17 00:00:00 2001
From: Declan Kieran
Date: Thu, 1 Feb 2024 03:14:50 +0000
Subject: [PATCH] all examples in one page, added more queries
---
.../assets/postman/postman_collection.json | 340 ++++++++++++++++++
.../0000-flag-category-searchparameter.fsh | 13 +
.../0000-flag-code-searchparameter.fsh | 13 +
...awio.png => retrieve-condition.drawio.png} | Bin
input/pagecontent/add-ra-record.md | 4 +-
...eve-condition.md => retrieve-ra-record.md} | 4 +-
.../server-example-add-ra-record.md | 45 ---
.../server-example-retrieve-ra-record.md | 53 ---
input/pagecontent/server-examples.md | 153 ++++++++
.../queries/DELETE-0008-delete-flag-by-id.md | 1 +
input/queries/READ-0001-get-all-flags.md | 1 +
.../queries/READ-0002-get-flag-by-category.md | 1 +
...READ-0003-get-flag-by-category-and-code.md | 1 +
...djustmentsExamples.postman_collection.json | 82 -----
scripts/run-examples.sh | 29 ++
sushi-config.yaml | 5 +-
16 files changed, 557 insertions(+), 188 deletions(-)
create mode 100644 ig-template/package/content/assets/postman/postman_collection.json
create mode 100644 input/fsh/examples/0000-flag-category-searchparameter.fsh
create mode 100644 input/fsh/examples/0000-flag-code-searchparameter.fsh
rename input/images/{Retrieve-Condition.drawio.png => retrieve-condition.drawio.png} (100%)
rename input/pagecontent/{retrieve-condition.md => retrieve-ra-record.md} (62%)
delete mode 100644 input/pagecontent/server-example-add-ra-record.md
delete mode 100644 input/pagecontent/server-example-retrieve-ra-record.md
create mode 100644 input/pagecontent/server-examples.md
create mode 100644 input/queries/DELETE-0008-delete-flag-by-id.md
create mode 100644 input/queries/READ-0001-get-all-flags.md
create mode 100644 input/queries/READ-0002-get-flag-by-category.md
create mode 100644 input/queries/READ-0003-get-flag-by-category-and-code.md
delete mode 100644 postman/ReasonableAdjustmentsExamples.postman_collection.json
diff --git a/ig-template/package/content/assets/postman/postman_collection.json b/ig-template/package/content/assets/postman/postman_collection.json
new file mode 100644
index 0000000..459cff9
--- /dev/null
+++ b/ig-template/package/content/assets/postman/postman_collection.json
@@ -0,0 +1,340 @@
+{
+ "info": {
+ "_postman_id": "adb3f331-e89f-4548-b96b-b781a41eba64",
+ "name": "ReasonableAdjustmentsExamples",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "32605342"
+ },
+ "item": [
+ {
+ "name": "SearchParameters",
+ "item": [
+ {
+ "name": "Flag.category",
+ "request": {
+ "method": "POST",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"resourceType\" : \"SearchParameter\",\n \"id\" : \"FlagCategory\",\n \"url\" : \"http://localhost:8080/fhir/SearchParameter/FlagCategory\",\n \"version\" : \"1\",\n \"name\" : \"Search for Flag.category\",\n \"title\" : \"Search for Flag.category\",\n \"derivedFrom\" : \"http://hl7.org/fhir/SearchParameter/Resource-id\",\n \"status\" : \"active\",\n \"description\" : \"Search by category in the Flag resource\",\n \"code\" : \"category\",\n \"base\" : [\"Flag\"],\n \"type\" : \"token\",\n \"expression\" : \"Flag.category\",\n \"xpathUsage\": \"normal\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "http://localhost:8080/fhir/SearchParameter",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir",
+ "SearchParameter"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Flag.code",
+ "request": {
+ "method": "POST",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"resourceType\" : \"SearchParameter\",\n \"id\" : \"FlagCode\",\n \"url\" : \"http://localhost:8080/fhir/SearchParameter/FlagCode\",\n \"version\" : \"1\",\n \"name\" : \"Search for Flag.code\",\n \"title\" : \"Search for Flag.code\",\n \"derivedFrom\" : \"http://hl7.org/fhir/SearchParameter/Resource-id\",\n \"status\" : \"active\",\n \"description\" : \"Search by code in the Flag resource\",\n \"code\" : \"code\",\n \"base\" : [\"Flag\"],\n \"type\" : \"token\",\n \"expression\" : \"Flag.code\",\n \"xpathUsage\": \"normal\"\n}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "http://localhost:8080/fhir/SearchParameter",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir",
+ "SearchParameter"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Extension Flag.detail - TODO",
+ "request": {
+ "method": "POST",
+ "header": [],
+ "url": {
+ "raw": "TODO",
+ "host": [
+ "TODO"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Add RA Record",
+ "item": [
+ {
+ "name": "Example 1",
+ "request": {
+ "method": "POST",
+ "header": [],
+ "url": {
+ "raw": "TODO",
+ "host": [
+ "TODO"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Example 2.1",
+ "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}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "http://localhost:8080/fhir",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Example 2.1",
+ "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}",
+ "options": {
+ "raw": {
+ "language": "json"
+ }
+ }
+ },
+ "url": {
+ "raw": "http://localhost:8080/fhir",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Retrieve RA Record",
+ "item": [
+ {
+ "name": "Example 1",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "http://localhost:8080/fhir/Patient?identifier=9912003888&_revinclude=Consent:patient&_revinclude=Flag:patient&_revinclude=Condition:patient",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir",
+ "Patient"
+ ],
+ "query": [
+ {
+ "key": "identifier",
+ "value": "9912003888"
+ },
+ {
+ "key": "_revinclude",
+ "value": "Consent:patient"
+ },
+ {
+ "key": "_revinclude",
+ "value": "Flag:patient"
+ },
+ {
+ "key": "_revinclude",
+ "value": "Condition:patient"
+ }
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Remove RA Record",
+ "item": [
+ {
+ "name": "TODO",
+ "request": {
+ "method": "POST",
+ "header": [],
+ "url": {
+ "raw": "TODO",
+ "host": [
+ "TODO"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ },
+ {
+ "name": "Other Queries",
+ "item": [
+ {
+ "name": "Read all Flags",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "http://localhost:8080/fhir/Flag",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir",
+ "Flag"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Flag by Category",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "http://localhost:8080/fhir/Flag?category=NRAF",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir",
+ "Flag"
+ ],
+ "query": [
+ {
+ "key": "category",
+ "value": "NRAF"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Get Flag by Category and Code",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "http://localhost:8080/fhir/Flag?category=NRAF&code=001",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir",
+ "Flag"
+ ],
+ "query": [
+ {
+ "key": "category",
+ "value": "NRAF"
+ },
+ {
+ "key": "code",
+ "value": "001"
+ }
+ ]
+ }
+ },
+ "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": {
+ "method": "DELETE",
+ "header": [],
+ "url": {
+ "raw": "http://localhost:8080/fhir/Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "fhir",
+ "Flag",
+ "04adcb5b-3de7-4f67-97f0-b2fdf941ba85"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/input/fsh/examples/0000-flag-category-searchparameter.fsh b/input/fsh/examples/0000-flag-category-searchparameter.fsh
new file mode 100644
index 0000000..5ab4397
--- /dev/null
+++ b/input/fsh/examples/0000-flag-category-searchparameter.fsh
@@ -0,0 +1,13 @@
+Instance: 0000-flag-category-searchparameter
+InstanceOf: SearchParameter
+Usage: #definition
+* url = "http://localhost:8080/fhir/SearchParameter/FlagCategory"
+* version = "1"
+* name = "Search for Flag.category"
+* status = #active
+* description = "Search by category in the Flag resource"
+* code = #category
+* base = #Flag
+* type = #token
+* expression = "Flag.category"
+* xpathUsage = #normal
\ No newline at end of file
diff --git a/input/fsh/examples/0000-flag-code-searchparameter.fsh b/input/fsh/examples/0000-flag-code-searchparameter.fsh
new file mode 100644
index 0000000..4d71708
--- /dev/null
+++ b/input/fsh/examples/0000-flag-code-searchparameter.fsh
@@ -0,0 +1,13 @@
+Instance: 0000-flag-code-searchparameter
+InstanceOf: SearchParameter
+Usage: #definition
+* url = "http://localhost:8080/fhir/SearchParameter/FlagCode"
+* version = "1"
+* name = "Search for Flag.code"
+* status = #active
+* description = "Search by code in the Flag resource"
+* code = #code
+* base = #Flag
+* type = #token
+* expression = "Flag.code"
+* xpathUsage = #normal
\ No newline at end of file
diff --git a/input/images/Retrieve-Condition.drawio.png b/input/images/retrieve-condition.drawio.png
similarity index 100%
rename from input/images/Retrieve-Condition.drawio.png
rename to input/images/retrieve-condition.drawio.png
diff --git a/input/pagecontent/add-ra-record.md b/input/pagecontent/add-ra-record.md
index 6f5462c..7a484e1 100644
--- a/input/pagecontent/add-ra-record.md
+++ b/input/pagecontent/add-ra-record.md
@@ -36,7 +36,7 @@ The practioner decides to record a condition. This could be done with individua
#### Example 2
-The first example given here shows the use of a transaction to add all required resources to add a Consent, a Condition and associated adjustments (Flag) resources for a patient.
+The first example given here shows the use of a transaction to add all required resources to add a Consent, a Condition and associated adjustments (Flag) resources for a patient.
The master Flag and condition Flag (and associated Condition) resources are included and have the Provence resource as contained resources. This example could be modified to include a new condition just by adding the new Condition and Flag resource as this transaction is fully idempotent. The next example will show this.
@@ -48,7 +48,7 @@ The master Flag and condition Flag (and associated Condition) resources are incl
-The second example given here simply adds conditions to the previous transaction resource to demonstrate the ability to add new conditions to the same data structure and reply in an idempotent way. The request entry in the transaction Bundle for the second condition uses the uuid from the fullUrl on the Bundle entry to use in the URL for the PUT method. The first uses the patient uuid as a search parameter for the PUT. A uuid would be the preferred method to construct the uuid for the fullUrl in the Bundle entry, so this should be a reasonable example. This example is just to demonstrate ReSTful capabilities of the FHIR spec.
+The second example given here simply adds conditions to the previous transaction resource to demonstrate the ability to add new conditions to the same data structure and reply in an idempotent way. The request entry in the transaction Bundle for the second condition uses the uuid from the fullUrl on the Bundle entry to use in the URL for the PUT method. The first uses the patient uuid as a search parameter for the PUT. A uuid would be the preferred method to construct the uuid for the fullUrl in the Bundle entry, so this should be a reasonable example. This example is just to demonstrate ReSTful capabilities of the FHIR spec.
[Example Transaction: Additional condition and flag added to previous Transaction](Bundle-0001-add-condition-transaction-example.html).
diff --git a/input/pagecontent/retrieve-condition.md b/input/pagecontent/retrieve-ra-record.md
similarity index 62%
rename from input/pagecontent/retrieve-condition.md
rename to input/pagecontent/retrieve-ra-record.md
index 7a3c1ca..95b06c7 100644
--- a/input/pagecontent/retrieve-condition.md
+++ b/input/pagecontent/retrieve-ra-record.md
@@ -6,8 +6,8 @@
A patient presents to be examined by a practitioner. The Practioner perofrms an examination and retrieve Patient's RA Record.
-##### Condition Retrieved
+##### Patients RA Record Retrieved
-
![Activity created in draw.io!](Retrieve-Condition.drawio.png)
+
Todo
diff --git a/input/pagecontent/server-example-add-ra-record.md b/input/pagecontent/server-example-add-ra-record.md
deleted file mode 100644
index 1f5b7bf..0000000
--- a/input/pagecontent/server-example-add-ra-record.md
+++ /dev/null
@@ -1,45 +0,0 @@
-### Summary
-
-The [HAPI FHIR Starter Server](https://github.com/hapifhir/hapi-fhir-jpaserver-starter) is used to demostrate some basic REST capabilities in FHIR using examples within this implementation guide.
-
-#### 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.
-
-```
-docker run -p 8080:8080 -e hapi.fhir.daoconfig_client_id_strategy=UUID -e hapi.fhir.client_id_strategy=ANY hapiproject/hapi:latest
-```
-
-To pull the latest image, run
-
-```
-docker pull hapiproject/hapi:latest
-```
-
-#### Swagger
-
-The HAPI starter project provides an OAS interface to the supported FHIR API. Assuming the above docker command is used, this would be available at
-
-```
-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).
-
-### Examples
-
-The examples here describe the API options related to the workflow given in the use case [Add RA Record](add-ra-record.html#workflow).
-
-#### Example 1
-
-TODO
-
-#### Example 2
-
-The first [example transaction](Bundle-0001-add-condition-transaction-example.html) adds an RA record consisting of a Consent resource from the patient, a master Flag resource (is this really needed?), a Condition resource and an associated condition Flag resource using a transaction Bundle, which provides atomicity as well as more network efficent call. Each Flag resource 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).
-
-The second [example transaction](Bundle-0002-add-condition-transaction-example.html) simply modifies the first transaction by adding additional resources for another Condition and adjustment (Flag). The transactions are using PUT's and as FHIR does defined (upsert)[https://hl7.org/fhir/http.html#upsert] as an option, and the HAPI Starter Server has implemented this, this example has been constructed to demostrate this.
-
-Details of querying the resulting data from these transaction is given in the [Retrieve RA Record](server-example-add-ra-record.html) server example.
\ No newline at end of file
diff --git a/input/pagecontent/server-example-retrieve-ra-record.md b/input/pagecontent/server-example-retrieve-ra-record.md
deleted file mode 100644
index fe24b7d..0000000
--- a/input/pagecontent/server-example-retrieve-ra-record.md
+++ /dev/null
@@ -1,53 +0,0 @@
-### Summary
-
-The [HAPI FHIR Starter Server](https://github.com/hapifhir/hapi-fhir-jpaserver-starter) is used to demostrate some basic REST capabilities in FHIR using examples within this implementation guide.
-
-#### 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.
-
-```
-docker run -p 8080:8080 -e hapi.fhir.daoconfig_client_id_strategy=UUID -e hapi.fhir.client_id_strategy=ANY hapiproject/hapi:latest
-```
-
-To pull the latest image, run
-
-```
-docker pull hapiproject/hapi:latest
-```
-
-#### Swagger
-
-The HAPI starter project provides an OAS interface to the supported FHIR API. Assuming the above docker command is used, this would be available at
-
-```
-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).
-
-### Examples
-
-The examples here describe search options for the workflow given in [Retrieve RA Record](todo.html). This follows on from the data entered in the workflow given in the use case [Add RA Record](add-ra-record.html#workflow).
-
-#### Example 1
-
-Based on the example transaction Bundles given in the use case [Add RA Record](add-ra-record.html#workflow), for each transaction, the following query will performed (dynamically during the IG build)
-
-```
-/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, which are all using default Patient SearchParameters define in the base specification for each resource.
-
-For the [first transaction example](Bundle-0001-add-condition-transaction-example.html), this is the [output of the query](Bundle-QUERY-OUTPUT--0001-add-condition-transaction-example.1.html).
-
-For the [second transaction example](Bundle-0002-add-condition-transaction-example.html), where a Condition and adjustment (Flag) is added, this is the [output of the query](Bundle-QUERY-OUTPUT--0002-add-condition-transaction-example.2.html).
-
-See the [Data Model](data-model.html) for details on the relationships between the resources.
-
-#### Example #
-
-TODO?
\ No newline at end of file
diff --git a/input/pagecontent/server-examples.md b/input/pagecontent/server-examples.md
new file mode 100644
index 0000000..5b721d4
--- /dev/null
+++ b/input/pagecontent/server-examples.md
@@ -0,0 +1,153 @@
+### Summary
+
+The [HAPI FHIR Starter Server](https://github.com/hapifhir/hapi-fhir-jpaserver-starter) is used to demostrate some basic REST capabilities in FHIR using examples within this implementation guide.
+
+#### 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.
+
+```
+docker run -p 8080:8080 -e hapi.fhir.daoconfig_client_id_strategy=UUID -e hapi.fhir.client_id_strategy=ANY hapiproject/hapi:latest
+```
+
+To pull the latest image, run
+
+```
+docker pull hapiproject/hapi:latest
+```
+
+#### Swagger
+
+The HAPI starter project provides an OAS interface to the supported FHIR API. Assuming the above docker command is used, this would be available at
+
+```
+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-ra-record.html#workflow).
+
+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-ra-record.html#workflow).
+
+##### Example 1
+
+TODO
+
+##### Example 2
+
+The first example [Bundle transaction](Bundle-0001-add-condition-transaction-example.html) adds an RA record consisting of
+* a Patient resource
+* a Consent resource
+* a (master) 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-0002-add-condition-transaction-example.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-ra-record.html#workflow).
+
+##### Example 1
+
+For each transaction example provided in the previous section, the following query will performed (dynamically during the IG build)
+
+```
+/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-0001-add-condition-transaction-example.html)
+* [Query output](Bundle-QUERY-OUTPUT--0001-add-condition-transaction-example.1.html)
+
+Second Bundle example:
+* [Bundle transaction](Bundle-0002-add-condition-transaction-example.html)
+* [Query output](Bundle-QUERY-OUTPUT--0002-add-condition-transaction-example.2.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--READ-0001-get-all-flags.html)
+
+#### Get Flag by Category
+
+**Note:** this requires a [custom SearchParameter](0000-flag-category.searchparameter.html)
+
+Query:
+```
+GET /Flag?category=NRAF
+```
+* [Query output](Bundle-QUERY-OUTPUT--READ-0002-get-flag-by-category.html)
+
+#### Get Flag by Category and Code
+
+**Note:** this requires a [custom SearchParameter](0000-flag-category.searchparameter.html)
+
+Query:
+```
+GET /Flag?category=NRAF&code=001
+```
+* [Query output](Bundle-QUERY-OUTPUT--READ-0002-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](0000-flag-category.searchparameter.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--DELETE-0008-delete-flag-by-id.html)
+
+#### POST to /Resource Delete supporting resource
+
+Not sure what this mean, is this beyond a transaction, i.e. use a post to delete, its not defined in FHIR and not really considered valid in REST either...
+
+#### Delete a resource using it's ID
+
+This seems to be covered in section 'Delete Flag by ID'?
\ No newline at end of file
diff --git a/input/queries/DELETE-0008-delete-flag-by-id.md b/input/queries/DELETE-0008-delete-flag-by-id.md
new file mode 100644
index 0000000..568efb7
--- /dev/null
+++ b/input/queries/DELETE-0008-delete-flag-by-id.md
@@ -0,0 +1 @@
+Flag/04adcb5b-3de7-4f67-97f0-b2fdf941ba85
\ No newline at end of file
diff --git a/input/queries/READ-0001-get-all-flags.md b/input/queries/READ-0001-get-all-flags.md
new file mode 100644
index 0000000..e67ba25
--- /dev/null
+++ b/input/queries/READ-0001-get-all-flags.md
@@ -0,0 +1 @@
+Flag/
\ No newline at end of file
diff --git a/input/queries/READ-0002-get-flag-by-category.md b/input/queries/READ-0002-get-flag-by-category.md
new file mode 100644
index 0000000..a567164
--- /dev/null
+++ b/input/queries/READ-0002-get-flag-by-category.md
@@ -0,0 +1 @@
+Flag?category=NRAF
\ No newline at end of file
diff --git a/input/queries/READ-0003-get-flag-by-category-and-code.md b/input/queries/READ-0003-get-flag-by-category-and-code.md
new file mode 100644
index 0000000..6ea59c7
--- /dev/null
+++ b/input/queries/READ-0003-get-flag-by-category-and-code.md
@@ -0,0 +1 @@
+Flag?category=NRAF&code=001
\ No newline at end of file
diff --git a/postman/ReasonableAdjustmentsExamples.postman_collection.json b/postman/ReasonableAdjustmentsExamples.postman_collection.json
deleted file mode 100644
index 6f00fb2..0000000
--- a/postman/ReasonableAdjustmentsExamples.postman_collection.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "info": {
- "_postman_id": "adb3f331-e89f-4548-b96b-b781a41eba64",
- "name": "ReasonableAdjustmentsExamples",
- "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
- "_exporter_id": "32605342"
- },
- "item": [
- {
- "name": "Add examples",
- "item": [
- {
- "name": "New RA record - Single transaction - Provenance contained",
- "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}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "http://localhost:8080/fhir",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8080",
- "path": [
- "fhir"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Query examples",
- "item": [
- {
- "name": "Get Flags associated with Patient",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "http://localhost:8080/fhir/Patient?identifier=9912003888&_revinclude=Consent:patient&_revinclude=Flag:patient",
- "protocol": "http",
- "host": [
- "localhost"
- ],
- "port": "8080",
- "path": [
- "fhir",
- "Patient"
- ],
- "query": [
- {
- "key": "identifier",
- "value": "9912003888"
- },
- {
- "key": "_revinclude",
- "value": "Consent:patient"
- },
- {
- "key": "_revinclude",
- "value": "Flag:patient"
- }
- ]
- }
- },
- "response": []
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/scripts/run-examples.sh b/scripts/run-examples.sh
index 19bcacb..e6a74d8 100755
--- a/scripts/run-examples.sh
+++ b/scripts/run-examples.sh
@@ -34,6 +34,11 @@ for EXAMPLE in ./input/fsh/examples/*; do
curl -X POST -H $HEADERS -d @${GENERATED} $SERVER_BASE$RESOURCE_NAME;
for QUERY_FILE in ./input/queries/$EXAMPLE*; do
+ # Check if none found and skip loop, otherwise will loop on unexpanded path, todo, write this in a real language.
+ if [ "${QUERY_FILE%.*}" = "" ]; then
+ continue
+ fi;
+
# Filename of query (minus extension) must match the filename of the example posted.
QUERY=$(cat ${QUERY_FILE%.*}*);
@@ -44,4 +49,28 @@ for EXAMPLE in ./input/fsh/examples/*; do
curl $SERVER_BASE$QUERY | jq '.id = "QUERY-OUTPUT--'${QUERY_FILE%.*}'"' > ./input/resources/QUERY-OUTPUT--${QUERY_FILE%.*}.json
done;
+done;
+
+# Do all other READ queries
+for QUERY_FILE in ./input/queries/READ*; do
+ # Filename of query (minus extension) must match the filename of the example posted.
+ QUERY=$(cat ${QUERY_FILE%.*}*);
+
+ # Strip the path
+ QUERY_FILE=$(echo $QUERY_FILE | awk -F '/' '{print $4}');
+
+ # Run corresponding query, change the ID of the bundle to something readable and output to resources in input to be included in IG build
+ curl $SERVER_BASE$QUERY | jq '.id = "QUERY-OUTPUT--'${QUERY_FILE%.*}'"' > ./input/resources/QUERY-OUTPUT--${QUERY_FILE%.*}.json
+done;
+
+# Do all other DELETE queries
+for QUERY_FILE in ./input/queries/DELETE*; do
+ # Filename of query (minus extension) must match the filename of the example posted.
+ QUERY=$(cat ${QUERY_FILE%.*}*);
+
+ # Strip the path
+ QUERY_FILE=$(echo $QUERY_FILE | awk -F '/' '{print $4}');
+
+ # Run corresponding query, change the ID of the bundle to something readable and output to resources in input to be included in IG build
+ curl -X DELETE $SERVER_BASE$QUERY | jq '.id = "QUERY-OUTPUT--'${QUERY_FILE%.*}'"' > ./input/resources/QUERY-OUTPUT--${QUERY_FILE%.*}.json
done;
\ No newline at end of file
diff --git a/sushi-config.yaml b/sushi-config.yaml
index b6a6b6a..e27ef85 100644
--- a/sushi-config.yaml
+++ b/sushi-config.yaml
@@ -82,10 +82,7 @@ menu:
Add RA Record: add-ra-record.html
Retrieve RA Record: retrieve-condition.html
Remove RA Record: todo.html
- Server Examples:
- Add RA Record: server-example-add-ra-record.html
- Retrieve RA Record: server-example-retrieve-ra-record.html
- Remove RA Record: todo.html
+ Server Examples: server-examples.html
Artifacts: artifacts.html
Contact Us: todo.html
Downloads: todo.html