Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ make spec
make up
```

This will start the sandbox environment on localhost port 5000.
This will start the sandbox environment on localhost port 9000.

```bash
make down
Expand All @@ -25,10 +25,25 @@ This will stop the sandbox environment.

### Example curl calls

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

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

See [app.py](app.py) for more examples.
#### Example scenarios

| Patient ID | Response |
|--------------|--------------------------------------------------|
| 50000000001 | RSV - Actionable CP Booking |
| 50000000002 | RSV - Actionable Non-CP Booking |
| 50000000003 | RSV - Eligible, not Actionable |
| 50000000004 | RSV - Not Eligible due to vaccination |
| 50000000005 | RSV - Not Eligible due to not being in a cohort |
| 50000000006 | RSV - No rules |
| 90000000400 | Invalid input data |
| 90000000404 | Person not found |
| 90000000422 | Unrecognised input data. (Unprocessable Content) |
| 90000000500 | Internal server error |

See [app.py](app.py) for current examples.
13 changes: 10 additions & 3 deletions sandbox/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,16 @@
]

PATIENT_EXAMPLES = {
"patient=0000000001": "example1",
"patient=0000000002": "example2",
"patient=0000000003": "code404",
"patient=50000000001": "example_50000000001",
"patient=50000000002": "example_50000000002",
"patient=50000000003": "example_50000000003",
"patient=50000000004": "example_50000000004",
"patient=50000000005": "example_50000000005",
"patient=50000000006": "example_50000000006",
"patient=90000000400": "code400",
"patient=90000000404": "code404",
"patient=90000000422": "code422",
"patient=90000000500": "code500",
}


Expand Down
Loading
Loading