Skip to content

Commit 0390bc1

Browse files
authored
Merge pull request #35 from NHSDigital/feature/eja_jh-eli-160-bump-oas-specification
eli-160 bumping OAS spec and adding additional examples to both the app and the README
2 parents 35d6d8d + ee3fe66 commit 0390bc1

File tree

3 files changed

+420
-107
lines changed

3 files changed

+420
-107
lines changed

sandbox/README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ make spec
1515
make up
1616
```
1717

18-
This will start the sandbox environment on localhost port 5000.
18+
This will start the sandbox environment on localhost port 9000.
1919

2020
```bash
2121
make down
@@ -25,10 +25,25 @@ This will stop the sandbox environment.
2525

2626
### Example curl calls
2727

28-
patient 0000000001 is a patient eligible and bookable for a Flu vaccination.
28+
There are a number of examples of responses which can be returned by passing specific NHS Numbers in the patient query parameter:
2929

3030
```bash
31-
curl -X GET "http://0.0.0.0:9000/eligibility?patient=0000000001" -H "Accept: application/json" -H "Authorization: Bearer sdvsd"
31+
curl -X GET "http://0.0.0.0:9000/eligibility?patient=<patient NHS Number>" -H "Authorization: Bearer sdvsd"
3232
```
3333

34-
See [app.py](app.py) for more examples.
34+
#### Example scenarios
35+
36+
| Patient ID | Response |
37+
|--------------|--------------------------------------------------|
38+
| 50000000001 | RSV - Actionable CP Booking |
39+
| 50000000002 | RSV - Actionable Non-CP Booking |
40+
| 50000000003 | RSV - Eligible, not Actionable |
41+
| 50000000004 | RSV - Not Eligible due to vaccination |
42+
| 50000000005 | RSV - Not Eligible due to not being in a cohort |
43+
| 50000000006 | RSV - No rules |
44+
| 90000000400 | Invalid input data |
45+
| 90000000404 | Person not found |
46+
| 90000000422 | Unrecognised input data. (Unprocessable Content) |
47+
| 90000000500 | Internal server error |
48+
49+
See [app.py](app.py) for current examples.

sandbox/app.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,16 @@
3838
]
3939

4040
PATIENT_EXAMPLES = {
41-
"patient=0000000001": "example1",
42-
"patient=0000000002": "example2",
43-
"patient=0000000003": "code404",
41+
"patient=50000000001": "example_50000000001",
42+
"patient=50000000002": "example_50000000002",
43+
"patient=50000000003": "example_50000000003",
44+
"patient=50000000004": "example_50000000004",
45+
"patient=50000000005": "example_50000000005",
46+
"patient=50000000006": "example_50000000006",
47+
"patient=90000000400": "code400",
48+
"patient=90000000404": "code404",
49+
"patient=90000000422": "code422",
50+
"patient=90000000500": "code500",
4451
}
4552

4653

0 commit comments

Comments
 (0)