Skip to content
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

DSARM-8814 DPS CORE REQUEST - To Update of public facing Immunisation… #193

Merged
merged 1 commit into from
Oct 5, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ smoketest: pytest-guards
poetry run pytest -v --junitxml=smoketest-report.xml -s -m smoketest

e2etest: pytest-guards
poetry run pytest -v --junitxml=e2e-report.xml -s -m e2e
poetry run pytest -v --junitxml=e2e-report.xml -s -m e2e --api-name=$$API_NAME --proxy-name=$$PROXY_NAME
7 changes: 5 additions & 2 deletions azure/components/run-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
steps:
steps:
- bash: |
export RELEASE_RELEASEID=$(Build.BuildId)
export SOURCE_COMMIT_ID=$(Build.SourceVersion)
Expand All @@ -11,6 +11,9 @@ steps:
export JWT_PRIVATE_KEY_ABSOLUTE_PATH="$(Pipeline.Workspace)/secrets/$(JWT_TESTING_PRIVATE_KEY)"
export ID_TOKEN_NHS_LOGIN_PRIVATE_KEY_ABSOLUTE_PATH="$(Pipeline.Workspace)/secrets/$(ID_TOKEN_NHS_LOGIN_PRIVATE_KEY)"
export APIGEE_API_TOKEN="$(secret.AccessToken)"
export PROXY_NAME="$(FULLY_QUALIFIED_SERVICE_NAME)"
export API_NAME="$(SERVICE_NAME)"
export APIGEE_ACCESS_TOKEN="$(secret.AccessToken)"
make e2etest
workingDirectory: $(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)
displayName: run e2e tests
Expand All @@ -20,4 +23,4 @@ steps:
condition: always()
inputs:
testResultsFiles: '$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/e2e-report.xml'
failTaskOnFailedTests: true
failTaskOnFailedTests: true
36 changes: 18 additions & 18 deletions azure/components/run-smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
steps:
- bash: |
export RELEASE_RELEASEID=$(Build.BuildId)
export SOURCE_COMMIT_ID=$(Build.SourceVersion)
export APIGEE_ENVIRONMENT="$(ENVIRONMENT)"
export SERVICE_BASE_PATH="$(SERVICE_BASE_PATH)"
export STATUS_ENDPOINT_API_KEY="$(status-endpoint-api-key)"
export APIGEE_PRODUCT="$(FULLY_QUALIFIED_SERVICE_NAME)"
export OAUTH_PROXY="oauth2"
export OAUTH_BASE_URI="https://$(ENVIRONMENT).api.service.nhs.uk"
make smoketest
workingDirectory: $(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)
displayName: run smoketests
- bash: |
export RELEASE_RELEASEID=$(Build.BuildId)
export SOURCE_COMMIT_ID=$(Build.SourceVersion)
export APIGEE_ENVIRONMENT="$(ENVIRONMENT)"
export SERVICE_BASE_PATH="$(SERVICE_BASE_PATH)"
export STATUS_ENDPOINT_API_KEY="$(status-endpoint-api-key)"
export APIGEE_PRODUCT="$(FULLY_QUALIFIED_SERVICE_NAME)"
export OAUTH_PROXY="oauth2-mock"
export OAUTH_BASE_URI="https://$(ENVIRONMENT).api.service.nhs.uk"
make smoketest
workingDirectory: $(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)
displayName: run smoketests

- task: PublishTestResults@2
displayName: 'Publish smoketest results'
condition: always()
inputs:
testResultsFiles: '$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/smoketest-report.xml'
failTaskOnFailedTests: true
- task: PublishTestResults@2
displayName: 'Publish smoketest results'
condition: always()
inputs:
testResultsFiles: '$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/smoketest-report.xml'
failTaskOnFailedTests: true
6 changes: 5 additions & 1 deletion manifest_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DESCRIPTION: Immunisation history API
APIGEE_ENVIRONMENTS:
- name: internal-dev
display_name: Internal Development
has_mock_auth: true
- name: internal-dev-sandbox
display_name: Internal Development Sandbox
- name: internal-qa
Expand Down Expand Up @@ -71,6 +72,9 @@ apigee:
proxies:
- immunisation-history-{{ ENV.name }}
- identity-service-{{ ENV.name }}
{% if ENV.has_mock_auth | default(false) %}
- identity-service-mock-{{ ENV.name }}
{% endif %}
scopes: {{ MODE.scopes }}
quota: {{ ENV.quota | default('300') }}
quotaInterval: '1'
Expand All @@ -89,4 +93,4 @@ apigee:
visibility: true
specId: immunisation-history-{{ ENV.name }}
{% endfor %}
{% endfor %}
{% endfor %}
1,663 changes: 611 additions & 1,052 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ python = "^3.8"


[tool.poetry.dev-dependencies]
pytest = "^6.1.2"
pytest = "^6.2.5"
coverage = "^5.5"
aiohttp = "^3.7.3"
pytest-asyncio = "^0.14.0"
api-test-utils = {url = "https://github.com/NHSDigital/apim-test-utils/releases/download/v1.1.35-alpha/api_test_utils-1.1.35a0-py3-none-any.whl"}
flake8 = "^3.7.9"
pip-licenses = "^3.3.1"
jinja2 = "^2.11.1"
Expand All @@ -31,10 +30,10 @@ docopt = "^0.6.2"
jsonpath-rw = "^1.4.0"
semver = "^2.9.0"
gitpython = "^3.1.30"
requests = "^2.27.1"
requests = "^2.31.0"
sh = "^1.14.3"
fire = "^0.4.0"
pytest-nhsd-apim = "^2.0.6"
pytest-nhsd-apim = "^3.3.9"
behave = "^1.2.6"

[tool.poetry.scripts]
47 changes: 21 additions & 26 deletions specification/components/examples/Immunization.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
"fullUrl": "urn:uuid:d11c69d8-7a50-4a54-a848-7648121e995f",
"resource": {
"id": "90640007.747583-127",
"resourceType": "Immunization",
"extension": [
{
Expand All @@ -29,15 +30,6 @@
}
],
"status": "completed",
"statusReason": [
{
"coding": [
{
"system": "http://snomed.info/sct"
}
]
}
],
"vaccineCode": {
"coding": [
{
Expand All @@ -55,8 +47,8 @@
"value": "9000000009"
}
},
"occurrenceDateTime": "2020-12-10T13:00:08.476+00:00",
"recorded": "2020-12-10",
"occurrenceDateTime": "2020-12-10T13:00:08.476Z",
"recorded": "2020-12-10T00:00:00.000Z",
"primarySource": true,
"manufacturer": {
"display": "AstraZeneca Ltd"
Expand Down Expand Up @@ -87,7 +79,6 @@
"unit": "pre-filled disposable injection",
"code": "3318611000001103"
},
"reportOrigin": {},
"performer": [
{
"actor": {
Expand Down Expand Up @@ -115,7 +106,13 @@
{
"doseNumberPositiveInt": 1
}
]
],
"location": {
"identifier": {
"system": "urn:iso:std:iso:3166",
"value": "GB"
}
}
},
"search": {
"mode": "match"
Expand All @@ -124,6 +121,7 @@
{
"fullUrl": "urn:uuid:8da02505-db94-40b6-a8ed-d5af5628e28c",
"resource": {
"id": "90640007.747583-128",
"resourceType": "Immunization",
"extension": [
{
Expand All @@ -147,15 +145,6 @@
}
],
"status": "completed",
"statusReason": [
{
"coding": [
{
"system": "http://snomed.info/sct"
}
]
}
],
"vaccineCode": {
"coding": [
{
Expand All @@ -173,8 +162,8 @@
"value": "9000000009"
}
},
"occurrenceDateTime": "2020-12-31T13:00:08.476+00:00",
"recorded": "2020-12-31",
"occurrenceDateTime": "2020-12-31T13:00:08.476Z",
"recorded": "2020-12-31T00:00:00.000Z",
"primarySource": true,
"manufacturer": {
"display": "AstraZeneca Ltd"
Expand Down Expand Up @@ -205,7 +194,6 @@
"unit": "pre-filled disposable injection",
"code": "3318611000001103"
},
"reportOrigin": {},
"performer": [
{
"actor": {
Expand Down Expand Up @@ -233,7 +221,13 @@
{
"doseNumberPositiveInt": 1
}
]
],
"location": {
"identifier": {
"system": "urn:iso:std:iso:3166",
"value": "GB"
}
}
},
"search": {
"mode": "match"
Expand All @@ -242,6 +236,7 @@
{
"fullUrl": "urn:uuid:124fcb63-669c-4a3c-af2b-caf55de167ec",
"resource": {
"id": "9000000009",
"resourceType": "Patient",
"identifier": [
{
Expand Down
3 changes: 1 addition & 2 deletions specification/components/schemas/Immunization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,13 @@ properties:
description: The quantity of vaccine product that was administered.
type: object
required:
- value
- unit
- system
- code
properties:
value:
description: Number of units administered.
type: integer
type: number
example: 1
unit:
description: Description of unit.
Expand Down
2 changes: 1 addition & 1 deletion specification/immunisation-history.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ paths:
Optional header to select the version of the api. Version number will follow semver.
schema:
type: string
example: version=1.0
example: version=1.0, version=2.0
responses:
'200':
description: |
Expand Down