PatientFlag record

This page shows the functional use cases provided by the PatientFlag API:

  • Retrieve a set of top-level Flags (just the Flags with no associated resources)
  • Retrieve a specific type of Flag with associated resources
  • Add a top-level Flag
  • Add a top-level Flag (and associated Additional Detail resources)
  • Add/remove associated resources (with the dependency that a top-level flag must already be added/removed)
  • Remove a top-level Flag (which will remove all associated resources)

This API is abstract only. Concrete specialisations of the API have been implemented to support Reasonable Adjustments and Female Genital Mutilation Flags.

Retrieve PatientFlags

Overview

For high level requirements, Home.

Use Case

A Patient Flag Record may be retrieved if it exists. It will be possible to determine that adjustment flags exist by searching for a England Flag Patient Flag with:

System Interaction

Queries

Using FHIR search capabilities, it is possible to retrieve the Patient Flag records in several ways.

This section describes how to query from the Flag endpoint using FHIR search

This will return all associated Flag resources for a given Patient.

GET [baseUrl]/Flag?patient=[patientNHSNumber]

e.g:

GET [baseUrl]/Flag?patient=9449306753

This limits the search to Flags for the patient that has the identifier 9449306753

This query relies on the Flag.patient SearchParameter.


Retrieve a PatientFlag with associated resources

Overview

For high level requirements, Home.

Use Case

A Patient Flag Record of a given type may be retrieved if it exists along with all supporting Additional Detail resources. It will be possible to determine that adjustment flags exist by searching for a England Flag Patient Flag with:

System Interaction

Queries

Using FHIR search capabilities, it is possible to retrieve the reasonable adjustment records in several ways.

This section describes how to query from the Flag endpoint using FHIR search

This will return Patient Flag resource of set type and all associated Additional Detail resources for a given Patient.

GET [baseUrl]/Flag?patient=[patientNHSNumber]&code=[patientFlagCode]

e.g:

GET [baseUrl]/Flag?patient=9449306753&code=national-reasonable-adjustment-flag

This limits the search to Flags for the patient that has the identifier 9449306753 and are part of the Reasonable Adjustment flag

This query relies on the Flag.patient and England FlagCode SearchParameters.


Add a PatientFlag

Overview

For high level requirements, see Home.

Use Case

System Interactions

The practitioner decides to record patient flag information.

This could be done by POSTing the PatientFlag resource to the Flag endpoint

Queries

Using FHIR create capabilities, it is possible to create/write the Patient Flag record.

Flag endpoint write

As an abstract PatientFlag, PatientFlag records are created by POSTing the resource to the relevant resource type endpoint.

POST [baseURL]/Flag

Add a PatientFlag and associated resources

Overview

For high level requirements, see Home.

Use Case

System Interactions

The practitioner decides to record patient flag information.

This could be done with individual calls to the required endpoints, or can be done in a single transaction Bundle. A transaction Bundle can help with data integrity requirements and also help to reduce required http calls.

Examples

The following set of examples constitute the individual associated resources with the initial addition of a flag for Reasonable Adjustment. This include a patient Flag resource, the adjustment Flag resource and the associated Condition resource. All resources have contained provenances.

A transaction Bundle is also given that allows these resources (plus the patient) to be entered in an atomic traction. It uses PUTs, where in the case of an initial update, it may be done as a conditional update

The following set of examples are for the same patient, and constitute an addition flag and condition. The transaction Bundle here illustrates an idempotent update by simply adding the new resources to the first transaction Bundle.


Add/remove associated resources

Overview

For high level requirements, see Home.

Add Use Case

System Interactions

The practitioner decides to record Additional Detail to support or enrich the Patient Flag record

This could be done with individual calls to the required endpoints, or can be done in a single transaction Bundle. A transaction Bundle can help with data integrity requirements and also help to reduce required http calls.

Queries

Using FHIR create capabilities, it is possible to create/write the Additional Detail resource, adding it to the Patient Flag record.

Flag endpoint write

As an abstract PatientFlag, PatientFlag records are created by POSTing the resource to the relevant resource type endpoint. ResourceType will depend on modelling of the Additional Detail as a suitable resource within a given concrete implementation. e.g. Reasonable Adjustments uses Additional Detail resources, modelling Adjustments asEnglandFlagPatientFlagAdjustment resources ,and Impairments and Underlying Conditions as EnglandConditionFlag resources.

POST [baseURL]/[resourceType]


Remove Use Case

System Interactions

In the following sequence diagram, a patient and/or practitioner decide to remove the patient flag.

The following resource types will be deleted from the record:

Example

Multiple resources can be deleted using a transaction bundle. This RemoveRARecord-Bundle-Example:


Remove a PatientFlag

Overview

For high level requirements, see Home.

Use Case

System Interactions

In the following sequence diagram, a patient and/or practitioner decide to remove the patient flag.

Queries

Using FHIR conditional delete capabilities, it is possible to delete the entire Patient Flag record for a given patient.

Flag endpoint write

Following the standard FHIR conditional delete ReST pattern DELETE [baseURL]/[resourceType] for delete operations, to:

Remove entire Patient Flag record

Use DELETE [baseURL]/Flag?[searchParameters] Include searchParameters:

  • 'patient' - [patientNHSNumber] Provide a Removal reason string as header: x-removal: [removalReason]

e.g. DELETE [baseURL]/Flag?patient=9449306753

The following resource types will be deleted from the record:

  • the PatientFlag resource
  • any resources detailing supporting information

This query relies on the Flag.patient SearchParameter.

Remove single Flag type from Patient Flag record

Use DELETE [baseURL]/Flag?[searchParameters] Include searchParameters:

  • 'patient' - [patientNHSNumber]
  • 'code' - [patientFlagCode] Provide a Removal reason string as header: x-removal: [removalReason]

e.g. DELETE [baseURL]/Flag?patient=9449306753&code=national-reasonable-adjustment-flag

The following resource types will be deleted from the record:

  • the PatientFlag resource of coded type
  • any resources detailing supporting information

This query relies on the Flag patient and England FlagCode search parameters.

Example

Multiple resources can be deleted using a transaction bundle. This RemoveRARecord-Bundle-Example: