Closed lucywilcock closed 6 years ago
These tests are mostly complete now. The time validation checks are still failing as this has not been added into the demonstrator yet.
The repeat information tests will need to be reviewed after clarification from the specification is received. At the moment there is a grey area about whether this is mandatory for acute prescriptions and, if so, what information should be included.
GpConnect Version 1.0.0. specification begins to implement Access Record - Structured. One of the first sections to be included will be the Medications section. New tests will need to be created to ensure this section works as expected.
At minimum, the following should be tested (other relevant tests may be also appropriate):
Send a valid request for the medictions section of the patient's record. The request should be made for a patient with a valid NHS number. The response should include a 200 HTTP status code, include the relevant GP Connect StructureDefinition profile details in the meta fields and include the Patient, Practitioner and Organization details in a searchset Bundle. The patient returned should be the patient requested and the details returned should be correct for that patient.
Send a request for the medications section of the patient's record with an invalid NHS number (this could be a number that does not pass validation checks, an empty nhs number, multiple nhs numbers, duplicated nhs numbers or a non-existent number). This should return an error and an OperationalOutcome with additional data on the error.
Send a request for the medications section of the patient's record with a GP organisation that is not the patient’s nominated primary care provider. This should return an error and an OperationalOutcome with additional data on the error.
Send a valid request for the medications section of the patient's record with a start date only specified. Only medications with a date after the specified date should be returned. This should include medications with dates in the future.
Send a valid request for the medications section of the patient's record with an end date only specified. Only medications with a date before the specified date should be returned.
Send a valid request for the medications section of the patient's record with a start and end date. Only medications with a date after the start date and before the end date should be returned.
Send a valid request for the medications section of the patient's record without a time period. All medications should be returned.
Send a request for the medications section of the patient's record with an invalid time period specified (e.g. the end date is before the start date). This should return an error and an OperationalOutcome with additional data on the error.
Send a valid request for the medications section of the patient's record with includeIssues set to true/false. All/none of the issues for that patient are returned, respetively.