Skip to content

Commit 83b9b1e

Browse files
committed
Update for review comments
1 parent 5c5a061 commit 83b9b1e

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ sequenceDiagram
4646
**Key NHS services used:**
4747

4848
| Service | Purpose |
49-
|---|---|
49+
| --- | --- |
5050
| [PDS FHIR API](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir) | Looks up the patient's registered GP practice code |
5151
| [SDS FHIR API](https://digital.nhs.uk/developer/api-catalogue/spine-directory-service-fhir) | Resolves provider/consumer endpoint details and ASID values |
5252
| GP Provider System | The patient's GP system that returns the clinical record |
5353

5454
## Tech Stack
5555

5656
| Component | Technology |
57-
|---|---|
57+
| --- | --- |
5858
| Language | Python 3.14+ |
5959
| Web framework | [Flask](https://flask.palletsprojects.com/) |
6060
| Dependency management | [Poetry](https://python-poetry.org/) |
@@ -126,7 +126,7 @@ This project depends on the [clinical-data-common](https://github.com/NHSDigital
126126
The project uses `make` targets to build, deploy, and manage the application. Run these from the repository root:
127127

128128
| Command | Description |
129-
|---|---|
129+
| --- | --- |
130130
| `make dependencies` | Install all project dependencies via Poetry |
131131
| `make build` | Type-check, package, and build the Docker image |
132132
| `make deploy` | Build and start the Gateway API container at `localhost:5000` |
@@ -138,7 +138,7 @@ The project uses `make` targets to build, deploy, and manage the application. Ru
138138
Once deployed, the API exposes:
139139

140140
| Method | Path | Description |
141-
|---|---|---|
141+
| --- | --- | --- |
142142
| `POST` | `/patient/$gpc.getstructuredrecord` | Retrieve a patient's structured clinical record |
143143
| `GET` | `/health` | Health check endpoint |
144144

@@ -147,14 +147,15 @@ The full API schema is defined in [gateway-api/openapi.yaml](gateway-api/openapi
147147
### Environment Variables
148148

149149
| Variable | Description |
150-
|---|---|
150+
| --- | --- |
151151
| `BASE_URL` | Protocol, hostname and port for the running API (e.g. `http://localhost:5000`, or `http://gateway-api:8080` from within the devcontainer) |
152152
| `HOST` | hostname portion of `BASE_URL` |
153153
| `FLASK_HOST` | Host the Flask app binds to |
154154
| `FLASK_PORT` | Port the Flask app listens on |
155155
| `STUB_PDS` | `true`, use the stubs/stubs/pds/stub.py to return stubbed responses for PDS FHIR API; otherwise, not. |
156156
| `STUB_SDS` | `true`, use the stubs/stubs/sds/stub.py to return stubbed responses for SDS FHIR API; otherwise, not. |
157157
| `STUB_PROVIDER` | `true`, use the stubs/stubs/provider/stub.py to return stubbed responses for the provider system; otherwise, not. |
158+
| `CDG_DEBUG` | `true`, Return additional debug information when the call to the GP provider returns an error. Note if set true causes the unit tests to fail, because expected return values are changed. |
158159

159160
Environment variables also control whether stubs are used in place of the real PDS, SDS, and Provider services during local development.
160161

@@ -163,7 +164,7 @@ Environment variables also control whether stubs are used in place of the real P
163164
The project has five test suites, each targeting a different layer of confidence. The API container must be running for all suites except unit tests.
164165

165166
| Command | Suite | Framework | Description |
166-
|---|---|---|---|
167+
| --- | --- | --- | --- |
167168
| `make test-unit` | Unit | pytest | Tests individual modules in isolation |
168169
| `make test-acceptance` | Acceptance | pytest-bdd | BDD tests using Gherkin feature files |
169170
| `make test-integration` | Integration | pytest | HTTP-level tests against the running API |
@@ -188,7 +189,7 @@ Significant design decisions are documented as Architecture Decision Records (AD
188189
The project uses GitHub Actions for continuous integration and deployment, organised into reusable stages:
189190

190191
| Workflow | Trigger | Purpose |
191-
|---|---|---|
192+
| --- | --- | --- |
192193
| [Pull Request](.github/workflows/cicd-1-pull-request.yaml) | PR opened/reopened | Runs commit checks, tests, build, and acceptance |
193194
| [Publish](.github/workflows/cicd-2-publish.yaml) | PR merged to main | Creates a release and tags the artefact |
194195
| [Deploy](.github/workflows/cicd-3-deploy.yaml) | Manual dispatch | Deploys a selected tag to an environment |

gateway-api/src/gateway_api/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def get_jwt_for_provider(self, provider_endpoint: str, consumer_ods: str) -> JWT
109109
version="1.5.0",
110110
)
111111

112-
# TODO: Get practitioner details from consumer, somehow?
112+
# TODO: Get practitioner details from consumer pending outcome of GPCAPIM-286?
113113
requesting_practitioner = Practitioner(
114114
id="10019",
115115
sds_userid="111222333444",

0 commit comments

Comments
 (0)