generated from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
[GPCAPIM-287] Orange box #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Vox-Ben
wants to merge
25
commits into
main
Choose a base branch
from
feature/GPCAPIM-287-orange_box
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6aa445d
Add pyjwt, clinical_jwt, make ruff happy
Vox-Ben 0193f8d
Review comments
Vox-Ben 00721cc
Make ruff happy, refactor controller JWT test
Vox-Ben ed4a788
Start of orange box connection
Vox-Ben f60a679
Orange box working with debug script
Vox-Ben b3da866
Orange box connection working
Vox-Ben 95c0ec1
Pass $STUB_PROVIDER
Vox-Ben 932fec3
Pass STUB env vars
Vox-Ben 1515f7f
Create call script
Vox-Ben 1ebab25
Fix algorithm string none
Vox-Ben f2bf4ec
Tidy up error handling
Vox-Ben 9470f2e
Add request validation to provider stub
Vox-Ben 9d8fd47
Fix rebase mess and tidy up
Vox-Ben 3c196a0
Update TODO comment
Vox-Ben 373db76
Improve test coverage
Vox-Ben 49467f4
Fix JWT default times and encoding value
Vox-Ben a6cc0cf
Move FHIR constants to single enum
Vox-Ben 6c58250
Remove now-duplicate scripts dir
Vox-Ben 96503c9
Change PROVIDER_STRING variable name
Vox-Ben 36c7a1a
Why is Ruff complaining about this now and not six weeks ago?
Vox-Ben d181334
Review comments
Vox-Ben c56c3d1
Put Any type back in
Vox-Ben c9fbb77
Fix Trivy error
Vox-Ben c28f8fb
Copilot review None check
Vox-Ben e8ccff7
Add certs, remove run script
Vox-Ben File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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,15 @@ | ||
| from enum import StrEnum | ||
|
|
||
|
|
||
| class FHIRSystem(StrEnum): | ||
| """ | ||
| Enum for FHIR identifier systems used in the clinical data gateway. | ||
| """ | ||
|
|
||
| NHS_NUMBER = "https://fhir.nhs.uk/Id/nhs-number" | ||
| ODS_CODE = "https://fhir.nhs.uk/Id/ods-organization-code" | ||
| SDS_USER_ID = "https://fhir.nhs.uk/Id/sds-user-id" | ||
| SDS_ROLE_PROFILE_ID = "https://fhir.nhs.uk/Id/sds-role-profile-id" | ||
| NHS_SERVICE_INTERACTION_ID = "https://fhir.nhs.uk/Id/nhsServiceInteractionId" | ||
| NHS_MHS_PARTY_KEY = "https://fhir.nhs.uk/Id/nhsMhsPartyKey" | ||
| NHS_SPINE_ASID = "https://fhir.nhs.uk/Id/nhsSpineASID" |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| from .device import Device | ||
| from .jwt import JWT | ||
| from .organization import Organization | ||
| from .practitioner import Practitioner | ||
| from .validator import JWTValidator | ||
|
|
||
| __all__ = ["JWT", "Device", "Practitioner"] | ||
| __all__ = ["JWT", "Device", "Organization", "Practitioner", "JWTValidator"] |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,25 @@ | ||
| from dataclasses import dataclass | ||
| from typing import Any | ||
|
|
||
| from fhir.constants import FHIRSystem | ||
|
|
||
|
|
||
| @dataclass(frozen=True, kw_only=True) | ||
| class Organization: | ||
| ods_code: str | ||
| name: str | ||
|
|
||
| def to_dict(self) -> dict[str, Any]: | ||
| """ | ||
| Return the Organization as a dictionary suitable for JWT payload. | ||
| """ | ||
| return { | ||
| "resourceType": "Organization", | ||
| "identifier": [ | ||
| { | ||
| "system": FHIRSystem.ODS_CODE, | ||
| "value": self.ods_code, | ||
| } | ||
| ], | ||
| "name": self.name, | ||
| } |
This file contains hidden or 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
Empty file.
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.