-
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.
NPA-3659: Refactoring/adding of OAS examples (#106)
* NPA-3659: add QuestionnaireResponse examples & associated OAS refactor * NPA-3659: replace inline RelatedPerson examples with completive contextual ones * NPA-3659: add error OperationOutcome examples * NPA-3659: relocate examples for improved readability * NPA-3659: add missing 'type' to identifier examples * NPA-3659: fix casing on errors folder
- Loading branch information
1 parent
7e59bc9
commit 1056956
Showing
14 changed files
with
992 additions
and
482 deletions.
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
specification/examples/requests/POST_QuestionnaireResponse/adult-nominates-adult.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,92 @@ | ||
QuestionnaireResponseAdultNominatesAdultRequest: | ||
summary: Adult nominates Adult access request | ||
description: | | ||
Example proxy access request from an adult (Jill) with NHS number `9000000006` nominating her husband (Tom) with NHS number `9000000005` to act on her behalf. | ||
Significant things to point out: | ||
- `source.type` should be `Patient` when a patient is nominating a proxy | ||
- `source.identifier.value` should be the NHS number of the user completing the form - this should correlate with the Identity token in the request | ||
- `subject.type` should be `Patient` since it is the patient that is the subject of the application | ||
- `subject.identifier.value` should be the NHS Number of the patient to which the application relates | ||
- `relatedPerson` demographics are present in the request as a result of being provided by the applicant | ||
value: | ||
resourceType: QuestionnaireResponse | ||
status: "completed" | ||
authored: "2024-07-15T09:43:03.280Z" | ||
source: | ||
type: "Patient" | ||
identifier: | ||
system: "https://fhir.nhs.uk/Id/nhs-number" | ||
value: "9000000006" | ||
subject: | ||
type: "Patient" | ||
identifier: | ||
system: "https://fhir.nhs.uk/Id/nhs-number" | ||
value: "9000000006" | ||
questionnaire: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1" | ||
item: | ||
- linkId: "relatedPerson" | ||
text: "Proxy details" | ||
item: | ||
- linkId: "relatedPerson_identifier" | ||
text: "NHS number" | ||
answer: | ||
- valueString: "9000000005" | ||
- linkId: "relatedPerson_name" | ||
text: "Name" | ||
item: | ||
- linkId: "relatedPerson_name_first" | ||
text: "First name" | ||
answer: | ||
- valueString: "Tom" | ||
- linkId: "relatedPerson_name_family" | ||
text: "Last name" | ||
answer: | ||
- valueString: "Jones" | ||
- linkId: "relatedPerson_birthDate" | ||
text: "Date of birth" | ||
answer: | ||
- valueDate: "1970-07-12" | ||
- linkId: "relatedPerson_basisForAccess" | ||
text: "Basis for Access" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole" | ||
code: "Personal" | ||
display: "Personal relationship with the patient" | ||
- linkId: "relatedPerson_relationship" | ||
text: "Relationship" | ||
answer: | ||
- valueCoding: | ||
system: "http://terminology.hl7.org/CodeSystem/v3-RoleCode" | ||
code: "SPS" | ||
display: "Spouse" | ||
- linkId: "patient" | ||
text: "Patient details" | ||
item: | ||
- linkId: "patient_identifier" | ||
text: "NHS number" | ||
answer: | ||
- valueString: "9000000006" | ||
- linkId: "requestedAccess" | ||
text: "Requested access" | ||
item: | ||
- linkId: "requestedAccess_accessLevel" | ||
text: "Requested access level" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess" | ||
code: "APPT" | ||
display: "Appointment Booking" | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess" | ||
code: "VACC" | ||
display: "Vaccination Records" | ||
- linkId: "requestedAccess_reasonsForAccess" | ||
text: "Reason for access" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess" | ||
code: "PRAC" | ||
display: "Practical Reasons" |
92 changes: 92 additions & 0 deletions
92
specification/examples/requests/POST_QuestionnaireResponse/adult-to-adult-with-capacity.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,92 @@ | ||
QuestionnaireResponseAdultToAdultWithCapacityRequest: | ||
summary: Adult > Adult (with capacity) access request | ||
description: | | ||
Example proxy access request from an adult (Tom) with NHS number `9000000005` requesting access to act on behalf of his wife (Jill) with NHS number `9000000006`. | ||
Significant details to point out: | ||
- `source.type` should be `RelatedPerson` when a proxy is applying | ||
- `source.identifier.value` should be the NHS number of the user completing the form - this should correlate with the Identity token in the request | ||
- `subject.type` should be `Patient` since it is the patient that is the subject of the application | ||
- `subject.identifier.value` should be the NHS Number of the patient to which the application relates | ||
- `patient` demographics are present in the request as a result of being provided by the applicant | ||
value: | ||
resourceType: QuestionnaireResponse | ||
status: "completed" | ||
authored: "2024-07-15T09:43:03.280Z" | ||
source: | ||
type: "RelatedPerson" | ||
identifier: | ||
system: "https://fhir.nhs.uk/Id/nhs-number" | ||
value: "9000000005" | ||
subject: | ||
type: "Patient" | ||
identifier: | ||
system: "https://fhir.nhs.uk/Id/nhs-number" | ||
value: "9000000006" | ||
questionnaire: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1" | ||
item: | ||
- linkId: "relatedPerson" | ||
text: "Proxy details" | ||
item: | ||
- linkId: "relatedPerson_identifier" | ||
text: "NHS number" | ||
answer: | ||
- valueString: "9000000005" | ||
- linkId: "relatedPerson_basisForAccess" | ||
text: "Basis for Access" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.hl7.org.uk/CodeSystem/UKCore-AdditionalPersonRelationshipRole" | ||
code: "Personal" | ||
display: "Personal relationship with the patient" | ||
- linkId: "relatedPerson_relationship" | ||
text: "Relationship" | ||
answer: | ||
- valueCoding: | ||
system: "http://terminology.hl7.org/CodeSystem/v3-RoleCode" | ||
code: "SPS" | ||
display: "Spouse" | ||
- linkId: "patient" | ||
text: "Patient details" | ||
item: | ||
- linkId: "patient_identifier" | ||
text: "NHS number" | ||
answer: | ||
- valueString: "9000000006" | ||
- linkId: "patient_name" | ||
text: "Name" | ||
item: | ||
- linkId: "patient_name_first" | ||
text: "First name" | ||
answer: | ||
- valueString: "Jill" | ||
- linkId: "patient_name_family" | ||
text: "Last name" | ||
answer: | ||
- valueString: "Jones" | ||
- linkId: "patient_birthDate" | ||
text: "Date of birth" | ||
answer: | ||
- valueDate: "1965-01-01" | ||
- linkId: "requestedAccess" | ||
text: "Requested access" | ||
item: | ||
- linkId: "requestedAccess_accessLevel" | ||
text: "Requested access level" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess" | ||
code: "APPT" | ||
display: "Appointment Booking" | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess" | ||
code: "VACC" | ||
display: "Vaccination Records" | ||
- linkId: "requestedAccess_reasonsForAccess" | ||
text: "Reason for access" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess" | ||
code: "PRAC" | ||
display: "Practical Reasons" |
92 changes: 92 additions & 0 deletions
92
...ication/examples/requests/POST_QuestionnaireResponse/adult-to-adult-without-capacity.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,92 @@ | ||
QuestionnaireResponseAdultToAdultWithoutCapacityRequest: | ||
summary: Adult > Adult (without capacity) access request | ||
description: | | ||
Example proxy access request from an adult (Danny) with NHS number `9876543210` requesting access to act on behalf of an elderly parent (Florence) without capacity wth NHS number `9000000008`. | ||
Significant details to point out: | ||
- `source.type` should be `RelatedPerson` when a proxy is applying | ||
- `source.identifier.value` should be the NHS number of the user completing the form - this should correlate with the Identity token in the request | ||
- `subject.type` should be `Patient` since it is the patient that is the subject of the application | ||
- `subject.identifier.value` should be the NHS Number of the patient to which the application relates | ||
- `patient` demographics are present in the request as a result of being provided by the applicant | ||
value: | ||
resourceType: QuestionnaireResponse | ||
status: "completed" | ||
authored: "2024-07-15T09:43:03.280Z" | ||
source: | ||
type: "RelatedPerson" | ||
identifier: | ||
system: "https://fhir.nhs.uk/Id/nhs-number" | ||
value: "9876543210" | ||
subject: | ||
type: "Patient" | ||
identifier: | ||
system: "https://fhir.nhs.uk/Id/nhs-number" | ||
value: "9000000008" | ||
questionnaire: "https://api.service.nhs.uk/validated-relationships/FHIR/R4/Questionnaire/01dc6813-3421-4d14-948d-a4888241add1" | ||
item: | ||
- linkId: "relatedPerson" | ||
text: "Proxy details" | ||
item: | ||
- linkId: "relatedPerson_identifier" | ||
text: "NHS number" | ||
answer: | ||
- valueString: "9876543210" | ||
- linkId: "relatedPerson_basisForAccess" | ||
text: "Basis for Access" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/STU3/CodeSystem/RARecord-ProxyRole-1" | ||
code: "002" | ||
display: "Best interest decision made on behalf of the patient (Mental Capacity Act 2005)" | ||
- linkId: "relatedPerson_relationship" | ||
text: "Relationship" | ||
answer: | ||
- valueCoding: | ||
system: "http://terminology.hl7.org/CodeSystem/v3-RoleCode" | ||
code: "CHILD" | ||
display: "Child" | ||
- linkId: "patient" | ||
text: "Patient details" | ||
item: | ||
- linkId: "patient_identifier" | ||
text: "NHS number" | ||
answer: | ||
- valueString: "9000000008" | ||
- linkId: "patient_name" | ||
text: "Name" | ||
item: | ||
- linkId: "patient_name_first" | ||
text: "First name" | ||
answer: | ||
- valueString: "Florence" | ||
- linkId: "patient_name_family" | ||
text: "Last name" | ||
answer: | ||
- valueString: "Smith" | ||
- linkId: "patient_birthDate" | ||
text: "Date of birth" | ||
answer: | ||
- valueDate: "1935-01-02" | ||
- linkId: "requestedAccess" | ||
text: "Requested access" | ||
item: | ||
- linkId: "requestedAccess_accessLevel" | ||
text: "Requested access level" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess" | ||
code: "APPT" | ||
display: "Appointment Booking" | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-RequestedAccess" | ||
code: "VACC" | ||
display: "Vaccination Records" | ||
- linkId: "requestedAccess_reasonsForAccess" | ||
text: "Reason for access" | ||
answer: | ||
- valueCoding: | ||
system: "https://fhir.nhs.uk/CodeSystem/Proxy-Placeholder-ReasonForAccess" | ||
code: "TECH" | ||
display: "Technical Barriers" |
Oops, something went wrong.