Examples

Example Request

{
  "resourceType": "Bundle",
  "id": "501fbbea-cfce-4b80-98fb-6cda85fcd9fb",
  "type": "message",
  "entry": [
    {
      "resource": {
        "resourceType": "MessageHeader",
        "id": "8442bcb0-49e2-494b-bea9-40da630d4a27",
        "event": {
            "system": "http://fhir.patientsknowbest.com/codesystem/message-event",
            "code": "create-or-update-patient"
        },
        "destination": [
          {
            "endpoint": "https://sandbox.patientsknowbest.com/fhir/$process-message"
          }
        ],
        "timestamp" : "2020-04-01T11:12:13+00:00",
        "source": {
          "endpoint": "https://sender.com/fhir/$process-message"
        }
      }
    },
    {
      "resource": {
        "resourceType": "Patient",
        "meta": {
          "tag": [
            {
              "system": "https://fhir.nhs.uk/Id/ODS-Code",
              "code": "P123456"
            }
          ]
        },
        "identifier": [
          {
            "extension": [
              {
                "url": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-NHSNumberVerificationStatus-1",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "https://fhir.hl7.org.uk/STU3/CodeSystem/CareConnect-NHSNumberVerificationStatus-1",
                      "code": "01"
                    }
                  ]
                }  
              }
            ],
            "system": "https://fhir.nhs.uk/Id/nhs-number",
            "value": "9999999999"
          }
        ],
        "name": [
          {
            "family": "Smith",
            "given": [
              "John"
            ],
            "prefix": [
              "Mr"
            ]
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "07123456789"
          },
          {
            "system": "email",
            "value": "john.smith@example.com"
          }
        ],
        "gender": "male",
        "birthDate": "1990-01-02",
        "address": [
          {
            "line": [
              "1 Main Street",
              "The Place"
            ],
            "city": "London",
            "postalCode": "CB11BC"
          }
        ]
      }
    }
  ]
}


Example Response

{
  "resourceType": "Bundle",
  "id": "932006ea-3206-4735-9f27-a1449af0c34e",
  "type": "message",
  "entry": [
    {
      "resource": {
        "resourceType": "MessageHeader",
        "id": "8e46a6b5-2ff2-48c8-b40f-e304e7af028b",
        "event": {
          "system": "http://fhir.patientsknowbest.com/codesystem/message-event",
          "code": "create-or-update-patient"
        },
        "destination": [
          {
            "endpoint": "https://sender.com/fhir/$process-message"
          }
        ],
        "timestamp" : "2020-04-01T11:12:14+00:00",
        "source": {
          "name": "Patients Know Best",
          "endpoint": "https://sandbox.patientsknowbest.com/fhir/$process-message"
        },
        "response": {
          "identifier": "8442bcb0-49e2-494b-bea9-40da630d4a27",
          "code": "ok"
        }
      }
    }
  ]
}
Comments