-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #245 from NHSDigital/em-1332-add-patient-flags
EM-1332 Add patientflags
- Loading branch information
Showing
6 changed files
with
230 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"resourceType": "Bundle", | ||
"id": "16dbfb42-b5c0-4831-8258-f1a4d2491748", | ||
"type": "history", | ||
"timestamp": "2020-06-01T13:00:00Z", | ||
"entry": [ | ||
{ | ||
"fullUrl": "urn:uuid:fb88f7a9-2cba-4580-8559-f2d928273759", | ||
"resource": { | ||
"resourceType": "Parameters", | ||
"meta": { | ||
"profile": [ | ||
"http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status-r4" | ||
] | ||
}, | ||
"id": "fb88f7a9-2cba-4580-8559-f2d928273759", | ||
"parameter": [ | ||
{ | ||
"name": "subscription", | ||
"valueReference": { | ||
"reference": "https://api.service.nhs.uk/multicast-notification-service/subscriptions" | ||
} | ||
}, | ||
{ | ||
"name": "status", | ||
"valueCode": "active" | ||
}, | ||
{ | ||
"name": "type", | ||
"valueCode": "event-notification" | ||
}, | ||
{ | ||
"name": "notification-event", | ||
"part": [ | ||
{ | ||
"name": "event-number", | ||
"valueString": "1" | ||
}, | ||
{ | ||
"name": "timestamp", | ||
"valueInstant": "2020-06-01T13:00:00Z" | ||
}, | ||
{ | ||
"name": "focus", | ||
"valueReference": { | ||
"reference": "https://api.service.nhs.uk/patient-flags-api/PatientFlag?patient=9912003888&code=NRAF" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "additional-context", | ||
"part": [ | ||
{ | ||
"name": "event-type", | ||
"valueString": "patientflags-change-1" | ||
}, | ||
{ | ||
"name": "source", | ||
"valueUri": "uk.nhs.patient-flags-service" | ||
}, | ||
{ | ||
"name": "subject", | ||
"valueReference": { | ||
"identifier": { | ||
"value": "9912003888" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"request": { | ||
"method": "GET", | ||
"url": "https://api.service.nhs.uk/multicast-notification-service/subscriptions" | ||
}, | ||
"response": { | ||
"status": "200" | ||
} | ||
} | ||
] | ||
} | ||
|
9 changes: 9 additions & 0 deletions
9
specification/components/schemas/cloudevents/examples/patientflagsChangeSignal.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"specversion": "1.0", | ||
"id": "16dbfb42-b5c0-4831-8258-f1a4d2491748", | ||
"source": "uk.nhs.patient-flags-service", | ||
"type": "patientflags-change-1", | ||
"time": "2020-06-01T13:00:00Z", | ||
"dataref": "https://api.service.nhs.uk/patient-flags-api/PatientFlag?patient=9912003888&code=NRAF", | ||
"subject": "9912003888" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
specification/components/schemas/cloudevents/patientflagsChangeSignal.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
"$schema": http://json-schema.org/draft-07/schema# | ||
description: The Patient Flags Change Signal. You will receive this object if you subscribe to `patientflags-change-1` events with an `application/json` format. | ||
type: object | ||
properties: | ||
id: | ||
description: Identifies the event. | ||
"$ref": "#/definitions/iddef" | ||
examples: | ||
- 16dbfb42-b5c0-4831-8258-f1a4d2491748 | ||
source: | ||
description: Identifies the producer of your event. | ||
"$ref": "#/definitions/sourcedef" | ||
examples: | ||
- uk.nhs.patient-flags-service | ||
specversion: | ||
description: The version of the CloudEvents specification which the event uses. | ||
"$ref": "#/definitions/specversiondef" | ||
examples: | ||
- '1.0' | ||
type: | ||
description: Describes the occurrence; the name of the event. | ||
"$ref": "#/definitions/typedef" | ||
examples: | ||
- patientflags-change-1 | ||
subject: | ||
description: The NHS Number of the patient associated with the clinical flag change | ||
"$ref": "#/definitions/subjectdef" | ||
examples: | ||
- 9912003888 | ||
time: | ||
description: Timestamp of when the occurrence happened. Must adhere to RFC 3339. | ||
"$ref": "#/definitions/timedef" | ||
examples: | ||
- '2018-04-05T17:31:00Z' | ||
dataref: | ||
description: A link to the flag indicator and supported resources on the Patient Flags API. | ||
"$ref": "#/definitions/datarefdef" | ||
examples: | ||
- https://api.service.nhs.uk/patient-flags-api/PatientFlag?patient=9912003888&code=NRAF | ||
required: | ||
- id | ||
- source | ||
- specversion | ||
- type | ||
- time | ||
- dataref | ||
- subject | ||
definitions: | ||
iddef: | ||
type: string | ||
minLength: 1 | ||
sourcedef: | ||
type: string | ||
format: uri-reference | ||
minLength: 1 | ||
specversiondef: | ||
type: string | ||
minLength: 1 | ||
typedef: | ||
type: string | ||
minLength: 1 | ||
subjectdef: | ||
type: | ||
- string | ||
minLength: 1 | ||
timedef: | ||
type: | ||
- string | ||
format: date-time | ||
minLength: 1 | ||
datarefdef: | ||
type: string | ||
format: uri | ||
minLength: 1 | ||
example: | ||
specversion: '1.0' | ||
id: 16dbfb42-b5c0-4831-8258-f1a4d2491748 | ||
source: uk.nhs.patient-flags-service | ||
type: patientflags-change-1 | ||
time: '2020-06-01T13:00:00Z' | ||
dataref: https://api.service.nhs.uk/patient-flags-api/PatientFlag?patient=9912003888&code=NRAF | ||
subject: '9912003888' |
27 changes: 27 additions & 0 deletions
27
specification/components/schemas/filtering/patientflags-change-1-filtering.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# "$schema": http://json-schema.org/draft-07/schema# | ||
description: patientflags-change-1 filtering object schema. | ||
type: object | ||
properties: | ||
flagtype: | ||
type: string | ||
example: "NRAF" | ||
enum: | ||
- "NRAF" | ||
- "FGM" | ||
- "CPIS" | ||
description: | | ||
Text-based code that represents the type of patient flag. | ||
The permitted codes are as follows: | ||
| Code | Type | Description | | ||
| ---- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| NRAF | National Reasonable Adjustments Flag | Indicates a patient's key impairments across areas including learning, mobility, mental health, social or behavioural to make receiving organisations understand that the patient should be considered for adjustments to care. | | ||
| FGM | Female Genital Mutilation | Indicates that a child with female genitalia has a family history of female genetal mutilation. | | ||
| CPIS | Child Protection - Information Sharing | Indicates a child or young person who is known to social care because they are either looked after or have a child protection plan. | | ||
generalpractitioner: | ||
type: string | ||
minLength: 1 | ||
example: "Y12345" | ||
description: The ODS Code of the GP Practice for the patient. | ||
required: | ||
- flagtype | ||
- generalpractitioner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters