Profiles & Operations > Operation: Create Patient List

DRAFT CONTENT

Interaction: Create Patient List

The Create Patient List interaction establishes a collection of patients linked to a specific EMR instance, representing those of interest for receiving clinical event notifications via the pub/sub mechanism. This list serves as a filtering input for subscriptions, ensuring that only events pertaining to patients within the list are delivered to the corresponding subscriber (e.g., the EMR system)

Specification

This specification is based on use of the HL7 FHIR Group resource.

Usage

Create Patient List Request

The Create Patient List shall utilize the FHIR Group resource to define and maintain references to all patients associated with a specific EMR instance. This ensures a standardized representation of the patients for use in subscription filtering and notification delivery.

`POST https://[base_url]/Bundle/`

where [identifier] represents a reference to EMR instance whose patient list is created with this operation.

Create Patient List Response

The server returns a 201 OK HTTP status code, along with a copy of the Group resource in the HTTP body.

Interaction Sequence Diagram

GroupCreate

Example of Create Patient List Interaction

Example Create Request

HTTP Method:

POST

Headers:

Content-Type: application/fhir+json Client ID: CI-12345-patient-list

Address:

[base_url]/Bundle/

Example Create Request Body

HTTP Body contains a FHIR Group resource with reference to Patient resource conformant with CA Core + specification.


{
  "resourceType": "Bundle",
  "type": "collection",
  "entry": [
    {
      "fullUrl": "urn:uuid:group-1",
      "resource": {
        "resourceType": "Group",
        "identifier": [
          {
            "system": "http://emr.orion.ca/fhir/identifiers",
            "value": "ci-12345-patient-list"
          }
        ],
        "type": "person",
        "actual": true,
        "quantity": 2,
        "member": [
          {
            "entity": {
              "reference": "urn:uuid:patient-1"
            }
          },
          {
            "entity": {
              "reference": "urn:uuid:patient-2"
            }
          }
        ]
      }
    },
    {
      "fullUrl": "urn:uuid:patient-1",
      "resource": {
        "resourceType": "Patient",
        "id": "patient-1",
        "name": [
          {
            "family": "Smith",
            "given": ["John"]
          }
        ],
        "gender": "male",
        "birthDate": "1980-01-01"
        "address" : [
            {
                "postal code" : "M8V 4T8"
            }
          ]
      }
    },
    {
      "fullUrl": "urn:uuid:patient-2",
      "resource": {
        "resourceType": "Patient",
        "id": "patient-2",
        "name": [
          {
            "family": "Doe",
            "given": ["Jane"]
          }
        ],
        "gender": "female",
        "birthDate": "1990-06-15"
          "address" : [
            {
                "postal code" : "M8Y 3T6"
            }
          ]
      }
    }
  ]
}

Example Create Response Body

HTTP/1.1 201 'Created

Content-Type: application/fhir+json

HTTP Body contains a FHIR Group resource with reference to Patient resource conformant with CA Core + specification.

{
        "resourceType": "Group",
        "identifier": [
          {
            "system": "http://emr.orion.ca/fhir/identifiers",
            "value": "ci-12345-patient-list"
          }
        ],
        "type": "person",
        "actual": true,
        "member": [
          { "entity": { "reference": "Patient/101" } },
          { "entity": { "reference": "Patient/102" } }
        ]
      }
}


Expected Behaviour

Case Scenario Description HTTP Status Code Response Payload
1 A valid Group is submitted, accepted, and created in the repository HTTP 201 Created
2 The submitted Bundle cannot be validated as it does not conform to the specification HTTP 422 Bad Request. Returns an OperationOutcome resource indicating an issue. The client must fix the request and try again.
3 POST Interactions contains incorrect header value for "Content-Type" - should be "application/fhir+json" HTTP 400 Resource not found. Returns an OperationOutcome resource indicating an issue.
4 API validates the request but cannot return a valid response due to internal issues. HTTP 500 Internal Server Error. Returns an OperationOutcome resource indicating an issue.

Supported Profiles

Profile Name URL
Group Ontario Health Publish-Subscribe Group Profile