Skip to content

Commit ec255e3

Browse files
authored
Merge branch 'master' into dependabot/pip/lambdas/ack_backend/pip-minor-patch-cbc0fec503
2 parents 68f4267 + 1040b3c commit ec255e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2936
-2870
lines changed

config/dev/permissions_config.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,7 @@
2727
},
2828
{
2929
"supplier": "MAVIS",
30-
"permissions": [
31-
"3IN1.CRUDS",
32-
"FLU.CRUDS",
33-
"HPV.CRUDS",
34-
"MENACWY.CRUDS",
35-
"MMR.CRUDS"
36-
],
30+
"permissions": ["FLU.CRUDS", "HPV.CUD"],
3731
"ods_codes": ["V0V8L"]
3832
},
3933
{
@@ -56,8 +50,8 @@
5650
"MENACWY.CRUDS",
5751
"MMR.CRUDS",
5852
"MMRV.CRUDS",
59-
"PNEUMOCOCCAL.CRUDS",
6053
"PERTUSSIS.CRUDS",
54+
"PNEUMOCOCCAL.CRUDS",
6155
"RSV.CRUDS",
6256
"SHINGLES.CRUDS"
6357
],
@@ -73,8 +67,8 @@
7367
"MENACWY.CRUDS",
7468
"MMR.CRUDS",
7569
"MMRV.CRUDS",
76-
"PNEUMOCOCCAL.CRUDS",
7770
"PERTUSSIS.CRUDS",
71+
"PNEUMOCOCCAL.CRUDS",
7872
"RSV.CRUDS",
7973
"SHINGLES.CRUDS"
8074
],
@@ -84,12 +78,14 @@
8478
"supplier": "TPP",
8579
"permissions": [
8680
"3IN1.CRUDS",
81+
"COVID.CRUDS",
82+
"FLU.CRUDS",
8783
"HPV.CRUDS",
8884
"MENACWY.CRUDS",
8985
"MMR.CRUDS",
9086
"MMRV.CRUDS",
91-
"PNEUMOCOCCAL.CRUDS",
9287
"PERTUSSIS.CRUDS",
88+
"PNEUMOCOCCAL.CRUDS",
9389
"RSV.CRUDS",
9490
"SHINGLES.CRUDS"
9591
],
@@ -99,10 +95,16 @@
9995
"supplier": "MEDICUS",
10096
"permissions": [
10197
"3IN1.CRUDS",
98+
"COVID.CRUDS",
99+
"FLU.CRUDS",
102100
"HPV.CRUDS",
103101
"MENACWY.CRUDS",
104102
"MMR.CRUDS",
105-
"RSV.CRUDS"
103+
"MMRV.CRUDS",
104+
"PERTUSSIS.CRUDS",
105+
"PNEUMOCOCCAL.CRUDS",
106+
"RSV.CRUDS",
107+
"SHINGLES.CRUDS"
106108
],
107109
"ods_codes": ["YGMYW"]
108110
},
@@ -164,8 +166,8 @@
164166
"MENACWY.CRUDS",
165167
"MMR.CRUDS",
166168
"MMRV.CRUDS",
167-
"PNEUMOCOCCAL.CRUDS",
168169
"PERTUSSIS.CRUDS",
170+
"PNEUMOCOCCAL.CRUDS",
169171
"RSV.CRUDS",
170172
"SHINGLES.CRUDS"
171173
]
@@ -180,8 +182,8 @@
180182
"MENACWY.CRUDS",
181183
"MMR.CRUDS",
182184
"MMRV.CRUDS",
183-
"PNEUMOCOCCAL.CRUDS",
184185
"PERTUSSIS.CRUDS",
186+
"PNEUMOCOCCAL.CRUDS",
185187
"RSV.CRUDS",
186188
"SHINGLES.CRUDS"
187189
]

config/preprod/permissions_config.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"MENACWY.CRUDS",
4747
"MMR.CRUDS",
4848
"MMRV.CRUDS",
49-
"PNEUMOCOCCAL.CRUDS",
5049
"PERTUSSIS.CRUDS",
50+
"PNEUMOCOCCAL.CRUDS",
5151
"RSV.CRUDS",
5252
"SHINGLES.CRUDS"
5353
],
@@ -63,8 +63,8 @@
6363
"MENACWY.CRUDS",
6464
"MMR.CRUDS",
6565
"MMRV.CRUDS",
66-
"PNEUMOCOCCAL.CRUDS",
6766
"PERTUSSIS.CRUDS",
67+
"PNEUMOCOCCAL.CRUDS",
6868
"RSV.CRUDS",
6969
"SHINGLES.CRUDS"
7070
],
@@ -74,12 +74,14 @@
7474
"supplier": "TPP",
7575
"permissions": [
7676
"3IN1.CRUDS",
77+
"COVID.CRUDS",
78+
"FLU.CRUDS",
7779
"HPV.CRUDS",
7880
"MENACWY.CRUDS",
7981
"MMR.CRUDS",
8082
"MMRV.CRUDS",
81-
"PNEUMOCOCCAL.CRUDS",
8283
"PERTUSSIS.CRUDS",
84+
"PNEUMOCOCCAL.CRUDS",
8385
"RSV.CRUDS",
8486
"SHINGLES.CRUDS"
8587
],
@@ -89,10 +91,16 @@
8991
"supplier": "MEDICUS",
9092
"permissions": [
9193
"3IN1.CRUDS",
94+
"COVID.CRUDS",
95+
"FLU.CRUDS",
9296
"HPV.CRUDS",
9397
"MENACWY.CRUDS",
9498
"MMR.CRUDS",
95-
"RSV.CRUDS"
99+
"MMRV.CRUDS",
100+
"PERTUSSIS.CRUDS",
101+
"PNEUMOCOCCAL.CRUDS",
102+
"RSV.CRUDS",
103+
"SHINGLES.CRUDS"
96104
],
97105
"ods_codes": ["YGMYW"]
98106
},
@@ -110,8 +118,8 @@
110118
"MENACWY.CRUDS",
111119
"MMR.CRUDS",
112120
"MMRV.CRUDS",
113-
"PNEUMOCOCCAL.CRUDS",
114121
"PERTUSSIS.CRUDS",
122+
"PNEUMOCOCCAL.CRUDS",
115123
"RSV.CRUDS",
116124
"SHINGLES.CRUDS"
117125
]
@@ -126,8 +134,8 @@
126134
"MENACWY.CRUDS",
127135
"MMR.CRUDS",
128136
"MMRV.CRUDS",
129-
"PNEUMOCOCCAL.CRUDS",
130137
"PERTUSSIS.CRUDS",
138+
"PNEUMOCOCCAL.CRUDS",
131139
"RSV.CRUDS",
132140
"SHINGLES.CRUDS"
133141
]

infrastructure/account/.terraform.lock.hcl

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/grafana/non-prod/terraform/.terraform.lock.hcl

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/instance/.terraform.lock.hcl

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/instance/file_name_processor.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ resource "aws_lambda_function" "file_processor_lambda" {
277277

278278
environment {
279279
variables = {
280+
ACCOUNT_ID = var.immunisation_account_id
280281
SOURCE_BUCKET_NAME = aws_s3_bucket.batch_data_source_bucket.bucket
281282
ACK_BUCKET_NAME = aws_s3_bucket.batch_data_destination_bucket.bucket
282283
QUEUE_URL = aws_sqs_queue.batch_file_created.url

infrastructure/instance/oas.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -128,28 +128,6 @@ paths:
128128
httpMethod: "POST"
129129
timeoutInMillis: 30000
130130
type: "AWS_PROXY"
131-
parameters:
132-
- name: patient.identifier
133-
in: query
134-
required: true
135-
schema:
136-
type: string
137-
- name: -immunization.target
138-
in: query
139-
schema:
140-
type: string
141-
- name: -date.from
142-
in: query
143-
schema:
144-
type: string
145-
- name: -date.to
146-
in: query
147-
schema:
148-
type: string
149-
- name: _include
150-
in: query
151-
schema:
152-
type: string
153131
responses:
154132
"201":
155133
description: An Immunisation search event

lambdas/backend/src/controller/aws_apig_event_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
from utils import dict_utils
1010

1111

12+
def get_multi_value_query_params(event: APIGatewayProxyEventV1) -> dict:
13+
return dict_utils.get_field(dict(event), "multiValueQueryStringParameters", default={})
14+
15+
1216
def get_path_parameter(event: APIGatewayProxyEventV1, param_name: str) -> str:
1317
return dict_utils.get_field(event["pathParameters"], param_name, default="")
1418

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
11
"""FHIR Controller constants"""
22

3+
from enum import StrEnum
4+
35
SUPPLIER_SYSTEM_HEADER_NAME = "SupplierSystem"
46
E_TAG_HEADER_NAME = "E-Tag"
7+
8+
SEARCH_IMMS_POST_PATH = "/Immunization/_search"
9+
10+
11+
class IdentifierSearchParameterName(StrEnum):
12+
IDENTIFIER = "identifier"
13+
ELEMENTS = "_elements"
14+
15+
16+
class ImmunizationSearchParameterName(StrEnum):
17+
PATIENT_IDENTIFIER = "patient.identifier"
18+
IMMUNIZATION_TARGET = "-immunization.target"
19+
DATE_FROM = "-date.from"
20+
DATE_TO = "-date.to"
21+
INCLUDE = "_include"
22+
23+
24+
class IdentifierSearchElement(StrEnum):
25+
"""Valid elements which can be requested to include in the identifier search response"""
26+
27+
ID = "id"
28+
META = "meta"
29+
30+
31+
IMMUNIZATION_TARGET_LEGACY_KEY_NAME = "immunization.target"

lambdas/backend/src/controller/fhir_api_exception_handler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
InvalidJsonError,
2222
InvalidResourceVersionError,
2323
InvalidStoredDataError,
24+
ParameterExceptionError,
2425
ResourceVersionNotProvidedError,
2526
Severity,
27+
TooManyResultsError,
2628
UnauthorizedError,
2729
UnauthorizedVaxError,
2830
UnhandledResponseError,
@@ -38,6 +40,8 @@
3840
InvalidResourceVersionError: 400,
3941
CustomValidationError: 400,
4042
ResourceVersionNotProvidedError: 400,
43+
ParameterExceptionError: 400,
44+
TooManyResultsError: 400,
4145
UnauthorizedError: 403,
4246
UnauthorizedVaxError: 403,
4347
ResourceNotFoundError: 404,

0 commit comments

Comments
 (0)