Skip to content

Commit 31ff6d9

Browse files
committed
fix schema file
1 parent 057c0ee commit 31ff6d9

File tree

2 files changed

+190
-1
lines changed

2 files changed

+190
-1
lines changed
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"id": "01K5EGR0C85TPNZT71MJ10VKYY",
3+
"schemaName": "Base Vaccination Validation",
4+
"version": 1.0,
5+
"releaseDate": "2024-07-17T00:00:00.000Z",
6+
"expressions": [
7+
{
8+
"expressionId": "01K5EGR0C7Y1WJ0BC803SQDWK4",
9+
"fieldNameFHIR": "contained|#:Patient|identifier|#:https://fhir.nhs.uk/Id/nhs-number|value",
10+
"fieldNameFlat": "NHS_NUMBER",
11+
"errorLevel": 0,
12+
"expression": {
13+
"expressionName": "NHS Number Not Empty Check",
14+
"expressionType": "NOTEMPTY",
15+
"expressionRule": ""
16+
},
17+
"errorGroup": "validity"
18+
},
19+
{
20+
"expressionId": "01K5EGR0C7QCEJMWH1R4MBPGQA",
21+
"fieldNameFHIR": "contained|#:Patient|name|#:official|given|0",
22+
"fieldNameFlat": "PERSON_FORENAME",
23+
"errorLevel": 0,
24+
"expression": {
25+
"expressionName": "Person Forname Not Empty Check",
26+
"expressionType": "NOTEMPTY",
27+
"expressionRule": ""
28+
},
29+
"errorGroup": "completeness"
30+
},
31+
{
32+
"expressionId": "01K5EGR0C7RRG9F6FVHJ8HE4QX",
33+
"fieldNameFHIR": "contained|#:Patient|name|#:official|family",
34+
"fieldNameFlat": "PERSON_SURNAME",
35+
"errorLevel": 0,
36+
"parentExpression": "01K5EGR0C7Y1WJ0BC803SQDWK4",
37+
"expression": {
38+
"expressionName": "Person Surname Not Empty Check",
39+
"expressionType": "NOTEMPTY",
40+
"expressionRule": ""
41+
},
42+
"errorGroup": "completeness"
43+
},
44+
{
45+
"expressionId": "01K5EGR0C8WSJ9N8RV6T8RJJ4W",
46+
"fieldNameFHIR": "performer|#:Organization|actor|identifier|value",
47+
"fieldNameFlat": "SITE_CODE",
48+
"errorLevel": 1,
49+
"expression": {
50+
"expressionName": "Organisation Not Empty Check",
51+
"expressionType": "NOTEMPTY",
52+
"expressionRule": ""
53+
},
54+
"errorGroup": "completeness"
55+
},
56+
{
57+
"expressionId": "01K5EGR0C8M1MVNKTQCE6MSG68",
58+
"fieldNameFHIR": "performer|#:Organization|actor|identifier|value",
59+
"fieldNameFlat": "SITE_CODE",
60+
"errorLevel": 0,
61+
"expression": {
62+
"expressionName": "Organisation Look Up Check",
63+
"expressionType": "KEYCHECK",
64+
"expressionRule": "Organisation"
65+
},
66+
"errorGroup": "consistency"
67+
},
68+
{
69+
"expressionId": "01K5EGR0C8SDQBTNCEP8TJNCCW",
70+
"fieldNameFHIR": "contained|#:Practitioner|name|0|given|0",
71+
"fieldNameFlat": "PERFORMING_PROFESSIONAL_FORENAME",
72+
"errorLevel": 1,
73+
"expression": {
74+
"expressionName": "Practitioner Forename Not Empty Check",
75+
"expressionType": "NOTEMPTY",
76+
"expressionRule": ""
77+
},
78+
"errorGroup": "completeness"
79+
},
80+
{
81+
"expressionId": "01K5EGR0C822RC96QJRR2YX18S",
82+
"fieldNameFHIR": "contained|#:Practitioner|name|0|family",
83+
"fieldNameFlat": "PERFORMING_PROFESSIONAL_SURNAME",
84+
"errorLevel": 1,
85+
"expression": {
86+
"expressionName": "Practitioner Surname Not Empty Check",
87+
"expressionType": "NOTEMPTY",
88+
"expressionRule": ""
89+
},
90+
"errorGroup": "completeness"
91+
},
92+
{
93+
"expressionId": "01K5EGR0C84CCDRR0VFSWQNFZP",
94+
"fieldNameFHIR": "primarySource",
95+
"fieldNameFlat": "PRIMARY_SOURCE",
96+
"errorLevel": 1,
97+
"expression": {
98+
"expressionName": "Primary Source Not Empty Check",
99+
"expressionType": "NOTEMPTY",
100+
"expressionRule": ""
101+
},
102+
"errorGroup": "completeness"
103+
},
104+
{
105+
"expressionId": "01K5EGR0C8VCX8FX8A7ZV7MQ5J",
106+
"fieldNameFHIR": "extension|0|valueCodeableConcept|coding|0|code",
107+
"fieldNameFlat": "VACCINATION_PROCEDURE_CODE",
108+
"errorLevel": 0,
109+
"expression": {
110+
"expressionName": "Procedure Code Not Empty Check",
111+
"expressionType": "NOTEMPTY",
112+
"expressionRule": ""
113+
},
114+
"errorGroup": "completeness"
115+
},
116+
{
117+
"expressionId": "01K5EGR0C85HY6MDNN6TTR1K48",
118+
"fieldNameFHIR": "extension|0|valueCodeableConcept|coding|0|display",
119+
"fieldNameFlat": "VACCINATION_PROCEDURE_TERM",
120+
"errorLevel": 1,
121+
"expression": {
122+
"expressionName": "Procedure Term Not Empty Check",
123+
"expressionType": "NOTEMPTY",
124+
"expressionRule": ""
125+
},
126+
"errorGroup": "completeness"
127+
},
128+
{
129+
"expressionId": "01K5EGR0C84DDGW567G14AYBC6",
130+
"fieldNameFHIR": "protocolApplied|0|doseNumberPositiveInt",
131+
"fieldNameFlat": "DOSE_SEQUENCE",
132+
"errorLevel": 1,
133+
"expression": {
134+
"expressionName": "Dose Sequence Not Empty Check",
135+
"expressionType": "NOTEMPTY",
136+
"expressionRule": ""
137+
},
138+
"errorGroup": "completeness"
139+
},
140+
{
141+
"expressionId": "01K5EGR0C8W3HXFYR80ENW73SS",
142+
"fieldNameFHIR": "vaccineCode|coding|#:http://snomed.info/sct|code",
143+
"fieldNameFlat": "VACCINE_PRODUCT_CODE",
144+
"errorLevel": 0,
145+
"expression": {
146+
"expressionName": "Produce Code Not Empty Check",
147+
"expressionType": "NOTEMPTY",
148+
"expressionRule": ""
149+
},
150+
"errorGroup": "completeness"
151+
},
152+
{
153+
"expressionId": "01K5EGR0C885N7MMW2J5JKHTT2",
154+
"fieldNameFHIR": "vaccineCode|coding|#:http://snomed.info/sct|display",
155+
"fieldNameFlat": "VACCINE_PRODUCT_TERM",
156+
"errorLevel": 1,
157+
"expression": {
158+
"expressionName": "Produce Term Not Empty Check",
159+
"expressionType": "NOTEMPTY",
160+
"expressionRule": ""
161+
},
162+
"errorGroup": "completeness"
163+
},
164+
{
165+
"expressionId": "01K5EGR0C86XN0AF0M9DJYFGCD",
166+
"fieldNameFHIR": "manufacturer|display",
167+
"fieldNameFlat": "VACCINE_MANUFACTURER",
168+
"errorLevel": 0,
169+
"expression": {
170+
"expressionName": "Manufacturer Display Not Empty Check",
171+
"expressionType": "NOTEMPTY",
172+
"expressionRule": ""
173+
},
174+
"errorGroup": "completeness"
175+
},
176+
{
177+
"expressionId": "01K5EGR0C89M4CV68B7XAKDCHG",
178+
"fieldNameFHIR": "lotNumber",
179+
"fieldNameFlat": "BATCH_NUMBER",
180+
"errorLevel": 0,
181+
"expression": {
182+
"expressionName": "Batch Number Not Empty Check",
183+
"expressionType": "NOTEMPTY",
184+
"expressionRule": ""
185+
},
186+
"errorGroup": "completeness"
187+
}
188+
]
189+
}

lambdas/shared/tests/test_common/validator/test_application_fhir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_validation(self):
2525

2626
print("Current working directory:", os.getcwd())
2727
print("Test file directory:", Path(__file__).parent)
28-
print("Schema file exists:", (Path(__file__).parent / "schemas" / "schema.json").exists())
28+
print("Schema file exists:", (Path(__file__).parent / "schemas" / "test_schema.json").exists())
2929

3030
validator = Validator(SchemaFile) # FHIR File Path not needed
3131
error_list = validator.validate_fhir(self.FHIRFilePath, True, True, True)

0 commit comments

Comments
 (0)