diff --git a/signal-schemas/examples/pathology-laboratory-reporting-test-result-stored-1/signal.json b/signal-schemas/examples/pathology-laboratory-reporting-test-result-stored-1/signal.json new file mode 100644 index 0000000..7fea6c1 --- /dev/null +++ b/signal-schemas/examples/pathology-laboratory-reporting-test-result-stored-1/signal.json @@ -0,0 +1,83 @@ +{ + "resourceType": "Bundle", + "id": "236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b", + "type": "history", + "timestamp": "2020-06-01T13:00:00Z", + "entry": [ + { + "fullUrl": "urn:uuid:236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b", + "resource": { + "resourceType": "Parameters", + "meta": { + "profile": [ + "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status-r4" + ] + }, + "id": "236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b", + "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-data-manager/FHIR/R4/Bundle/b0b97bff-e3d7-4744-a09a-e55781886dd0" + } + } + ] + }, + { + "name": "additional-context", + "part": [ + { + "name": "event-type", + "valueString": "pathology-laboratory-reporting-test-result-stored-1" + }, + { + "name": "source", + "valueUri": "uk.nhs.pathology-laboratory-reporting" + }, + { + "name": "subject", + "valueReference": { + "identifier": { + "value": "9912003888" + } + } + } + ] + } + ] + }, + "request": { + "method": "GET", + "url": "https://api.service.nhs.uk/multicast-notification-service/subscriptions" + }, + "response": { + "status": "200" + } + } + ] + } diff --git a/specification/multicast-notification-service.yaml b/specification/multicast-notification-service.yaml index 5dc0239..36cdf58 100644 --- a/specification/multicast-notification-service.yaml +++ b/specification/multicast-notification-service.yaml @@ -321,6 +321,18 @@ paths: flagtype: 'NRAF' generalpractitioner: 'XY11' origin: 'pfapi-internal-mns-int' + pathology-laboratory-reporting-test-result-stored-1: + description: "Create a pathology test result stored event" + value: + specversion: '1.0' + id: 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b + source: uk.nhs.pathology-laboratory-reporting + type: pathology-laboratory-reporting-test-result-stored-1 + time: '2020-06-01T13:00:00Z' + dataref: https://api.service.nhs.uk/patient-data-manager/FHIR/R4/Bundle/b0b97bff-e3d7-4744-a09a-e55781886dd0 + subject: '9912003888' + filtering: + requestingOrganisationODS: 'A12345' application/json: schema: type: "object" diff --git a/specification/requestBody/create-or-update-subscription-body.yaml b/specification/requestBody/create-or-update-subscription-body.yaml index 12823aa..a49f603 100644 --- a/specification/requestBody/create-or-update-subscription-body.yaml +++ b/specification/requestBody/create-or-update-subscription-body.yaml @@ -201,7 +201,7 @@ content: status: "requested" end: "2022-04-05T17:31:00.000Z" reason: "Business process A" - criteria: "eventType=gpreg-change-gp-req-1 AND supplierNACS=Y12345 AND registrationencountercode=3" + criteria: "eventType='gpreg-change-gp-req-1' AND generalpractitioner_manufacturer_org='Y12345' AND registrationencountercode='3'" channel: type: "message" endpoint: "arn:aws:sqs:eu-west-2:123456789012:queue2" @@ -213,8 +213,20 @@ content: status: "requested" end: "2022-04-05T17:31:00.000Z" reason: "Business process A" - criteria: "eventType=patientflags-change-1 AND flagtype=NRAF AND generalpractitioner=XY11" + criteria: "eventType='patientflags-change-1' AND flagtype='NRAF' AND generalpractitioner='XY11'" channel: type: "message" endpoint: "arn:aws:sqs:eu-west-2:123456789012:queue2" payload: "application/fhir+json" + pathologyLaboratoryReportingTestResultStoredSubscription: + description: "Pathology Laboratory Reporting Test Result Stored subscription" + value: + resourceType: "Subscription" + status: "requested" + end: "2022-04-05T17:31:00.000Z" + reason: "Business process A" + criteria: "eventType='pathology-laboratory-reporting-test-result-stored-1' AND requestingOrganisationODS_manufacturer_org='A12345'" + channel: + type: "message" + endpoint: "arn:aws:sqs:eu-west-2:123456789012:queue2" + payload: "application/json" diff --git a/specification/schemas/cloudevents/gpregChangeGpRequestSignal.yaml b/specification/schemas/cloudevents/gpregChangeGpRequestSignal.yaml deleted file mode 100644 index 4f58d5a..0000000 --- a/specification/schemas/cloudevents/gpregChangeGpRequestSignal.yaml +++ /dev/null @@ -1,81 +0,0 @@ -"$schema": http://json-schema.org/draft-07/schema# -description: The GP Registration Change of GP Request event. You will receive this object if you subscribe to `gpreg-change-gp-req-1` events with an `application/json` format. -type: object -properties: - id: - description: Identifies the event. - "$ref": "#/definitions/iddef" - examples: - - 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b - source: - description: Identifies the producer of the event. - "$ref": "#/definitions/sourcedef" - examples: - - uk.nhs.register-with-a-gp-surgery-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: - - gpreg-change-gp-req-1 - subject: - description: The NHS Number of the patient undergoing registration - "$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 Registration record on the Register with a GP Surgery Service API. - "$ref": "#/definitions/datarefdef" - examples: - - https://api.service.nhs.uk/register-with-a-gp-surgery/applications/236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b -required: -- id -- source -- specversion -- type -- time -- 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: 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b - source: uk.nhs.register-with-a-gp-surgery-service - type: gpreg-change-gp-req-1 - time: '2020-06-01T13:00:00Z' - dataref: https://api.service.nhs.uk/register-with-a-gp-surgery/applications/236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b - subject: '9912003888' diff --git a/specification/schemas/cloudevents/nhsNumberChange2Signal.yaml b/specification/schemas/cloudevents/nhsNumberChange2Signal.yaml deleted file mode 100644 index 41db689..0000000 --- a/specification/schemas/cloudevents/nhsNumberChange2Signal.yaml +++ /dev/null @@ -1,81 +0,0 @@ -"$schema": http://json-schema.org/draft-07/schema# -description: The NHS Number Change event. You will receive this object if you subscribe to `nhs-number-change-2` events with an `application/cloudevents+json` format. -type: object -properties: - id: - description: Identifies the event. - "$ref": "#/definitions/iddef" - examples: - - 1dd1f17a-599d-40b8-9ee9-2c92756e2bc9 - source: - description: Identifies the producer of the event. - "$ref": "#/definitions/sourcedef" - examples: - - https://fhir.nhs.uk/Id/nhsSpineASID/477121000324 - 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: - - nhs-number-change-2 - subject: - description: The NHS Number of the patient associated with the NHS number 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 patient demographic information on the Personal Demographics Service API. - "$ref": "#/definitions/datarefdef" - examples: - - https://api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888 -required: -- id -- source -- specversion -- type -- time -- 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: 1dd1f17a-599d-40b8-9ee9-2c92756e2bc9 - source: https://fhir.nhs.uk/Id/nhsSpineASID/477121000324 - type: nhs-number-change-2 - time: '2020-06-01T13:00:00Z' - dataref: https://api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888 - subject: '9912003888' diff --git a/specification/schemas/cloudevents/patientflagsChangeSignal.yaml b/specification/schemas/cloudevents/patientflagsChangeSignal.yaml deleted file mode 100644 index 19da7a7..0000000 --- a/specification/schemas/cloudevents/patientflagsChangeSignal.yaml +++ /dev/null @@ -1,81 +0,0 @@ -"$schema": http://json-schema.org/draft-07/schema# -description: The Patient Flags Change event. 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 the 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 -- 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' diff --git a/specification/schemas/cloudevents/pdsChangeOfGP2Signal.yaml b/specification/schemas/cloudevents/pdsChangeOfGP2Signal.yaml deleted file mode 100644 index 92dcfef..0000000 --- a/specification/schemas/cloudevents/pdsChangeOfGP2Signal.yaml +++ /dev/null @@ -1,81 +0,0 @@ -"$schema": http://json-schema.org/draft-07/schema# -description: The PDS Change of GP event. You will receive this object if you subscribe to `pds-change-of-gp-2` events with an `application/cloudevents+json` format. -type: object -properties: - id: - description: Identifies the event. - "$ref": "#/definitions/iddef" - examples: - - 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b - source: - description: Identifies the producer of the event. - "$ref": "#/definitions/sourcedef" - examples: - - https://fhir.nhs.uk/Id/nhsSpineASID/477121000324 - 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: - - pds-change-of-gp-2 - subject: - description: The NHS Number of the patient associated with the NHS number 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 patient demographic information on the Personal Demographics Service API. - "$ref": "#/definitions/datarefdef" - examples: - - https://api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888 -required: -- id -- source -- specversion -- type -- time -- 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: 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b - source: https://fhir.nhs.uk/Id/nhsSpineASID/477121000324 - type: pds-change-of-gp-2 - time: '2020-06-01T13:00:00Z' - dataref: https://api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888 - subject: '9912003888' diff --git a/specification/schemas/cloudevents/pdsDeath2Signal.yaml b/specification/schemas/cloudevents/pdsDeath2Signal.yaml deleted file mode 100644 index aeb4a9e..0000000 --- a/specification/schemas/cloudevents/pdsDeath2Signal.yaml +++ /dev/null @@ -1,81 +0,0 @@ -"$schema": http://json-schema.org/draft-07/schema# -description: The PDS Death event. You will receive this object if you subscribe to `pds-death-notification-2` events with an `application/cloudevents+json` format. -type: object -properties: - id: - description: Identifies the event. - "$ref": "#/definitions/iddef" - examples: - - 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b - source: - description: Identifies the producer of the event. - "$ref": "#/definitions/sourcedef" - examples: - - https://fhir.nhs.uk/Id/nhsSpineASID/477121000324 - 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: - - pds-death-notification-2 - subject: - description: The NHS Number of the patient associated with the NHS number 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 patient demographic information on the Personal Demographics Service API. - "$ref": "#/definitions/datarefdef" - examples: - - https://api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888 -required: -- id -- source -- specversion -- type -- time -- 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: 236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b - source: https://fhir.nhs.uk/Id/nhsSpineASID/477121000324 - type: pds-death-notification-2 - time: '2020-06-01T13:00:00Z' - dataref: https://api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9912003888 - subject: '9912003888'