diff --git a/sandbox/src/mocks/r4/createDocumentReference/requests/AdviceRequestAttachment.json b/sandbox/src/mocks/r4/createDocumentReference/requests/AdviceRequestAttachment.json index a61c3be90..bdb065d96 100644 --- a/sandbox/src/mocks/r4/createDocumentReference/requests/AdviceRequestAttachment.json +++ b/sandbox/src/mocks/r4/createDocumentReference/requests/AdviceRequestAttachment.json @@ -4,8 +4,8 @@ "coding": [ { "system": "https://fhir.nhs.uk/CodeSystem/eRS-AttachmentType", - "code": "GUIDANCE_REQUEST", - "display": "Guidance Request" + "code": "ADVICE_REQUEST", + "display": "Advice Request" } ] }, diff --git a/sandbox/src/mocks/r4/createDocumentReference/responses/AdviceRequestAttachment.json b/sandbox/src/mocks/r4/createDocumentReference/responses/AdviceRequestAttachment.json index e8c721887..63f4c2147 100644 --- a/sandbox/src/mocks/r4/createDocumentReference/responses/AdviceRequestAttachment.json +++ b/sandbox/src/mocks/r4/createDocumentReference/responses/AdviceRequestAttachment.json @@ -1,15 +1,15 @@ { "id": "03f55377-33e0-4ad2-9ecc-0788342f24a1", "meta": { - "versionId": "1" + "versionId": 1 }, "resourceType": "DocumentReference", "type": { "coding": [ { "system": "https://fhir.nhs.uk/CodeSystem/eRS-AttachmentType", - "code": "GUIDANCE_REQUEST", - "display": "Guidance Request" + "code": "ADVICE_REQUEST", + "display": "Advice Request" } ] }, @@ -23,6 +23,11 @@ "content": [ { "attachment": { + "contentType": "application/pdf", + "url": "Binary/959724e3-8719-4ff3-ae37-5198c450e0f6", + "size": 18592, + "title": "upload.png", + "creation": "2022-01-31", "extension": [ { "url": "https://fhir.nhs.uk/StructureDefinition/Extension-eRS-AttachedBy", @@ -33,12 +38,7 @@ } } } - ], - "contentType": "application/pdf", - "url": "Binary/959724e3-8719-4ff3-ae37-5198c450e0f6", - "size": 18592, - "title": "upload.png", - "creation": "2022-01-31" + ] } } ], @@ -56,7 +56,7 @@ "id": "author", "practitioner": { "identifier": { - "system": "http://fhir.nhs.net/Id/sds-user-id", + "system": "https://fhir.nhs.uk/Id/sds-user-id", "value": "103264992985" }, "display": "DR AA BHATIA" @@ -72,7 +72,7 @@ { "coding": [ { - "system": "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction", + "system": "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1", "code": "REFERRING_CLINICIAN" } ] diff --git a/sandbox/src/mocks/r4/createServiceRequest/responses/createdIncomplete.json b/sandbox/src/mocks/r4/createServiceRequest/responses/createdIncomplete.json index 31202ec37..c6a0ae031 100644 --- a/sandbox/src/mocks/r4/createServiceRequest/responses/createdIncomplete.json +++ b/sandbox/src/mocks/r4/createServiceRequest/responses/createdIncomplete.json @@ -2,7 +2,7 @@ "resourceType": "ServiceRequest", "id": "a.832db7fa-ebdd-44b6-ab3b-8329c2d43149", "meta": { - "versionId": "5" + "versionId": 5 }, "subject": { "identifier": { diff --git a/sandbox/src/mocks/r4/sendCommunication/requests/initialCommunication.json b/sandbox/src/mocks/r4/sendCommunication/requests/initialCommunication.json index 171cc4382..033847530 100644 --- a/sandbox/src/mocks/r4/sendCommunication/requests/initialCommunication.json +++ b/sandbox/src/mocks/r4/sendCommunication/requests/initialCommunication.json @@ -26,17 +26,15 @@ { "reference": "HealthcareService/54b0506d-49af-4245-9d40-d7d64902055e" } - ], + ], "payload": [ { "contentReference": { "reference": "DocumentReference/6f693b93-fc6f-4aa1-955e-d9548b5a6a9a" } - } - ], - "note": [ + }, { - "text": "Please advise me on this patient who ...(information about patient)" + "contentString": "Please advise me on this patient who ...(information about patient)" } ] } diff --git a/sandbox/src/mocks/r4/sendCommunication/responses/initialCommunication.json b/sandbox/src/mocks/r4/sendCommunication/responses/initialCommunication.json index 6cbae353c..f502f2d29 100644 --- a/sandbox/src/mocks/r4/sendCommunication/responses/initialCommunication.json +++ b/sandbox/src/mocks/r4/sendCommunication/responses/initialCommunication.json @@ -1,7 +1,7 @@ { "id": "cf8d99c4-b4b1-4ad3-b5b0-2381bee8c6e8", "meta": { - "versionId": "1" + "versionId": 1 }, "resourceType": "Communication", "status": "completed", @@ -21,7 +21,7 @@ { "coding": [ { - "system": "https://fhir.nhs.uk/R4/CodeSystem/eRS-CommunicationSentBy-1", + "system": "https://fhir.nhs.uk/CodeSystem/eRS-CommunicationSentBy", "code": "REQUESTER" } ] @@ -29,22 +29,17 @@ ], "recipient": [ { - "extension": [ - { - "url": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-HealthcareService-Reference-1", - "valueReference": { - "identifier": { - "system": "http://fhir.nhs.net/Id/ers-service", - "value": "11014" - } - } - } - ] + "reference": "HealthcareService/54b0506d-49af-4245-9d40-d7d64902055e" } ], - "note": [ + "payload": [ + { + "contentReference": { + "reference": "DocumentReference/6f693b93-fc6f-4aa1-955e-d9548b5a6a9a" + } + }, { - "text": "Please advise me on this patient who ...(information about patient)" + "contentString": "Please advise me on this patient who ...(information about patient)" } ], "contained": [ @@ -53,7 +48,7 @@ "id": "sender", "practitioner": { "identifier": { - "system": "http://fhir.nhs.net/Id/sds-user-id", + "system": "https://fhir.nhs.uk/Id/sds-user-id", "value": "103264992985" }, "display": "DR AA BHATIA" @@ -69,7 +64,7 @@ { "coding": [ { - "system": "https://fhir.nhs.uk/STU3/CodeSystem/eRS-BusinessFunction-1", + "system": "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1", "code": "REFERRING_CLINICIAN" } ] diff --git a/sandbox/src/mocks/r4/sendQuestionnaireResponse/responses/basicQuestionnaireResponse.json b/sandbox/src/mocks/r4/sendQuestionnaireResponse/responses/basicQuestionnaireResponse.json index 723f0762f..fbcb16869 100644 --- a/sandbox/src/mocks/r4/sendQuestionnaireResponse/responses/basicQuestionnaireResponse.json +++ b/sandbox/src/mocks/r4/sendQuestionnaireResponse/responses/basicQuestionnaireResponse.json @@ -2,7 +2,7 @@ "resourceType": "QuestionnaireResponse", "id": "d9d4cf80-3f9d-4435-9f3b-e6efb09ad654", "meta": { - "versionId": "2" + "versionId": 2 }, "questionnaire": "https://fhir.nhs.uk/Questionnaire/ERS-ShortList", "basedOn": [ @@ -14,7 +14,7 @@ "identifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "9912003888" - }, + } }, "status": "completed", "authored" : "2022-01-11T16:40:00+00:00", @@ -24,7 +24,7 @@ "id": "source", "practitioner": { "identifier": { - "system": "http://fhir.nhs.net/Id/sds-user-id", + "system": "https://fhir.nhs.uk/Id/sds-user-id", "value": "103264992985" }, "display": "DR AA BHATIA" @@ -40,7 +40,7 @@ { "coding": [ { - "system": "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction", + "system": "https://fhir.nhs.uk/CodeSystem/eRS-BusinessFunction-1", "code": "REFERRING_CLINICIAN" } ] diff --git a/specification/components/r4/schemas/Attachment.yaml b/specification/components/r4/schemas/Attachment.yaml new file mode 100644 index 000000000..ce8a6c6ec --- /dev/null +++ b/specification/components/r4/schemas/Attachment.yaml @@ -0,0 +1,28 @@ +title: Attachment +description: 'Attachment details' +type: object +required: + - url +properties: + extension: + type: array + items: + $ref: 'extensions/Extension-eRS-AttachedBy.yaml' + contentType: + type: string + example: 'application/pdf' + url: + type: string + example: 'Binary/959724e3-8719-4ff3-ae37-5198c450e0f6' + size: + type: integer + example: 123 + title: + type: string + example: 'upload.png' + creation: + type: string + format: date + example: '2021-04-22' + + diff --git a/specification/components/r4/schemas/Patient.yaml b/specification/components/r4/schemas/Patient.yaml new file mode 100644 index 000000000..fda6b5639 --- /dev/null +++ b/specification/components/r4/schemas/Patient.yaml @@ -0,0 +1,20 @@ +title: Patient +description: 'Patient that is the subject of the request' +type: object +required: + - identifier +properties: + identifier: + description: 'Reference to the patient' + required: + - system + - value + properties: + system: + type: string + enum: + - 'https://fhir.nhs.uk/Id/nhs-number' + example: 'https://fhir.nhs.uk/Id/nhs-number' + value: + type: string + example: '9912003888' diff --git a/specification/components/r4/schemas/eRS-Communication.yaml b/specification/components/r4/schemas/eRS-Communication.yaml new file mode 100644 index 000000000..7bb434c1d --- /dev/null +++ b/specification/components/r4/schemas/eRS-Communication.yaml @@ -0,0 +1,133 @@ +title: eRS-Communication +description: 'An A & G Communication' +type: object +required: + - resourceType + - status + - basedOn + - subject + - category + - recipient + - payload +properties: + id: + type: string + example: 'cf8d99c4-b4b1-4ad3-b5b0-2381bee8c6e8' + meta: + type: object + required: + - versionId + properties: + versionId: + type: integer + example: 1 + resourceType: + type: string + enum: + - Communication + example: Communication + subject: + $ref: 'Patient.yaml' + status: + type: string + enum: + - 'completed' + example: 'completed' + received: + type: string + format: date-time + example: '2021-04-22T08:30:00.000Z' + basedOn: + type: array + items: + type: object + required: + - reference + properties: + reference: + type: string + example: 'ServiceRequest/a.832db7fa-ebdd-44b6-ab3b-8329c2d43149' + category: + type: array + items: + type: object + required: + - coding + properties: + coding: + type: array + items: + type: object + required: + - system + - code + properties: + system: + type: string + enum: + - 'https://fhir.nhs.uk/CodeSystem/eRS-CommunicationSentBy' + example : 'https://fhir.nhs.uk/CodeSystem/eRS-CommunicationSentBy' + code: + type: string + enum: + - REQUESTER + - RESPONDER + - REFERRER_CLINICAL_INFORMATION_UPDATED + example: 'REQUESTER' + recipient: + type: array + items: + type: object + required: + - reference + properties: + reference: + type: string + example: 'HealthcareService/54b0506d-49af-4245-9d40-d7d64902055e' + payload: + type: array + items: + anyOf: + - description: 'attached document reference' + type: object + required: + - contentReference + properties: + contentReference: + type: object + required: + - reference + properties: + reference: + type: string + example: 'DocumentReference/6f693b93-fc6f-4aa1-955e-d9548b5a6a9a' + - description: 'Text of advice request' + type: object + required: + - contentString + properties: + contentString: + type: string + example: 'Please advise me on this patient who ...(information about patient)' + contained: + type: array + nullable: true + description: | + | Field | Cardinality | Notes | + | --------------------------------------- | ----------- | ----------------------------------------------- | + | `PractitionerRole` | `1..1` | The Practitioner Role Deatials of the requester | + items: + anyOf: + - $ref: 'PractitionerRole.yaml' + sender: + type: object + required: + - reference + properties: + reference: + type: string + enum: + - '#sender' + example: '#sender' + + diff --git a/specification/components/r4/schemas/eRS-DocumentReference.yaml b/specification/components/r4/schemas/eRS-DocumentReference.yaml new file mode 100644 index 000000000..163c41203 --- /dev/null +++ b/specification/components/r4/schemas/eRS-DocumentReference.yaml @@ -0,0 +1,116 @@ +title: eRS-DocumentReference +description: 'A e-referral document reference request' +type: object +required: + - resourceType + - type + - status + - subject + - content + - context +properties: + id: + type: string + example: '03f55377-33e0-4ad2-9ecc-0788342f24a1' + meta: + type: object + required: + - versionId + properties: + versionId: + type: integer + example: 6 + resourceType: + type: string + enum: + - DocumentReference + example: DocumentReference + type: + type: object + required: + - coding + properties: + coding: + type: array + items: + type: object + required: + - system + - code + properties: + system: + type: string + enum: + - 'https://fhir.nhs.uk/CodeSystem/eRS-AttachmentType' + example: 'https://fhir.nhs.uk/CodeSystem/eRS-AttachmentType' + code: + type: string + enum: + - PROVIDER + - REFERRER + - ADVICE_REQUEST + - GUIDANCE_RESPONSE + example: ADVICE_REQUEST + display: + type: string + example: 'Advice Request' + + status: + type: string + enum: + - current + example: 'current' + subject: + $ref: 'Patient.yaml' + content: + description: 'The attachment content' + type: array + items: + type: object + required: + - attachment + properties: + attachment: + $ref: Attachment.yaml + context: + type: object + required: + - related + properties: + related: + type: array + items: + type: object + required: + - type + - reference + properties: + type: + type: string + example: 'ServiceRequest' + reference: + type: string + example: 'ServiceRequest/a.832db7fa-ebdd-44b6-ab3b-8329c2d43149' + contained: + type: array + nullable: true + description: | + | Field | Cardinality | Notes | + | --------------------------------------- | ----------- | ----------------------------------------------- | + | `PractitionerRole` | `1..1` | The Practitioner Role Deatials of the requester | + items: + anyOf: + - $ref: 'PractitionerRole.yaml' + author: + type: object + required: + - reference + properties: + reference: + type: string + enum: + - '#author' + example: '#author' + + + diff --git a/specification/components/r4/schemas/eRS-QuestionnaireResponse.yaml b/specification/components/r4/schemas/eRS-QuestionnaireResponse.yaml new file mode 100644 index 000000000..74736f471 --- /dev/null +++ b/specification/components/r4/schemas/eRS-QuestionnaireResponse.yaml @@ -0,0 +1,78 @@ +title: eRS-QuestionnaireResponse +description: "A questionaire response" +type: object +required: + - resourceType + - subject + - questionnaire + - basedOn + - status + - authored + - item +properties: + id: + type: string + example: 'd9d4cf80-3f9d-4435-9f3b-e6efb09ad654' + meta: + type: object + required: + - versionId + properties: + versionId: + type: integer + example: 1 + resourceType: + type: string + enum: + - QuestionnaireResponse + example: QuestionnaireResponse + subject: + $ref: 'Patient.yaml' + questionnaire: + type: string + example: 'https://fhir.nhs.uk/Questionnaire/ERS-ShortList' + basedOn: + type: array + items: + type: object + required: + - reference + properties: + reference: + type: string + example: 'ServiceRequest/a.832db7fa-ebdd-44b6-ab3b-8329c2d43149' + status: + type: string + enum: + - completed + example: 'completed' + authored: + type: string + format: date-time + example: '2021-04-22T08:30:00.000Z' + contained: + type: array + nullable: true + description: | + | Field | Cardinality | Notes | + | --------------------------------------- | ----------- | ----------------------------------------------- | + | `PractitionerRole` | `1..1` | The Practitioner Role Deatials of the requester | + items: + anyOf: + - $ref: 'PractitionerRole.yaml' + source: + type: object + required: + - reference + properties: + reference: + type: string + enum: + - '#source' + example: '#source' + item: + type: array + items: + anyOf: + - $ref: 'linkItems/SearchCriteria.yaml' + - $ref: 'linkItems/Services.yaml' diff --git a/specification/components/r4/schemas/eRS-ServiceRequest.yaml b/specification/components/r4/schemas/eRS-ServiceRequest.yaml index 364d13d06..342f12828 100644 --- a/specification/components/r4/schemas/eRS-ServiceRequest.yaml +++ b/specification/components/r4/schemas/eRS-ServiceRequest.yaml @@ -2,8 +2,6 @@ title: eRS-ServiceRequestRequest description: 'A e-referral service request' type: object required: - - id - - meta - resourceType - subject - category @@ -11,7 +9,6 @@ required: - priority - intent - status - - identifier - requester properties: id: @@ -23,33 +20,15 @@ properties: - versionId properties: versionId: - type: string - example: '1' + type: integer + example: 1 resourceType: type: string enum: - ServiceRequest example: ServiceRequest subject: - description: 'Patient the service is ordered for' - type: object - required: - - identifier - properties: - identifier: - description: 'Reference to the patient' - required: - - system - - value - properties: - system: - type: string - enum: - - 'https://fhir.nhs.uk/Id/nhs-number' - example: 'https://fhir.nhs.uk/Id/nhs-number' - value: - type: string - example: '9912003888' + $ref: 'Patient.yaml' category: description: Classification of the service type: array diff --git a/specification/components/r4/schemas/eRS-ServiceRequestRequest.yaml b/specification/components/r4/schemas/eRS-ServiceRequestRequest.yaml deleted file mode 100644 index e7dba1b46..000000000 --- a/specification/components/r4/schemas/eRS-ServiceRequestRequest.yaml +++ /dev/null @@ -1,144 +0,0 @@ -title: eRS-ServiceRequestRequest -description: 'A e-referral service request' -type: object -required: - - resourceType - - subject - - category - - code - - priority - - intent - - status - - requester -properties: - resourceType: - type: string - enum: - - ServiceRequest - example: ServiceRequest - subject: - description: 'Patient the service is ordered for' - type: object - required: - - identifier - properties: - identifier: - description: 'Reference to the patient' - required: - - system - - value - properties: - system: - type: string - enum: - - 'https://fhir.nhs.uk/Id/nhs-number' - example: 'https://fhir.nhs.uk/Id/nhs-number' - value: - type: string - example: '9912003888' - category: - description: Classification of the service - type: array - items: - type: object - required: - - coding - properties: - coding: - type: array - items: - type: object - required: - - system - - code - properties: - system: - type: string - enum: - - https://fhir.nhs.uk/CodeSystem/message-category-servicerequest - example: 'https://fhir.nhs.uk/CodeSystem/message-category-servicerequest' - code: - type: string - enum: - - request - example: 'request' - code: - description: What is being requested/ordered - type: object - required: - - coding - properties: - coding: - type: array - items: - type: object - required: - - system - - code - properties: - system: - type: string - enum: - - https://fhir.nhs.uk/CodeSystem/ServiceRequest-Code - example: 'https://fhir.nhs.uk/CodeSystem/ServiceRequest-Code' - code: - type: string - enum: - - advice-and-guidance - example: 'advice-and-guidance' - priority: - type: string - enum: - - routine - - urgent - - two_week_wait - example: routine - intent: - type: string - enum: - - order - example: order - status: - type: string - enum: - - draft - example: draft - extension: - type: array - nullable: false - description: | - | Field | Cardinality | Notes | - | ------------------------------------------ | ----------- | --------------------------------------------------------------------------------------- | - | Extension-eRS-ReferralState | 1..1 | Details the current state of the service request | - | Extension-eRS-Referral | 0..1 | Details any eRs specific information | - items: - anyOf: - - $ref: 'extensions/Extension-eRS-ServiceRequest-State.yaml' - - $ref: 'extensions/Extension-eRS-Referral.yaml' - contained: - type: array - nullable: true - description: | - | Field | Cardinality | Notes | - | --------------------------------------- | ----------- | ----------------------------------------------- | - | `PractitionerRole` | `1..1` | The Practitioner Role Deatials of the requester | - items: - anyOf: - - $ref: 'PractitionerRole.yaml' - requester: - type: object - required: - - reference - properties: - reference: - type: string - enum: - - '#requester' - example: '#requester' - - - - - - - diff --git a/specification/components/r4/schemas/endpoints/a0XX-create-update-service-request.yaml b/specification/components/r4/schemas/endpoints/a0X1-create-update-service-request.yaml similarity index 80% rename from specification/components/r4/schemas/endpoints/a0XX-create-update-service-request.yaml rename to specification/components/r4/schemas/endpoints/a0X1-create-update-service-request.yaml index 7acfca361..a07ef2236 100644 --- a/specification/components/r4/schemas/endpoints/a0XX-create-update-service-request.yaml +++ b/specification/components/r4/schemas/endpoints/a0X1-create-update-service-request.yaml @@ -5,8 +5,8 @@ description: | TBC: Use this endpoint to create or update a Service Request -summary: A0XX - Create or update a service request -operationId: a0XX-create-update-service-request +summary: A0X1 - Create or update a service request +operationId: a0X1-create-update-service-request parameters: - $ref: '../headers/request/BearerAuthorization.yaml' - $ref: '../headers/request/CorrelationID.yaml' @@ -15,7 +15,7 @@ requestBody: content: application/fhir+json: schema: - $ref: '../eRS-ServiceRequestRequest.yaml' + $ref: '../eRS-ServiceRequest.yaml' examples: create-incomplete: summary: Create incomplete advice and guidance diff --git a/specification/components/r4/schemas/endpoints/a0X2-create-update-document-reference.yaml b/specification/components/r4/schemas/endpoints/a0X2-create-update-document-reference.yaml new file mode 100644 index 000000000..52585c5d8 --- /dev/null +++ b/specification/components/r4/schemas/endpoints/a0X2-create-update-document-reference.yaml @@ -0,0 +1,27 @@ +security: + - bearerAuth: [] +description: | + ## Overview + + TBC: Use this endpoint to create or update a Document Reference + +summary: A0X2 - Create or update a document reference +operationId: a0X2-create-update-document-reference +parameters: + - $ref: '../headers/request/BearerAuthorization.yaml' + - $ref: '../headers/request/CorrelationID.yaml' +requestBody: + required: true + content: + application/fhir+json: + schema: + $ref: '../eRS-DocumentReference.yaml' + examples: + create-incomplete: + summary: Create incomplete advice and guidance + value: + $ref: '../../examples/createDocumentReference/requests/AdviceRequestAttachment.json' +responses: + '201': + $ref: '../responses/createUpdateDocumentReference/201Response.yaml' + diff --git a/specification/components/r4/schemas/endpoints/a0X3-create-update-questionnaire-response.yaml b/specification/components/r4/schemas/endpoints/a0X3-create-update-questionnaire-response.yaml new file mode 100644 index 000000000..bcad86d3b --- /dev/null +++ b/specification/components/r4/schemas/endpoints/a0X3-create-update-questionnaire-response.yaml @@ -0,0 +1,27 @@ +security: + - bearerAuth: [] +description: | + ## Overview + + TBC: Use this endpoint to create or update a Questionnaire Response + +summary: A0X3 - Create or update a questionnaire response +operationId: a0X3-create-update-questionnaire-response +parameters: + - $ref: '../headers/request/BearerAuthorization.yaml' + - $ref: '../headers/request/CorrelationID.yaml' +requestBody: + required: true + content: + application/fhir+json: + schema: + $ref: '../eRS-QuestionnaireResponse.yaml' + examples: + create-incomplete: + summary: Create incomplete advice and guidance + value: + $ref: '../../examples/sendQuestionnaireResponse/requests/basicQuestionnaireResponse.json' +responses: + '201': + $ref: '../responses/createUpdateQuestionnaireResponse/201Response.yaml' + diff --git a/specification/components/r4/schemas/endpoints/a0X4-create-update-communication.yaml b/specification/components/r4/schemas/endpoints/a0X4-create-update-communication.yaml new file mode 100644 index 000000000..58231bab4 --- /dev/null +++ b/specification/components/r4/schemas/endpoints/a0X4-create-update-communication.yaml @@ -0,0 +1,27 @@ +security: + - bearerAuth: [] +description: | + ## Overview + + TBC: Use this endpoint to create or update a Communication + +summary: A0X4 - Create or update a communication +operationId: a0X4-create-update-communication +parameters: + - $ref: '../headers/request/BearerAuthorization.yaml' + - $ref: '../headers/request/CorrelationID.yaml' +requestBody: + required: true + content: + application/fhir+json: + schema: + $ref: '../eRS-Communication.yaml' + examples: + create-incomplete: + summary: Create incomplete advice and guidance + value: + $ref: '../../examples/sendCommunication/requests/initialCommunication.json' +responses: + '201': + $ref: '../responses/createUpdateCommunication/201Response.yaml' + diff --git a/specification/components/r4/schemas/extensions/Extension-eRS-AttachedBy.yaml b/specification/components/r4/schemas/extensions/Extension-eRS-AttachedBy.yaml new file mode 100644 index 000000000..e76eaa492 --- /dev/null +++ b/specification/components/r4/schemas/extensions/Extension-eRS-AttachedBy.yaml @@ -0,0 +1,19 @@ +title: Extension-Referral-State +description: Extension to supply the e-RS representation of the state of the referral. +type: object +required: + - url + - valueReference +properties: + url: + type: string + enum: + - 'https://fhir.nhs.uk/StructureDefinition/Extension-eRS-AttachedBy' + example: 'https://fhir.nhs.uk/StructureDefinition/Extension-eRS-AttachedBy' + valueReference: + type: object + required: + - identifier + properties: + identifier: + $ref: '../identifiers/UserId.yaml' diff --git a/specification/components/r4/schemas/linkItems/SearchCriteria.yaml b/specification/components/r4/schemas/linkItems/SearchCriteria.yaml new file mode 100644 index 000000000..139358ca0 --- /dev/null +++ b/specification/components/r4/schemas/linkItems/SearchCriteria.yaml @@ -0,0 +1,22 @@ +title: Search Criteria link item +type: object +required: + - linkId + - answer +properties: + linkId: + type: string + enum: + - 'searchCriteria' + example: 'searchCriteria' + answer: + type: array + items: + type: object + required: + - valueString + properties: + valueString: + type: string + example: 'HealthcareService?supportedSpecialty=general-medicine&supportedPriority=routine' + diff --git a/specification/components/r4/schemas/linkItems/Services.yaml b/specification/components/r4/schemas/linkItems/Services.yaml new file mode 100644 index 000000000..202edd92b --- /dev/null +++ b/specification/components/r4/schemas/linkItems/Services.yaml @@ -0,0 +1,27 @@ +title: Services link item +type: object +required: + - linkId + - answer +properties: + linkId: + type: string + enum: + - 'services' + example: 'services' + answer: + type: array + items: + type: object + required: + - valueReference + properties: + valueReference: + type: object + required: + - reference + properties: + reference: + type: string + example: 'HealthcareService/76de72bc-f001-49fa-84c6-af15a4fdb72c' + diff --git a/specification/components/r4/schemas/responses/createUpdateCommunication/201Response.yaml b/specification/components/r4/schemas/responses/createUpdateCommunication/201Response.yaml new file mode 100644 index 000000000..838067ee6 --- /dev/null +++ b/specification/components/r4/schemas/responses/createUpdateCommunication/201Response.yaml @@ -0,0 +1,19 @@ +description: A document reference created response +headers: + X-Correlation-ID: + $ref: '../../headers/response/CorrelationID.yaml' + X-Request-ID: + $ref: '../../headers/response/RequestID.yaml' + ETag: + $ref: '../../headers/response/ETag.yaml' + Content-Type: + $ref: '../../headers/response/ContentTypeFhirJson.yaml' +content: + application/fhir+json: + schema: + $ref: '../../eRS-Communication.yaml' + examples: + create-incomplete: + summary: Create auestionnaire response + value: + $ref: '../../../examples/sendCommunication/responses/initialCommunication.json' diff --git a/specification/components/r4/schemas/responses/createUpdateDocumentReference/201Response.yaml b/specification/components/r4/schemas/responses/createUpdateDocumentReference/201Response.yaml new file mode 100644 index 000000000..3b4e27919 --- /dev/null +++ b/specification/components/r4/schemas/responses/createUpdateDocumentReference/201Response.yaml @@ -0,0 +1,19 @@ +description: A document reference created response +headers: + X-Correlation-ID: + $ref: '../../headers/response/CorrelationID.yaml' + X-Request-ID: + $ref: '../../headers/response/RequestID.yaml' + ETag: + $ref: '../../headers/response/ETag.yaml' + Content-Type: + $ref: '../../headers/response/ContentTypeFhirJson.yaml' +content: + application/fhir+json: + schema: + $ref: '../../eRS-DocumentReference.yaml' + examples: + create-incomplete: + summary: Create incomplete advice and guidance + value: + $ref: '../../../examples/createDocumentReference/responses/AdviceRequestAttachment.json' diff --git a/specification/components/r4/schemas/responses/createUpdateQuestionnaireResponse/201Response.yaml b/specification/components/r4/schemas/responses/createUpdateQuestionnaireResponse/201Response.yaml new file mode 100644 index 000000000..5c393de2d --- /dev/null +++ b/specification/components/r4/schemas/responses/createUpdateQuestionnaireResponse/201Response.yaml @@ -0,0 +1,19 @@ +description: A document reference created response +headers: + X-Correlation-ID: + $ref: '../../headers/response/CorrelationID.yaml' + X-Request-ID: + $ref: '../../headers/response/RequestID.yaml' + ETag: + $ref: '../../headers/response/ETag.yaml' + Content-Type: + $ref: '../../headers/response/ContentTypeFhirJson.yaml' +content: + application/fhir+json: + schema: + $ref: '../../eRS-QuestionnaireResponse.yaml' + examples: + create-incomplete: + summary: Create auestionnaire response + value: + $ref: '../../../examples/sendQuestionnaireResponse/responses/basicQuestionnaireResponse.json' diff --git a/specification/e-referrals-service-api.yaml b/specification/e-referrals-service-api.yaml index 8c980bc80..dced401da 100644 --- a/specification/e-referrals-service-api.yaml +++ b/specification/e-referrals-service-api.yaml @@ -363,7 +363,16 @@ paths: $ref: 'components/stu3/schemas/endpoints/a043-retrieve-advice-and-guidance-overview-pdf.yaml' /R4/ServiceRequest: post: - $ref: 'components/r4/schemas/endpoints/a0XX-create-update-service-request.yaml' + $ref: 'components/r4/schemas/endpoints/a0X1-create-update-service-request.yaml' + /R4/DocumentReference: + post: + $ref: 'components/r4/schemas/endpoints/a0X2-create-update-document-reference.yaml' + /R4/QuestionnaireResponse: + post: + $ref: 'components/r4/schemas/endpoints/a0X3-create-update-questionnaire-response.yaml' + /R4/Communication: + post: + $ref: 'components/r4/schemas/endpoints/a0X4-create-update-communication.yaml' components: securitySchemes: bearerAuth: