Description of use case on Spine via the FHIR® Reasonable Adjustments API

1 Read RA Record

Trigger:

  • Mrs M is referred to an inpatient procedure.
  • Presence of RA Flag triggers pre-operation appointment with Learning Disability Nurse N.
  • Nurse N retrieves Mrs M’s RA Record to inform discussion of her situation.

System Scope:

  • ClientSystem includes Acute/DepartmentalSystem client, SCRa, 1-click etc.
  • ServerSystem includes Spine, PDS, SDS, FlagServer etc.

Summary:

Patient has an RA Flag; Practitioner requests record.

Pre

  • Patient arrives at pre-operation appointment
  • Practitioner Nrs N. is logged on with SmartCard/National Identity
    • Gives User Role Profile Identifier [URPId}
  • Patient Mrs M. has been PDS Traced
    • Gives verified NHS#, Name, DoB demographic data

Main

  • Practitioner retrieves Patient’s RARecord.
    • ClientSystem queries ServerSystem to retrieve RARecord

2 Interaction Examples

Examples of http requests, responses and payloads

http request & headers

GET https://clinicals.spineservices.nhs.uk/STU3/Consent?
 patient=999999998&
 status=active&
 category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&
 _format=json HTTP/1.1
Authorization: Bearer [jwt_token_string]
FromASID: 654321123456
ToASID: 987654456789
Prefer: return=representation
InteractionID: urn:nhs:names:services:raflags:Consent.read:1
GET https://clinicals.spineservices.nhs.uk/STU3/Consent?
 patient=999999998&
 status=active&
 category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&
 _format=xml HTTP/1.1
Authorization: Bearer [jwt_token_string]
FromASID: 654321123456
ToASID: 987654456789
Prefer: return=representation
InteractionID: urn:nhs:names:services:raflags:Consent.read:1

http body

None

http response & headers

HTTP/1.1 200 OK
Date: Tue, 24 Jul 2018 11:00:00 GMT
Content-Type: application/fhir+json
HTTP/1.1 200 OK
Date: Tue, 24 Jul 2018 11:00:00 GMT
Content-Type: application/fhir+xml

http body

{
  "resourceType": "Bundle",
  "id": "2dce9ecf-75c6-4ad5-a770-4f035419c229",
  "fhir_comments": [
    " ReadConsentResponseBody-example.xml "
  ],
  "meta": {
    "profile": [
      "http://hl7.org/fhir/bundle"
    ]
  },
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "fhir_comments": [
        "    all search sets include the self link - the statement of the query string searched on. "
      ],
      "relation": "self",
      "url": "https://clinicals.spineservices.nhs.uk/STU3/Consent?patient=999999998&status=active&category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&_format=json",
      "_url": {
        "fhir_comments": [
          " note entity encoding in url "
        ]
      }
    }
  ],
  "entry": [
    {
      "fhir_comments": [
        " search pagination is also represented as a link set here if required ",
        "    now, each entry is an action to take in the transaction    "
      ],
      "fullUrl": "https://clinicals.spineservices.nhs.uk/STU3/Consent/f1dc0ac6-45ff-4d2b-bf91-793971e3e286",
      "resource": {
        "resourceType": "Consent",
        "id": "f1dc0ac6-45ff-4d2b-bf91-793971e3e286",
        "fhir_comments": [
          " found payload resource or operationOutcome in here "
        ],
        "meta": {
          "versionId": "1fc6e241-89f5-4ba4-b957-f025f21854c3",
          "lastUpdated": "2018-03-01T10:00:00+00:00",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Consent-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Provenance",
            "id": "e0531fd1-212d-4a97-a7a9-d17cec9a6af2",
            "meta": {
              "profile": [
                "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"
              ]
            },
            "target": [
              {
                "reference": "Consent/f1dc0ac6-45ff-4d2b-bf91-793971e3e286"
              }
            ],
            "recorded": "2016-03-01T10:05:33+00:00",
            "agent": [
              {
                "role": [
                  {
                    "coding": [
                      {
                        "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1",
                        "code": "R0260",
                        "display": "General Medical Practitioner"
                      }
                    ]
                  }
                ],
                "whoReference": {
                  "reference": "https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9",
                  "display": "Dr.D"
                },
                "onBehalfOfReference": {
                  "reference": "https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7",
                  "display": "Some GP Clinic"
                }
              }
            ]
          }
        ],
        "extension": [
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-ProxyRole-1",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-ProxyRole-1",
                  "code": "lpa",
                  "display": "Lasting power of attorney personal welfare"
                }
              ]
            }
          },
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1",
            "extension": [
              {
                "url": "created",
                "valueReference": {
                  "reference": "#e0531fd1-212d-4a97-a7a9-d17cec9a6af2"
                }
              }
            ]
          }
        ],
        "status": "active",
        "category": [
          {
            "coding": [
              {
                "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1",
                "code": "reasonable adjustments flag",
                "display": "Reasonable Adjustments Flag"
              }
            ]
          }
        ],
        "patient": {
          "reference": "demographics.spineservices.nhs.uk/STU3/Patient/999999998"
        },
        "policy": [
          {
            "fhir_comments": [
              " these are directly lifted from National Data Opt Out. Will need either a general set or specific values for Reasonable Adjustments "
            ],
            "authority": "https://www.gov.uk/",
            "uri": "https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf"
          }
        ],
        "purpose": [
          {
            "system": "https://snomed.info/sct",
            "code": "370856009",
            "display": "Limiting access to confidential patient information"
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}
<!-- ReadConsentResponseBody-example.xml -->
<Bundle xmlns="http://hl7.org/fhir">
    <id value="885dda30-e403-470f-956a-366c01d7eace"/>
    <meta>
        <profile value="http://hl7.org/fhir/bundle"/>
    </meta>
    <type value="searchset"/>
    <total value="1"/>
    <!--  all search sets include the self link - the statement of the query string searched on. -->
    <link>
        <relation value="self"/>
        <!-- note entity encoding in url -->
        <url value="https://clinicals.spineservices.nhs.uk/STU3/Consent?patient=999999998&amp;status=active&amp;category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&amp;_format=xml"/>
    </link>
    <!-- search pagination is also represented as a link set here if required -->
    <!--    now, each entry is an action to take in the transaction    -->
    <entry>
        <fullUrl value="https://clinicals.spineservices.nhs.uk/STU3/Consent/f1dc0ac6-45ff-4d2b-bf91-793971e3e286"/>
        <resource>
            <!-- found payload resource or operationOutcome in here -->
            <Consent>
                <id value="f1dc0ac6-45ff-4d2b-bf91-793971e3e286"/>
                <meta>
                    <versionId value="cccacb16-e087-45ee-8ddd-5fbd6223e5a2"/>
                    <lastUpdated value="2018-07-23T11:00:00+00:00"/>
                    <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Consent-1"/>
                </meta>
                <contained>
                    <!-- Provenance constructed and persisted -->
                    <Provenance>
                        <id value="e0531fd1-212d-4a97-a7a9-d17cec9a6af2"/>
                        <meta>
                            <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"/>
                        </meta>
                        <target>
                            <reference value="Consent/f1dc0ac6-45ff-4d2b-bf91-793971e3e286"/>
                        </target>
                        <recorded value="2018-07-23T11:00:00+00:00"/>
                        <agent>
                            <role>
                                <coding>
                                    <system value="https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1"/>
                                    <code value="R0260"/>
                                    <display value="General Medical Practitioner"/>
                                </coding>
                            </role>
                            <whoReference>
                                <reference value="https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9"/>
                                <display value="Dr.D"/>
                            </whoReference>
                            <onBehalfOfReference>
                                <reference value="https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7"/>
                                <display value="Some GP Clinic"/>
                            </onBehalfOfReference>
                        </agent>
                    </Provenance>
                </contained>
                <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-ProxyRole-1">
                    <valueCodeableConcept>
                        <coding>
                            <system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-ProxyRole-1"/>
                            <code value="lpa"/>
                            <display value="Lasting power of attorney personal welfare"/>
                        </coding>
                    </valueCodeableConcept>
                </extension>
                <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1">
                    <extension url="created">
                        <valueReference>
                            <reference value="#e0531fd1-212d-4a97-a7a9-d17cec9a6af2"/>
                        </valueReference>
                    </extension>
                </extension>
                <status value="active"/>
                <category>
                    <coding>
                        <system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1"/>
                        <code value="reasonable adjustments flag"/>
                        <display value="Reasonable Adjustments Flag"/>
                    </coding>
                </category>
                <patient>
                    <reference value="demographics.spineservices.nhs.uk/STU3/Patient/999999998"/>
                </patient>
                <policy>
                    <authority value="https://www.gov.uk/"/>
                    <uri value="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/535024/data-security-review.pdf"/>
                </policy>
                <purpose>
                    <system value="https://snomed.info/sct"/>
                    <code value="370856009"/>
                    <display value="Limiting access to confidential patient information"/>
                </purpose>
            </Consent>
        </resource>
        <search>
            <mode value="match"/>
        </search>
    </entry>
</Bundle>

2.3 Read Flag request

http request & headers

GET https://clinicals.spineservices.nhs.uk/STU3/Flag?
 patient=999999998&
 status=active&
 category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&
 _format=json HTTP/1.1
Authorization: Bearer [jwt_token_string]
FromASID: 654321123456
ToASID: 987654456789
Prefer: return=representation
InteractionID: urn:nhs:names:services:raflags:Flag.read:1
GET https://clinicals.spineservices.nhs.uk/STU3/Flag?
 patient=999999998&
 status=active&
 category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&
 _format=xml HTTP/1.1
Authorization: Bearer [jwt_token_string]
FromASID: 654321123456
ToASID: 987654456789
Prefer: return=representation
InteractionID: urn:nhs:names:services:raflags:Flag.read:1

http body

None

2.4 Read Flag response

http response & headers

HTTP/1.1 200 OK
Date: Tue, 24 Jul 2018 11:00:01 GMT
Content-Type: application/fhir+json
HTTP/1.1 200 OK
Date: Tue, 24 Jul 2018 11:00:01 GMT
Content-Type: application/fhir+xml

http body

JSON Example

XML Example

http body

Old style

Read Flag response XML Example

<!-- ReadFlagResponseBody-example.xml -->
<Bundle xmlns="http://hl7.org/fhir">
    <id value="30e9a5d5-c037-42ed-9ee4-476add4d6b43"/>
    <meta>
        <profile value="http://hl7.org/fhir/bundle"/>
    </meta>
    <type value="searchset"/>
    <total value="0"/>
    <!--  all search sets include the self link - the statement of the query string searched on. -->
    <link>
        <relation value="self"/>
        <url value="https://clinicals.spineservices.nhs.uk/STU3/Flag?patient=999999998&amp;status=active&amp;category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&amp;_format=xml"/>
    </link>
</Bundle>

Read Flag response (1 Flag) XML Example

<?xml version="1.0" encoding="UTF-8"?>
<!-- ReadFlagResponseBody-example1Flag.xml -->
<Bundle xmlns="http://hl7.org/fhir">
    <id value="30e9a5d5-c037-42ed-9ee4-476add4d6b43"/>
    <type value="searchset"/>
    <total value="1"/>
    <!--  all search sets include the self link - the statement of the query string searched on. -->
    <link>
        <relation value="self"/>
        <url value="https://clinicals.spineservices.nhs.uk/STU3/Flag?patient=999999998&amp;status=active&amp;category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&amp;_format=xml"/>
    </link>
	<!--this exmaple has 1 Flag (adjustment) included-->
    <entry>
		<fullUrl value="https://clinicals.spineservices.nhs.uk/STU3/Flag/9e63f370-ba72-11e8-96f8-529269fb1459"/>
        <resource>
			<!-- found payload resource or operationOutcome in here -->
			<Flag>
				<id value="9e63f370-ba72-11e8-96f8-529269fb1459"/>
				<meta>
					<versionId value="2042385c-ba73-11e8-96f8-529269fb1459"/>
					<lastUpdated value="2018-07-24T10:01:00+00:00"/>
					<profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Flag-1"/>
				</meta>
				<contained>
					<!-- Provenance constructed and persisted -->
					<Provenance>
						<id value="2042526a-ba73-11e8-96f8-529269fb1459"/>
						<meta>
							<profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"/>
						</meta>
						<target>
							<reference value="Flag/9e63f370-ba72-11e8-96f8-529269fb1459"/>
						</target>
						<recorded value="2018-07-24T10:01:00+00:00"/>
						<agent>
							<role>
								<coding>
									<system value="https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1"/>
									<code value="R1974"/>
									<display value="Community Learning Disabilities Nurse"/>
								</coding>
							</role>
							<whoReference>
								<reference value="https://sds.spineservices.nhs.uk/STU3/Practitioner/4tr6ee6a9"/>
								<display value="Nurse N"/>
							</whoReference>
							<onBehalfOfReference>
								<reference value="https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7"/>
								<display value="Some Hospital Learning Disability Support Department"/>
							</onBehalfOfReference>
						</agent>
					</Provenance>
				</contained>
				<extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1">
					<extension url="created">
						<valueReference>
							<reference value="#2042526a-ba73-11e8-96f8-529269fb1459"/>
						</valueReference>
					</extension>
				</extension>
				<extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentCategory-1">
					<valueCodeableConcept>
						<coding>
							<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AdjustmentCategories-1"/>
							<code value="comms"/>
							<display value="Communication"/>
						</coding>
					</valueCodeableConcept>
				</extension>
				<status value="active"/>
				<category>
					<coding>
						<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1"/>
						<code value="reasonable adjustments flag"/>
						<display value="Reasonable Adjustments Flag"/>
					</coding>
				</category>
				<code>
					<coding>
						<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AccessibleInformationAdjustments-1"/>
						<code value="requiresinformationineasyread"/>
						<display value="Requires information in Easyread"/>
					</coding>
				</code>
				<subject>
						<reference value="https://demographics.spineservices.nhs.uk/STU3/Patient/999999998"/>
				</subject>
			</Flag>
		</resource>
    </entry>
</Bundle>

Read Flag response (2 Flags) XML Example

<?xml version="1.0" encoding="UTF-8"?>
<!-- ReadFlagResponseBody-example1Flag.xml -->
<Bundle xmlns="http://hl7.org/fhir">
    <id value="fda1cad0-ba84-11e8-96f8-529269fb1459"/>
    <type value="searchset"/>
    <total value="2"/>
    <!--  all search sets include the self link - the statement of the query string searched on. -->
    <link>
        <relation value="self"/>
        <url value="https://clinicals.spineservices.nhs.uk/STU3/Flag?patient=999999998&amp;status=active&amp;category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&amp;_format=xml"/>
    </link>
	<!--this exmaple has 2 Flag (adjustment) included-->
	<!--the first flag entry-->
    <entry>
		<fullUrl value="https://clinicals.spineservices.nhs.uk/STU3/Flag/9e63f370-ba72-11e8-96f8-529269fb1459"/>
        <resource>
			<!-- found payload resource or operationOutcome in here -->
			<Flag>
				<id value="9e63f370-ba72-11e8-96f8-529269fb1459"/>
				<meta>
					<versionId value="2042385c-ba73-11e8-96f8-529269fb1459"/>
					<lastUpdated value="2018-07-24T10:01:00+00:00"/>
					<profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Flag-1"/>
				</meta>
				<contained>
					<!-- Provenance constructed and persisted -->
					<Provenance>
						<id value="2042526a-ba73-11e8-96f8-529269fb1459"/>
						<meta>
							<profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"/>
						</meta>
						<target>
							<reference value="Flag/9e63f370-ba72-11e8-96f8-529269fb1459"/>
						</target>
						<recorded value="2018-07-24T10:01:00+00:00"/>
						<agent>
							<role>
								<coding>
									<system value="https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1"/>
									<code value="R1974"/>
									<display value="Community Learning Disabilities Nurse"/>
								</coding>
							</role>
							<whoReference>
								<reference value="https://sds.spineservices.nhs.uk/STU3/Practitioner/4tr6ee6a9"/>
								<display value="Nurse N"/>
							</whoReference>
							<onBehalfOfReference>
								<reference value="https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7"/>
								<display value="Some Hospital Learning Disability Support Department"/>
							</onBehalfOfReference>
						</agent>
					</Provenance>
				</contained>
				<extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1">
					<extension url="created">
						<valueReference>
							<reference value="#2042526a-ba73-11e8-96f8-529269fb1459"/>
						</valueReference>
					</extension>
				</extension>
				<extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentCategory-1">
					<valueCodeableConcept>
						<coding>
							<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AdjustmentCategories-1"/>
							<code value="comms"/>
							<display value="Communication"/>
						</coding>
					</valueCodeableConcept>
				</extension>
				<status value="active"/>
				<category>
					<coding>
						<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1"/>
						<code value="reasonable adjustments flag"/>
						<display value="Reasonable Adjustments Flag"/>
					</coding>
				</category>
				<code>
					<coding>
						<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AccessibleInformationAdjustments-1"/>
						<code value="requiresinformationineasyread"/>
						<display value="Requires information in Easyread"/>
					</coding>
				</code>
				<subject>
						<reference value="https://demographics.spineservices.nhs.uk/STU3/Patient/999999998"/>
				</subject>
			</Flag>
		</resource>
    </entry>
    <!--second flag entry-->
    <entry>
		<fullUrl value="https://clinicals.spineservices.nhs.uk/STU3/Flag/fda1e088-ba84-11e8-96f8-529269fb1459"/>
        <resource>
			<!-- found payload resource or operationOutcome in here -->
			<Flag>
				<id value="fda1e088-ba84-11e8-96f8-529269fb1459"/>
				<meta>
					<versionId value="27e70bd4-ba85-11e8-96f8-529269fb1459"/>
					<lastUpdated value="2018-06-22T10:01:00+00:00"/>
					<profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Flag-1"/>
				</meta>
				<contained>
					<!-- Provenance constructed and persisted -->
					<Provenance>
						<id value="27e7030a-ba85-11e8-96f8-529269fb1459"/>
						<meta>
							<profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"/>
						</meta>
						<target>
							<reference value="Flag/fda1e088-ba84-11e8-96f8-529269fb1459"/>
						</target>
						<recorded value="2018-06-22T10:01:00+00:00"/>
						<agent>
							<role>
								<coding>
									<system value="https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1"/>
									<code value="R0260"/>
									<display value="General Medical Practitioner"/>
								</coding>
							</role>
							<whoReference>
								<reference value="https://sds.spineservices.nhs.uk/STU3/Practitioner/4tr6ff7f8"/>
								<display value="General Practitioner GP"/>
							</whoReference>
							<onBehalfOfReference>
								<reference value="https://directory.spineservices.nhs.uk/STU3/Organization/B82025"/>
								<display value="DERWENT PRACTICE"/>
							</onBehalfOfReference>
						</agent>
					</Provenance>
				</contained>
				<extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1">
					<extension url="created">
						<valueReference>
							<reference value="#27e7030a-ba85-11e8-96f8-529269fb1459"/>
						</valueReference>
					</extension>
				</extension>
				<extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentNotes-1">
					<valueAnnotation>
						<time value="2018-06-22T10:01:00+00:00"/>
						<text value="Added during consultation"/>
					</valueAnnotation>
				</extension>
				<extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentCategory-1">
					<valueCodeableConcept>
						<coding>
							<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AdjustmentCategories-1"/>
							<code value="addsupport"/>
							<display value="Provision of Additional Support"/>
						</coding>
					</valueCodeableConcept>
				</extension>
				<status value="active"/>
				<category>
					<coding>
						<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1"/>
						<code value="reasonable adjustments flag"/>
						<display value="Reasonable Adjustments Flag"/>
					</coding>
				</category>
				<code>
					<coding>
						<system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AccessibleInformationAdjustments-1"/>
						<code value="patientnottobeleftalone"/>
						<display value="Patient not to be left alone"/>
					</coding>
				</code>
				<subject>
						<reference value="https://demographics.spineservices.nhs.uk/STU3/Patient/999999998"/>
				</subject>
			</Flag>
		</resource>
    </entry>      
</Bundle>

2.8 Read Flag response - json example

http response & headers



http body

Read Flag response JSON Example

{
  "resourceType": "Bundle",
  "id": "30e9a5d5-c037-42ed-9ee4-476add4d6b43",
  "fhir_comments": [
    " ReadFlagResponseBody-example.xml "
  ],
  "meta": {
    "profile": [
      "http://hl7.org/fhir/bundle"
    ]
  },
  "type": "searchset",
  "total": 0,
  "link": [
    {
      "fhir_comments": [
        "  all search sets include the self link - the statement of the query string searched on. "
      ],
      "relation": "self",
      "url": "https://clinicals.spineservices.nhs.uk/STU3/Flag?patient=999999998&status=active&category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&_format=json"
    }
  ]
}

Read Flag response (1 Flag) JSON Example

{
  "resourceType": "Bundle",
  "id": "fda1cad0-ba84-11e8-96f8-529269fb1459",
  "fhir_comments": [
    " ReadFlagResponseBody-example1Flag.xml "
  ],
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "fhir_comments": [
        "  all search sets include the self link - the statement of the query string searched on. "
      ],
      "relation": "self",
      "url": "https://clinicals.spineservices.nhs.uk/STU3/Flag?patient=999999998&status=active&category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&_format=xml"
    }
  ],
  "entry": [
    {
      "fhir_comments": [
        "this exmaple has 2 Flag (adjustment) included",
        "the first flag entry"
      ],
      "fullUrl": "https://clinicals.spineservices.nhs.uk/STU3/Flag/9e63f370-ba72-11e8-96f8-529269fb1459",
      "resource": {
        "resourceType": "Flag",
        "id": "9e63f370-ba72-11e8-96f8-529269fb1459",
        "fhir_comments": [
          " found payload resource or operationOutcome in here "
        ],
        "meta": {
          "versionId": "2042385c-ba73-11e8-96f8-529269fb1459",
          "lastUpdated": "2018-07-24T10:01:00+00:00",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Flag-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Provenance",
            "id": "2042526a-ba73-11e8-96f8-529269fb1459",
            "fhir_comments": [
              " Provenance constructed and persisted "
            ],
            "meta": {
              "profile": [
                "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"
              ]
            },
            "target": [
              {
                "reference": "Flag/9e63f370-ba72-11e8-96f8-529269fb1459"
              }
            ],
            "recorded": "2018-07-24T10:01:00+00:00",
            "agent": [
              {
                "role": [
                  {
                    "coding": [
                      {
                        "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1",
                        "code": "R1974",
                        "display": "Community Learning Disabilities Nurse"
                      }
                    ]
                  }
                ],
                "whoReference": {
                  "reference": "https://sds.spineservices.nhs.uk/STU3/Practitioner/4tr6ee6a9",
                  "display": "Nurse N"
                },
                "onBehalfOfReference": {
                  "reference": "https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7",
                  "display": "Some Hospital Learning Disability Support Department"
                }
              }
            ]
          }
        ],
        "extension": [
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1",
            "extension": [
              {
                "url": "created",
                "valueReference": {
                  "reference": "#2042526a-ba73-11e8-96f8-529269fb1459"
                }
              }
            ]
          },
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentCategory-1",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AdjustmentCategories-1",
                  "code": "comms",
                  "display": "Communication"
                }
              ]
            }
          }
        ],
        "status": "active",
        "category": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1",
              "code": "reasonable adjustments flag",
              "display": "Reasonable Adjustments Flag"
            }
          ]
        },
        "code": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AccessibleInformationAdjustments-1",
              "code": "requiresinformationineasyread",
              "display": "Requires information in Easyread"
            }
          ]
        },
        "subject": {
          "reference": "https://demographics.spineservices.nhs.uk/STU3/Patient/999999998"
        }
      }
    },
    {
      "fhir_comments": [
        "second flag entry"
      ],
      "fullUrl": "https://clinicals.spineservices.nhs.uk/STU3/Flag/fda1e088-ba84-11e8-96f8-529269fb1459",
      "resource": {
        "resourceType": "Flag",
        "id": "fda1e088-ba84-11e8-96f8-529269fb1459",
        "fhir_comments": [
          " found payload resource or operationOutcome in here "
        ],
        "meta": {
          "versionId": "27e70bd4-ba85-11e8-96f8-529269fb1459",
          "lastUpdated": "2018-06-22T10:01:00+00:00",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Flag-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Provenance",
            "id": "27e7030a-ba85-11e8-96f8-529269fb1459",
            "fhir_comments": [
              " Provenance constructed and persisted "
            ],
            "meta": {
              "profile": [
                "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"
              ]
            },
            "target": [
              {
                "reference": "Flag/fda1e088-ba84-11e8-96f8-529269fb1459"
              }
            ],
            "recorded": "2018-06-22T10:01:00+00:00",
            "agent": [
              {
                "role": [
                  {
                    "coding": [
                      {
                        "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1",
                        "code": "R0260",
                        "display": "General Medical Practitioner"
                      }
                    ]
                  }
                ],
                "whoReference": {
                  "reference": "https://sds.spineservices.nhs.uk/STU3/Practitioner/4tr6ff7f8",
                  "display": "General Practitioner GP"
                },
                "onBehalfOfReference": {
                  "reference": "https://directory.spineservices.nhs.uk/STU3/Organization/B82025",
                  "display": "DERWENT PRACTICE"
                }
              }
            ]
          }
        ],
        "extension": [
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1",
            "extension": [
              {
                "url": "created",
                "valueReference": {
                  "reference": "#27e7030a-ba85-11e8-96f8-529269fb1459"
                }
              }
            ]
          },
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentNotes-1",
            "valueAnnotation": {
              "time": "2018-06-22T10:01:00+00:00",
              "text": "Added during consultation"
            }
          },
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentCategory-1",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AdjustmentCategories-1",
                  "code": "addsupport",
                  "display": "Provision of Additional Support"
                }
              ]
            }
          }
        ],
        "status": "active",
        "category": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1",
              "code": "reasonable adjustments flag",
              "display": "Reasonable Adjustments Flag"
            }
          ]
        },
        "code": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AccessibleInformationAdjustments-1",
              "code": "patientnottobeleftalone",
              "display": "Patient not to be left alone"
            }
          ]
        },
        "subject": {
          "reference": "https://demographics.spineservices.nhs.uk/STU3/Patient/999999998"
        }
      }
    }
  ]
}

Read Flag response (2 Flags) JSON Example

{
  "resourceType": "Bundle",
  "id": "fda1cad0-ba84-11e8-96f8-529269fb1459",
  "fhir_comments": [
    " ReadFlagResponseBody-example1Flag.xml "
  ],
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "fhir_comments": [
        "  all search sets include the self link - the statement of the query string searched on. "
      ],
      "relation": "self",
      "url": "https://clinicals.spineservices.nhs.uk/STU3/Flag?patient=999999998&status=active&category=https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1|reasonable%20adjustments%20flag&_format=xml"
    }
  ],
  "entry": [
    {
      "fhir_comments": [
        "this exmaple has 2 Flag (adjustment) included",
        "the first flag entry"
      ],
      "fullUrl": "https://clinicals.spineservices.nhs.uk/STU3/Flag/9e63f370-ba72-11e8-96f8-529269fb1459",
      "resource": {
        "resourceType": "Flag",
        "id": "9e63f370-ba72-11e8-96f8-529269fb1459",
        "fhir_comments": [
          " found payload resource or operationOutcome in here "
        ],
        "meta": {
          "versionId": "2042385c-ba73-11e8-96f8-529269fb1459",
          "lastUpdated": "2018-07-24T10:01:00+00:00",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Flag-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Provenance",
            "id": "2042526a-ba73-11e8-96f8-529269fb1459",
            "fhir_comments": [
              " Provenance constructed and persisted "
            ],
            "meta": {
              "profile": [
                "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"
              ]
            },
            "target": [
              {
                "reference": "Flag/9e63f370-ba72-11e8-96f8-529269fb1459"
              }
            ],
            "recorded": "2018-07-24T10:01:00+00:00",
            "agent": [
              {
                "role": [
                  {
                    "coding": [
                      {
                        "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1",
                        "code": "R1974",
                        "display": "Community Learning Disabilities Nurse"
                      }
                    ]
                  }
                ],
                "whoReference": {
                  "reference": "https://sds.spineservices.nhs.uk/STU3/Practitioner/4tr6ee6a9",
                  "display": "Nurse N"
                },
                "onBehalfOfReference": {
                  "reference": "https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7",
                  "display": "Some Hospital Learning Disability Support Department"
                }
              }
            ]
          }
        ],
        "extension": [
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1",
            "extension": [
              {
                "url": "created",
                "valueReference": {
                  "reference": "#2042526a-ba73-11e8-96f8-529269fb1459"
                }
              }
            ]
          },
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentCategory-1",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AdjustmentCategories-1",
                  "code": "comms",
                  "display": "Communication"
                }
              ]
            }
          }
        ],
        "status": "active",
        "category": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1",
              "code": "reasonable adjustments flag",
              "display": "Reasonable Adjustments Flag"
            }
          ]
        },
        "code": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AccessibleInformationAdjustments-1",
              "code": "requiresinformationineasyread",
              "display": "Requires information in Easyread"
            }
          ]
        },
        "subject": {
          "reference": "https://demographics.spineservices.nhs.uk/STU3/Patient/999999998"
        }
      }
    },
    {
      "fhir_comments": [
        "second flag entry"
      ],
      "fullUrl": "https://clinicals.spineservices.nhs.uk/STU3/Flag/fda1e088-ba84-11e8-96f8-529269fb1459",
      "resource": {
        "resourceType": "Flag",
        "id": "fda1e088-ba84-11e8-96f8-529269fb1459",
        "fhir_comments": [
          " found payload resource or operationOutcome in here "
        ],
        "meta": {
          "versionId": "27e70bd4-ba85-11e8-96f8-529269fb1459",
          "lastUpdated": "2018-06-22T10:01:00+00:00",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Flag-1"
          ]
        },
        "contained": [
          {
            "resourceType": "Provenance",
            "id": "27e7030a-ba85-11e8-96f8-529269fb1459",
            "fhir_comments": [
              " Provenance constructed and persisted "
            ],
            "meta": {
              "profile": [
                "https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"
              ]
            },
            "target": [
              {
                "reference": "Flag/fda1e088-ba84-11e8-96f8-529269fb1459"
              }
            ],
            "recorded": "2018-06-22T10:01:00+00:00",
            "agent": [
              {
                "role": [
                  {
                    "coding": [
                      {
                        "system": "https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1",
                        "code": "R0260",
                        "display": "General Medical Practitioner"
                      }
                    ]
                  }
                ],
                "whoReference": {
                  "reference": "https://sds.spineservices.nhs.uk/STU3/Practitioner/4tr6ff7f8",
                  "display": "General Practitioner GP"
                },
                "onBehalfOfReference": {
                  "reference": "https://directory.spineservices.nhs.uk/STU3/Organization/B82025",
                  "display": "DERWENT PRACTICE"
                }
              }
            ]
          }
        ],
        "extension": [
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1",
            "extension": [
              {
                "url": "created",
                "valueReference": {
                  "reference": "#27e7030a-ba85-11e8-96f8-529269fb1459"
                }
              }
            ]
          },
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentNotes-1",
            "valueAnnotation": {
              "time": "2018-06-22T10:01:00+00:00",
              "text": "Added during consultation"
            }
          },
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-AdjustmentCategory-1",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AdjustmentCategories-1",
                  "code": "addsupport",
                  "display": "Provision of Additional Support"
                }
              ]
            }
          }
        ],
        "status": "active",
        "category": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-FlagCategory-1",
              "code": "reasonable adjustments flag",
              "display": "Reasonable Adjustments Flag"
            }
          ]
        },
        "code": {
          "coding": [
            {
              "system": "https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-AccessibleInformationAdjustments-1",
              "code": "patientnottobeleftalone",
              "display": "Patient not to be left alone"
            }
          ]
        },
        "subject": {
          "reference": "https://demographics.spineservices.nhs.uk/STU3/Patient/999999998"
        }
      }
    }
  ]
}

2.9 Read List request - xml example

http request & headers

GET https://clinicals.spineservices.nhs.uk/STU3/List?
 patient=999999998&
 status=current&
 code=http://snomed.info/sct|1094391000000102&
 _format=xml HTTP/1.1
Authorization: Bearer [jwt_token_string]
FromASID: 654321123456
ToASID: 987654456789
Prefer: return=representation
InteractionID: urn:nhs:names:services:raflags:List.read:1

http body

None

2.10 Read List request - json example

http request & headers

GET https://clinicals.spineservices.nhs.uk/STU3/List?
 patient=999999998&
 status=current&
 code=http://snomed.info/sct|1094391000000102&
 _format=json HTTP/1.1
Authorization: Bearer [jwt_token_string]
FromASID: 654321123456
ToASID: 987654456789
Prefer: return=representation
InteractionID: urn:nhs:names:services:raflags:List.read:1

http body

None

2.11 Read List response - xml example

http response & headers

HTTP/1.1 200 OK
Date: Tue, 24 Jul 2018 11:00:01 GMT
Content-Type: application/fhir+xml

http body

Read List response XML Example

<!-- ReadListResponseBody-example.xml -->
<Bundle xmlns="http://hl7.org/fhir">
    <id value="b45afdbc-cce1-4623-8942-2ec3baf879e7"/>
    <meta>
        <profile value="http://hl7.org/fhir/bundle"/>
    </meta>
    <type value="searchset"/>
    <total value="1"/>
    <!--    all search sets include the self link - the statement of the query string searched on. -->
    <link>
        <relation value="self"/>
        <url value="https://clinicals.spineservices.nhs.uk/STU3/List?patient=999999998&amp;status=current&amp;code=http://snomed.info/sct|1094391000000102&amp;_format=xml"/>
   </link>
    <!-- search pagination is also represented as a link set here if required -->
    <!--    now, each entry is an action to take in the transaction    -->
    <entry>
        <fullUrl value="https://clinicals.spineservices.nhs.uk/STU3/List/e00c5a85-d34f-4075-96ac-b787deb484b1"/>
        <resource>
            <!-- found payload resource or operationOutcome in here -->
            <List xmlns="http://hl7.org/fhir">
                <id value="130f416a-055d-4a5d-a453-2b7c2de3b57b"/>
                <meta>
                    <versionId value="f2fef5e5-c38a-408c-a9bc-2d49923928f8"/>
                    <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-RARecord-List-1"/>
                </meta>
                <contained>
                    <Condition xmlns="http://hl7.org/fhir">
                        <id value="57f04652-6dd0-4135-a560-f9091b1b26fa"/>
                        <meta>
                            <versionId value="557ccfc3-0c78-48bf-aedd-70cc08af2ba1"/>
                            <lastUpdated value="2018-07-23T11:00:00+00:00"/>
                            <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-RARecord-Condition-1" />
                        </meta>
                        <extension url="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-RARecord-Provenance-1">
                            <extension url="created">
                                <valueReference>
                                    <reference value="urn:uuid:8ce7de6b-1307-432d-8e96-ae6a613ca3e4"/>
                                </valueReference>
                            </extension>
                        </extension>
                        <clinicalStatus value="active"/>
                        <category>
                            <coding>
                                <system value="https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-ConditionCategory-1"/>
                                <code value="issue"/>
                                <display value="Issue"/>
                            </coding>
                        </category>
                        <code>
                            <coding>
                                <system value="https://fhir.nhs.uk/STU3/CodeSystem/CodeSystem-RARecord-ConditionCode-1"/>
                                <code value="1855002"/>
                                <display value="Learning Disability(s)"/>
                            </coding>
                        </code>
                        <subject>
                            <reference value="demographics.spineservices.nhs.uk/STU3/Patient/999999998"/>
                        </subject>
                    </Condition>
                </contained>
                <contained>
                    <Provenance>
                        <id value="8ce7de6b-1307-432d-8e96-ae6a613ca3e4"/>
                        <meta>
                            <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/RARecord-Provenance-1"/>
                        </meta>
                        <target>
                            <reference value="Condition/57f04652-6dd0-4135-a560-f9091b1b26fa"/>
                        </target>
                        <recorded value="2018-07-23T11:00:00+00:00"/>
                        <agent>
                            <role>
                                <coding>
                                    <system value="https://fhir.nhs.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1"/>
                                    <code value="R0260"/>
                                    <display value="General Medical Practitioner"/>
                                </coding>
                            </role>
                            <whoReference>
                                <reference value="https://sds.spineservices.nhs.uk/STU3/Practitioner/2ee4tr6a9"/>
                                <display value="Dr.D"/>
                            </whoReference>
                            <onBehalfOfReference>
                                <reference value="https://directory.spineservices.nhs.uk/STU3/Organization/a3e5i7"/>
                                <display value="Some GP Clinic"/>
                            </onBehalfOfReference>
                        </agent>
                    </Provenance>
                </contained>
                <status value="current"/>
                <mode value="changes"/>
                <title value="Reasonable Adjustment List"/>
                <code>
                    <coding>
                        <system value="http://snomed.info/sct"/>
                        <code value="1094391000000102"/>
                        <display value="Reasonable adjustments for health and care access"/>
                    </coding>
                </code>
                <subject>
                    <reference value="demographics.spineservices.nhs.uk/STU3/Patient/999999998"/>
                </subject>
                <date value="2018-07-23T11:00:00+00:00"/>
                <entry>
                    <deleted value="false"/>
                    <date value="2018-07-23T11:00:00+00:00"/>
                    <item>
                        <reference value="urn:uuid:557ccfc3-0c78-48bf-aedd-70cc08af2ba1"/>
                    </item>
                </entry>
                <entry>
                    <deleted value="false"/>
                    <date value="2018-07-23T11:00:00+00:00"/>
                    <item>
                        <reference value="urn:uuid:8ce7de6b-1307-432d-8e96-ae6a613ca3e4"/>
                    </item>
                </entry>
            </List>
        </resource>
        <!--    optional details about the search, useful here to categorise matches vs includes or to mark a search failure (the search process MAY include an OperationOutcome in the search set) -->
        <search>
          <mode value="match"/>
        </search>
    </entry>
</Bundle>

2.12 Read List response - json example

http response & headers

HTTP/1.1 200 OK
Date: Tue, 24 Jul 2018 11:00:01 GMT
Content-Type: application/fhir+json

http body

Read List response JSON Example

{
  "resourceType": "Condition",
  "fhir_comments": [
    " json example AAJSONPlaceholder.json "
  ]
}