Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 


FHIR® ReferralRequest examples

Access Record Structured FHIR examples

The following is a set of request/response examples for ReferralRequest:

Example 1

Request

Example of a call to return the following items from a patient's structured record:

  • ReferralRequest

Request payload

{
  "meta": {
    "profile": [
      "https://fhir.nhs.uk/STU3/OperationDefinition/GPConnect-GetStructuredRecord-Operation-1"
    ]
  },
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "patientNHSNumber",
      "valueIdentifier": {
        "system": "https://fhir.nhs.uk/Id/nhs-number",
        "value": "9999999999"
      }
    },
    {
      "name": "includeReferrals"
	  "part": [
        {
          "name": "referralsSearchPeriod",
          "valuePeriod": {
            "start": "2019-01-25",
            "end": "2019-06-25"
          }
        }
      ]
    }
  ]
}

Response payload

{
  "resourceType": "Bundle",
  "meta": {
    "profile": [
      "https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-StructuredRecord-Bundle-1"
    ]
  },
  "type": "collection",
  "entry": [
    {
      "resource": {
        "resourceType": "List",
        "meta": {
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-List-1"
          ]
        },
        "status": "current",
        "mode": "snapshot",
        "title": "Referral details",
        "code": {
          "coding": [
            {
              "code": "886721000000107",
              "display": "Referral details",
              "system": "http://snomed.info/sct"
            }
          ]
        },
        "subject": {
          "reference": "Patient/04603d77-1a4e-4d63-b246-d7504f8bd833"
        },
        "date": "2019-03-01T10:57:34+00:00",
        "orderedBy": {
          "coding": [
            {
              "code": "event-date",
              "system": "http://hl7.org/fhir/list-order"
            }
          ]
        },
        "entry": [
          {
            "item": {
              "reference": "ReferralRequest/Consultation1-Topic1-Category-Plan-ReferralRequest-1"
            }
		  },
          {
            "item": {
              "reference": "ReferralRequest/Consultation1-Topic5-Category-Plan-ReferralRequest-1"
            }
		  }
        ]
      }
    },
	{
      "resource": {
		"resourceType": "ReferralRequest",
		"id": "Consultation1-Topic5-Category-Plan-ReferralRequest-1",
		"meta": {
		"profile": [
		  "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-ReferralRequest-1"
			]
		},
		"identifier": [
			{
			  "system": "https://fhir.nhs.uk/Id/cross-care-setting-identifier",
			  "value": "B154D1A3-D631-49BD-8B67-2F76D7D85865"
			},
			{
			  "system": "https://fhir.nhs.uk/Id/ubr-number",
			  "value": "bb2378b6-dde2-11e9-9d36-2a2ae2dbcce4"
			}
		],
		"status": "unknown",
		"intent": "order",
		"priority": "routine",
		"subject": {
		  "reference": "Patient/04603d77-1a4e-4d63-b246-d7504f8bd833"
		  },
		"context": {
			"reference": "Encounter/Encounter1"
		  },
		"authoredOn": "2019-03-28T10:30:00+00:00",
		"requester": {
			"agent": {
			  "reference": "Practitioner/ff266bb2-cddb-4d03-837c-bd64d4bbe4eb"
			}
		},
		"recipient": [
			{
			  "reference": "Practitioner/bb2379f6-dde2-11e9-9d36-2a2ae2dbcce4",
			  "display": "Dr Dave"
			}
		],
		"reasonCode": [
		  {	
			"coding": [
			  {
				"system": "http://snomed.info/sct",
				"code": "308447003",
				"display": "Referral to physiotherapist"
			  }
			]
		  }
		],
		"description": "Referral due to swollen legs"
		}
	},
{
      "resource": {
		"resourceType": "ReferralRequest",
		"id": "Consultation1-Topic1-Category-Plan-ReferralRequest-1",
		"meta": {
		"profile": [
		  "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-ReferralRequest-1"
			]
		},
		"identifier": [
			{
			  "system": "https://fhir.nhs.uk/Id/cross-care-setting-identifier",
			  "value": "B154D1A3-D631-49BD-8B67-2F76D7D85865"
			},
			{
			  "system": "https://fhir.nhs.uk/Id/ubr-number",
			  "value": "bb2378b6-dde2-11e9-9d36-2a2ae2dbcce4"
			}
		],
		"status": "unknown",
		"intent": "order",
		"priority": "routine",
		"subject": {
		  "reference": "Patient/04603d77-1a4e-4d63-b246-d7504f8bd833"
		  },
		"context": {
			"reference": "Encounter/Encounter1"
		  },
		"authoredOn": "2019-03-28T10:30:00+00:00",
		"requester": {
			"agent": {
			  "reference": "Practitioner/ff266bb2-cddb-4d03-837c-bd64d4bbe4eb"
			}
		},
		"recipient": [
			{
			  "reference": "Practitioner/bb2379f6-dde2-11e9-9d36-2a2ae2dbcce4",
			  "display": "Dr Dave"
			}
		],
		"reasonCode": [
		  {	
			"coding": [
			  {
				"system": "http://snomed.info/sct",
				"code": "308448008",
				"display": "Referral to counselor"
			  }
			]
		  }
		]
	  }
	},
	{
      "resource": {
        "resourceType": "Patient",
        "id": "04603d77-1a4e-4d63-b246-d7504f8bd833",
        "meta": {
          "versionId": "1469448000000",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
          ]
        },
        "extension": [
          {
            "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-RegistrationDetails-1",
            "extension": [
              {
                "url": "registrationPeriod",
                "valuePeriod": {
                  "start": "1962-07-13T00:00:00+00:00"
                }
              }
            ]
          }
        ],
        "identifier": [
          {
            "extension": [
              {
                "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-CareConnect-GPC-NHSNumberVerificationStatus-1",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "https://fhir.nhs.uk/CareConnect-NHSNumberVerificationStatus-1",
                      "code": "01",
                      "display": "Number present and verified"
                    }
                  ]
                }
              }
            ],
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9999999999"
          }
        ],
        "active": true,
        "name": [
          {
            "use": "official",
            "text": "JACKSON Jane (Miss)",
            "family": "Jackson",
            "given": [
              "Jane"
            ],
            "prefix": [
              "Miss"
            ]
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "01454587554",
            "use": "home"
          }
        ],
        "gender": "female",
        "birthDate": "1952-05-31",
        "address": [
          {
            "use": "home",
            "type": "physical",
            "line": [
              "Cable Place",
              "Roundhay"
            ],
            "city": "Leeds",
            "district": "West Yorkshire",
            "postalCode": "LS1 5HT"
          }
        ],
        "generalPractitioner": [
          {
            "reference": "Practitioner/6c41ebfd-57c3-4162-9d7b-208c171a2fd7"
          }
        ],
        "managingOrganization": {
          "reference": "Organization/db67f447-b30d-442a-8e31-6918d1367eeb"
        }
      }
    },
    {
      "resource": {
        "resourceType": "Organization",
        "id": "db67f447-b30d-442a-8e31-6918d1367eeb",
        "meta": {
          "versionId": "636064088098730113",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          ]
        },
        "identifier": [
          {
            "system": "https://fhir.nhs.uk/Id/ods-organization-code",
            "value": "O001"
          }
        ],
        "name": "The Trevelyan Practice",
        "address": [
          {
            "line": [
              "Trevelyan Square",
              "Boar Ln"
            ],
            "city": "Leeds",
            "district": "West Yorkshire",
            "postalCode": "LS1 6AE"
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "03003035678",
            "use": "work"
          }
        ]
      }
    },
    {
      "resource": {
        "resourceType": "Practitioner",
        "id": "6c41ebfd-57c3-4162-9d7b-208c171a2fd7",
        "meta": {
          "versionId": "1469448000000",
          "lastUpdated": "2016-07-25T12:00:00.000+00:00",
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
          ]
        },
        "identifier": [
          {
            "system": "https://fhir.nhs.uk/Id/sds-user-id",
            "value": "G13579135"
          }
        ],
        "name": [
          {
            "use": "usual",
            "family": "Gilbert",
            "given": [
              "Nichole"
            ],
            "prefix": [
              "Miss"
            ]
          }
        ],
        "gender": "female"
      }
    },
    {
      "resource": {
        "resourceType": "PractitionerRole",
        "id": "e0244de8-07ef-4274-9f7a-d7067bcc8d21",
        "meta": {
          "profile": [
            "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-PractitionerRole-1"
          ]
        },
        "practitioner": {
          "reference": "Practitioner/6c41ebfd-57c3-4162-9d7b-208c171a2fd7"
        },
        "organization": {
          "reference": "Organization/db67f447-b30d-442a-8e31-6918d1367eeb"
        },
        "code": [
          {
            "coding": [
              {
                "system": "https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-SDSJobRoleName-1",
                "code": "R0260",
                "display": "General Medical Practitioner"
              }
            ]
          }
        ]
      }
    }
  ]
}

All content is available under the Open Government Licence v3.0, except where otherwise stated