Skip to content

Commit 24caab8

Browse files
committed
Merge branch 'master' into VED-357-terraform-folder-changes-only
2 parents 24feded + 41be795 commit 24caab8

35 files changed

+677
-499
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
id: filenameprocessor
4141
continue-on-error: true
4242
run: |
43-
poetry env use 3.10
43+
poetry env use 3.11
4444
poetry install
4545
poetry run coverage run -m unittest discover || echo "filenameprocessor tests failed" >> ../failed_tests.txt
4646
poetry run coverage xml -o ../filenameprocessor-coverage.xml
@@ -50,7 +50,7 @@ jobs:
5050
id: recordprocessor
5151
continue-on-error: true
5252
run: |
53-
poetry env use 3.10
53+
poetry env use 3.11
5454
poetry install
5555
poetry run coverage run -m unittest discover || echo "recordprocessor tests failed" >> ../failed_tests.txt
5656
poetry run coverage xml -o ../recordprocessor-coverage.xml

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,17 @@ Once connected, you should see the path as something similar to: `/mnt/d/Source/
108108
109109
5. Configure pyenv.
110110
```
111-
pyenv install --list | grep "3.10"
112-
pyenv install 3.10.16 #current latest
111+
pyenv install --list | grep "3.11"
112+
pyenv install 3.11.13 #current latest
113113
```
114114
115-
6. Install poetry
115+
6. Install direnv if not already present, and hook it to the shell.
116+
```
117+
sudo apt-get update && sudo apt-get install direnv
118+
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
119+
```
120+
121+
7. Install poetry
116122
```
117123
pip install poetry
118124
```
@@ -125,8 +131,9 @@ For detailed instructions on running individual Lambdas, refer to the README.md
125131
Steps:
126132
1. Set the python version in the folder with the code used by lambda for example `./backend` (see [lambdas](#lambdas)) folder.
127133
```
128-
pyenv local 3.10.16 # Set version in backend (this creates a .python-version file)
134+
pyenv local 3.11.13 # Set version in backend (this creates a .python-version file)
129135
```
136+
Note: consult the lambda's `pyproject.toml` file to get the required Python version for this lambda. At the time of writing, this is `~3.10` for the batch lambdas and `~3.11` for all the others.
130137
131138
2. Configure poetry
132139
```
@@ -203,4 +210,13 @@ The root (`immunisation-fhir-api`) should point to `/mnt/d/Source/immunisation-f
203210
## Verified commits
204211
Please note that this project requires that all commits are verified using a GPG key.
205212
To set up a GPG key please follow the instructions specified here:
206-
https://docs.github.com/en/authentication/managing-commit-signature-verification
213+
https://docs.github.com/en/authentication/managing-commit-signature-verification
214+
215+
216+
## AWS configuration: Getting credentials for AWS federated user account
217+
218+
In the 'Access keys' popup menu under AWS Access Portal:
219+
220+
**NOTE** that AWS's 'Recommended' method of getting credentials **(AWS IAM Identity Center credentials)** will break mocking in unit tests; specifically any tests calling `dynamodb_client.create_table()` will fail with `botocore.errorfactory.ResourceInUseException: Table already exists`.
221+
222+
Instead, use **Option 2 (Add a profile to your AWS credentials file)**.

config/common/disease_mapping.json

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
[
2+
{
3+
"vacc_type": "COVID19",
4+
"diseases": [
5+
{
6+
"code": "840539006",
7+
"term": "Disease caused by severe acute respiratory syndrome coronavirus 2"
8+
}
9+
]
10+
},
11+
{
12+
"vacc_type": "FLU",
13+
"diseases": [
14+
{
15+
"code": "6142004",
16+
"term": "Influenza caused by seasonal influenza virus (disorder)"
17+
}
18+
]
19+
},
20+
{
21+
"vacc_type": "HPV",
22+
"diseases": [
23+
{
24+
"code": "240532009",
25+
"term": "Human papillomavirus infection"
26+
}
27+
]
28+
},
29+
{
30+
"vacc_type": "MMR",
31+
"diseases": [
32+
{
33+
"code": "14189004",
34+
"term": "Measles (disorder)"
35+
},
36+
{
37+
"code": "36989005",
38+
"term": "Mumps (disorder)"
39+
},
40+
{
41+
"code": "36653000",
42+
"term": "Rubella (disorder)"
43+
}
44+
]
45+
},
46+
{
47+
"vacc_type": "MMRV",
48+
"diseases": [
49+
{
50+
"code": "14189004",
51+
"term": "Measles (disorder)"
52+
},
53+
{
54+
"code": "36989005",
55+
"term": "Mumps (disorder)"
56+
},
57+
{
58+
"code": "36653000",
59+
"term": "Rubella (disorder)"
60+
},
61+
{
62+
"code": "38907003",
63+
"term": "Varicella (disorder)"
64+
}
65+
]
66+
},
67+
{
68+
"vacc_type": "RSV",
69+
"diseases": [
70+
{
71+
"code": "55735004",
72+
"term": "Respiratory syncytial virus infection (disorder)"
73+
}
74+
]
75+
},
76+
{
77+
"vacc_type": "PERTUSSIS",
78+
"diseases": [
79+
{
80+
"code": "27836007",
81+
"term": "Pertussis (disorder)"
82+
}
83+
]
84+
},
85+
{
86+
"vacc_type": "SHINGLES",
87+
"diseases": [
88+
{
89+
"code": "4740000",
90+
"term": "Herpes zoster"
91+
}
92+
]
93+
},
94+
{
95+
"vacc_type": "PCV13",
96+
"diseases": [
97+
{
98+
"code": "16814004",
99+
"term": "Pneumococcal infectious disease"
100+
}
101+
]
102+
},
103+
{
104+
"vacc_type": "3in1",
105+
"diseases": [
106+
{
107+
"code": "398102009",
108+
"term": "Acute poliomyelitis"
109+
},
110+
{
111+
"code": "397430003",
112+
"term": "Diphtheria caused by Corynebacterium diphtheriae"
113+
},
114+
{
115+
"code": "76902006",
116+
"term": "Tetanus (disorder)"
117+
}
118+
]
119+
},
120+
{
121+
"vacc_type": "MENACWY",
122+
"diseases": [
123+
{
124+
"code": "23511006",
125+
"term": "Meningococcal infectious disease"
126+
}
127+
]
128+
}
129+
]

config/dev/permissions_config.json

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
[
2+
{
3+
"supplier": "DPSFULL",
4+
"permissions": [
5+
"COVID19.CRUDS",
6+
"FLU.CRUDS",
7+
"MMR.CRUDS",
8+
"RSV.CRUDS"
9+
]
10+
},
11+
{
12+
"supplier": "DPSREDUCED",
13+
"permissions": [
14+
"COVID19.CRUD",
15+
"FLU.CRUD",
16+
"MMR.CRUD",
17+
"RSV.CRUD"
18+
]
19+
},
20+
{
21+
"supplier": "MAVIS",
22+
"permissions": [
23+
"HPV.CRUDS",
24+
"3IN1.CRUDS",
25+
"MENACWY.CRUDS",
26+
"MMR.CRUDS",
27+
"FLU.CRUDS"
28+
]
29+
},
30+
{
31+
"supplier": "EMIS",
32+
"permissions": [
33+
"RSV.U"
34+
]
35+
},
36+
{
37+
"supplier": "PINNACLE",
38+
"permissions": []
39+
},
40+
{
41+
"supplier": "SONAR",
42+
"permissions": [
43+
"FLU.CD"
44+
]
45+
},
46+
{
47+
"supplier": "TPP",
48+
"permissions": []
49+
},
50+
{
51+
"supplier": "AGEM-NIVS",
52+
"permissions": []
53+
},
54+
{
55+
"supplier": "NIMS",
56+
"permissions": []
57+
},
58+
{
59+
"supplier": "EVA",
60+
"permissions": [
61+
"COVID19.CUD"
62+
]
63+
},
64+
{
65+
"supplier": "RAVS",
66+
"permissions": [
67+
"RSV.CRUDS"
68+
]
69+
},
70+
{
71+
"supplier": "AGEM-RAVS-Integration",
72+
"permissions": [
73+
"RSV.CRUDS"
74+
]
75+
},
76+
{
77+
"supplier": "MEDICAL_DIRECTOR",
78+
"permissions": []
79+
},
80+
{
81+
"supplier": "COVID19_VACCINE_RESOLUTION_SERVICEDESK",
82+
"permissions": []
83+
},
84+
{
85+
"supplier": "Test_App",
86+
"permissions": [
87+
"COVID19.CRUDS",
88+
"FLU.CRUDS",
89+
"MMR.CRUDS",
90+
"RSV.CRUDS",
91+
"HPV.CRUDS",
92+
"MENACWY.CRUDS",
93+
"PERTUSSIS.CRUDS",
94+
"3IN1.CRUDS"
95+
]
96+
},
97+
{
98+
"supplier": "Postman_Auth",
99+
"permissions": [
100+
"COVID19.CRUDS",
101+
"FLU.CRUDS",
102+
"MMR.CRUDS",
103+
"RSV.CRUDS",
104+
"HPV.CRUDS",
105+
"MENACWY.CRUDS",
106+
"PERTUSSIS.CRUDS",
107+
"3IN1.CRUDS"
108+
]
109+
}
110+
]
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[
2+
{
3+
"supplier": "DPSFULL",
4+
"permissions": [
5+
"COVID19.CRUDS",
6+
"FLU.CRUDS",
7+
"MMR.CRUDS",
8+
"RSV.CRUDS"
9+
]
10+
},
11+
{
12+
"supplier": "DPSREDUCED",
13+
"permissions": [
14+
"COVID19.CRUDS",
15+
"FLU.CRUDS",
16+
"MMR.CRUDS",
17+
"RSV.CRUDS"
18+
]
19+
},
20+
{
21+
"supplier": "MAVIS",
22+
"permissions": [
23+
"HPV.CRUDS",
24+
"3IN1.CRUDS",
25+
"MENACWY.CRUDS",
26+
"MMR.CRUDS",
27+
"FLU.CRUDS"
28+
]
29+
},
30+
{
31+
"supplier": "RAVS",
32+
"permissions": [
33+
"RSV.CRUDS"
34+
]
35+
},
36+
{
37+
"supplier": "Test_App",
38+
"permissions": [
39+
"COVID19.CRUDS",
40+
"FLU.CRUDS",
41+
"MMR.CRUDS",
42+
"RSV.CRUDS",
43+
"HPV.CRUDS",
44+
"MENACWY.CRUDS",
45+
"PERTUSSIS.CRUDS",
46+
"3IN1.CRUDS"
47+
]
48+
},
49+
{
50+
"supplier": "Postman_Auth",
51+
"permissions": [
52+
"COVID19.CRUDS",
53+
"FLU.CRUDS",
54+
"MMR.CRUDS",
55+
"RSV.CRUDS",
56+
"HPV.CRUDS",
57+
"MENACWY.CRUDS",
58+
"PERTUSSIS.CRUDS",
59+
"3IN1.CRUDS"
60+
]
61+
}
62+
]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{
3+
"supplier": "DPSFULL",
4+
"permissions": [
5+
"RSV.CRUDS"
6+
]
7+
},
8+
{
9+
"supplier": "DPSREDUCED",
10+
"permissions": [
11+
"RSV.CRUDS"
12+
]
13+
},
14+
{
15+
"supplier": "RAVS",
16+
"permissions": [
17+
"RSV.RS"
18+
]
19+
}
20+
]

filenameprocessor/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/lambda/python:3.10 AS base
1+
FROM public.ecr.aws/lambda/python:3.11 AS base
22

33
# Create non-root user
44
RUN mkdir -p /home/appuser && \

0 commit comments

Comments
 (0)