Search loading...

API Hub

Explore and Make use of Nationally Defined Messaging APIs

 

FHIR® Consultations examples

Access Record Structured FHIR examples

The following is an example of a request/response where a consumer using version 1.3.0 of this specification attempts to request consultations, problems, medications and allergies from a provider who has implemented version 1.2.3 of the GP Connect API:

Example 1

Request

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

  • Consultations
  • Problems
  • Medications
  • Allergies

Request payload

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "patientNHSNumber",
      "valueIdentifier": {
        "system": "https://fhir.nhs.uk/Id/nhs-number",
        "value": "9999999999"
      }
    },
    {
      "name": "includeAllergies",
      "part": [
        {
          "name": "includeResolvedAllergies",
          "valueBoolean": true
        }
      ]
    },
    {
      "name": "includeMedication",
      "part": [
        {
          "name": "includePrescriptionIssues",
          "valueBoolean": true
        },
        {
          "name": "medicationSearchFromDate",
          "valueDate": "2017-06-04"
        }
      ]
    },
    {
      "name": "includeConsultations",
      "part": [
        {
          "name": "numberOfMostRecent",
          "valueBoolean": "3"
        }
      ]
    },
    {
      "name": "includeProblems",
      "part": [
        {
          "name": "includeStatus",
          "valueCode": "active"
        },
        {
          "name": "includeSignificance",
          "valueCode": "major"
        }
      ]
    }
  ]
}

Response payload

Download response as json Note the inclusion of an OperationOutcome with two issues about the unsupported parameters, includeConsultations and includeProblems.

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