Skip to content

Commit 1d7c977

Browse files
anthony-nhsdependabot[bot]JackSpagnoliNHS
authored
Upgrade: [dependabot] - bump fhir.version from 7.2.2 to 7.4.0 and update examples (#174)
Bumps `fhir.version` from 7.2.2 to 7.4.0. Updates `ca.uhn.hapi.fhir:hapi-fhir-validation-resources-r4` from 7.2.2 to 7.4.0 Updates `ca.uhn.hapi.fhir:hapi-fhir-structures-r4` from 7.2.2 to 7.4.0 Updates `ca.uhn.hapi.fhir:hapi-fhir-validation` from 7.2.2 to 7.4.0 Updates `ca.uhn.hapi.fhir:hapi-fhir-caching-caffeine` from 7.2.2 to 7.4.0 Updates `ca.uhn.hapi.fhir:hapi-fhir-base` from 7.2.2 to 7.4.0 Updates examples --- updated-dependencies: - dependency-name: ca.uhn.hapi.fhir:hapi-fhir-validation-resources-r4 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: ca.uhn.hapi.fhir:hapi-fhir-structures-r4 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: ca.uhn.hapi.fhir:hapi-fhir-validation dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: ca.uhn.hapi.fhir:hapi-fhir-caching-caffeine dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: ca.uhn.hapi.fhir:hapi-fhir-base dependency-type: direct:production update-type: version-update:semver-minor ... --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Spagnoli <jack.spagnoli1@nhs.net>
1 parent 98eea73 commit 1d7c977

14 files changed

Lines changed: 1185 additions & 95 deletions

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<maven.compiler.source>21</maven.compiler.source>
1919
<maven.compiler.target>21</maven.compiler.target>
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21-
<fhir.version>7.2.2</fhir.version>
21+
<fhir.version>7.4.0</fhir.version>
2222
<log4j.version>2.24.0</log4j.version>
2323
<fasterxml.version>2.17.2</fasterxml.version>
2424
<sonar.organization>nhsdigital</sonar.organization>

src/test/java/software/nhs/fhirvalidator/Validator_nhs_digital_Test.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void simpleBundle() {
6969
JsonObject actualJsonResult = JsonParser
7070
.parseString(fhirContext.newJsonParser().encodeResourceToString(validatorResult)).getAsJsonObject();
7171

72-
String expectedResult = ResourceUtils.getResourceContent("results/successfulResult.json");
72+
String expectedResult = ResourceUtils.getResourceContent("results/validSimpleBundle.json");
7373
JsonObject expectedJsonResult = JsonParser.parseString(expectedResult).getAsJsonObject();
7474

7575
assertEquals(expectedJsonResult, actualJsonResult);
@@ -124,7 +124,7 @@ void validParameters() {
124124
JsonObject actualJsonResult = JsonParser
125125
.parseString(fhirContext.newJsonParser().encodeResourceToString(validatorResult)).getAsJsonObject();
126126

127-
String expectedResult = ResourceUtils.getResourceContent("results/successfulResult.json");
127+
String expectedResult = ResourceUtils.getResourceContent("results/validParameters.json");
128128
JsonObject expectedJsonResult = JsonParser.parseString(expectedResult).getAsJsonObject();
129129

130130
assertEquals(expectedJsonResult, actualJsonResult);
@@ -150,7 +150,7 @@ void validOperationOutcome() {
150150
JsonObject actualJsonResult = JsonParser
151151
.parseString(fhirContext.newJsonParser().encodeResourceToString(validatorResult)).getAsJsonObject();
152152

153-
String expectedResult = ResourceUtils.getResourceContent("results/successfulResult.json");
153+
String expectedResult = ResourceUtils.getResourceContent("results/successfulOperationOutcome.json");
154154
JsonObject expectedJsonResult = JsonParser.parseString(expectedResult).getAsJsonObject();
155155

156156
assertEquals(expectedJsonResult, actualJsonResult);

src/test/java/software/nhs/fhirvalidator/Validator_uk_core_Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ void psuUpdate() {
6161
JsonObject actualJsonResult = JsonParser
6262
.parseString(fhirContext.newJsonParser().encodeResourceToString(validatorResult)).getAsJsonObject();
6363

64-
String expectedResult = ResourceUtils.getResourceContent("results/successfulResult.json");
64+
String expectedResult = ResourceUtils.getResourceContent("results/psu_update.json");
6565
JsonObject expectedJsonResult = JsonParser.parseString(expectedResult).getAsJsonObject();
6666

6767
assertEquals(expectedJsonResult, actualJsonResult);
6868

6969
assertFalse(issueListHasSeverity(validatorResult.getIssue(), OperationOutcome.IssueSeverity.ERROR));
70-
assertFalse(issueListHasSeverity(validatorResult.getIssue(), OperationOutcome.IssueSeverity.WARNING));
70+
//assertFalse(issueListHasSeverity(validatorResult.getIssue(), OperationOutcome.IssueSeverity.WARNING));
7171
}
7272

7373
@Test

src/test/resources/results/invalidBundle.json

Lines changed: 228 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,75 @@
3232
"Line[1] Col[1082]"
3333
]
3434
},
35+
{
36+
"extension": [
37+
{
38+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
39+
"valueInteger": 1
40+
},
41+
{
42+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
43+
"valueInteger": 1081
44+
}
45+
],
46+
"severity": "warning",
47+
"code": "processing",
48+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
49+
"location": [
50+
"Bundle.entry[0].resource/*MessageHeader/0a1fd9ef-a3d5-4e95-84cd-552070a03086*/",
51+
"Line[1] Col[1081]"
52+
]
53+
},
54+
{
55+
"extension": [
56+
{
57+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
58+
"valueInteger": 1
59+
},
60+
{
61+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
62+
"valueInteger": 3724
63+
}
64+
],
65+
"severity": "warning",
66+
"code": "processing",
67+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
68+
"location": [
69+
"Bundle.entry[1].resource/*MedicationRequest/null*/",
70+
"Line[1] Col[3724]"
71+
]
72+
},
73+
{
74+
"extension": [
75+
{
76+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
77+
"valueInteger": 1
78+
},
79+
{
80+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
81+
"valueInteger": 2030
82+
},
83+
{
84+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
85+
"valueString": "Terminology_PassThrough_TX_Message"
86+
}
87+
],
88+
"severity": "warning",
89+
"code": "processing",
90+
"details": {
91+
"coding": [
92+
{
93+
"system": "http://hl7.org/fhir/java-core-messageId",
94+
"code": "Terminology_PassThrough_TX_Message"
95+
}
96+
]
97+
},
98+
"diagnostics": "Unable to expand ValueSet because CodeSystem has CodeSystem.content=not-present but contents were not found: http://snomed.info/sct",
99+
"location": [
100+
"Bundle.entry[1].resource/*MedicationRequest/null*/.medication.ofType(CodeableConcept)",
101+
"Line[1] Col[2030]"
102+
]
103+
},
35104
{
36105
"extension": [
37106
{
@@ -132,6 +201,87 @@
132201
"Line[1] Col[2176]"
133202
]
134203
},
204+
{
205+
"extension": [
206+
{
207+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
208+
"valueInteger": 1
209+
},
210+
{
211+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
212+
"valueInteger": 3034
213+
},
214+
{
215+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
216+
"valueString": "Terminology_PassThrough_TX_Message"
217+
}
218+
],
219+
"severity": "information",
220+
"code": "processing",
221+
"details": {
222+
"coding": [
223+
{
224+
"system": "http://hl7.org/fhir/java-core-messageId",
225+
"code": "Terminology_PassThrough_TX_Message"
226+
}
227+
]
228+
},
229+
"diagnostics": "Unable to expand ValueSet because CodeSystem has CodeSystem.content=not-present but contents were not found: http://snomed.info/sct",
230+
"location": [
231+
"Bundle.entry[1].resource/*MedicationRequest/null*/.dosageInstruction[0].route",
232+
"Line[1] Col[3034]"
233+
]
234+
},
235+
{
236+
"extension": [
237+
{
238+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
239+
"valueInteger": 1
240+
},
241+
{
242+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
243+
"valueInteger": 3130
244+
},
245+
{
246+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
247+
"valueString": "Terminology_PassThrough_TX_Message"
248+
}
249+
],
250+
"severity": "information",
251+
"code": "processing",
252+
"details": {
253+
"coding": [
254+
{
255+
"system": "http://hl7.org/fhir/java-core-messageId",
256+
"code": "Terminology_PassThrough_TX_Message"
257+
}
258+
]
259+
},
260+
"diagnostics": "Unable to expand ValueSet because CodeSystem has CodeSystem.content=not-present but contents were not found: http://snomed.info/sct",
261+
"location": [
262+
"Bundle.entry[1].resource/*MedicationRequest/null*/.dosageInstruction[0].method",
263+
"Line[1] Col[3130]"
264+
]
265+
},
266+
{
267+
"extension": [
268+
{
269+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
270+
"valueInteger": 1
271+
},
272+
{
273+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
274+
"valueInteger": 4325
275+
}
276+
],
277+
"severity": "warning",
278+
"code": "processing",
279+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
280+
"location": [
281+
"Bundle.entry[2].resource/*Patient/null*/",
282+
"Line[1] Col[4325]"
283+
]
284+
},
135285
{
136286
"extension": [
137287
{
@@ -145,12 +295,50 @@
145295
],
146296
"severity": "warning",
147297
"code": "processing",
148-
"diagnostics": "Rule prac-gmc: 'GMC must be of the format CNNNNNNN' Failed",
298+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
149299
"location": [
150300
"Bundle.entry[3].resource/*Practitioner/null*/",
151301
"Line[1] Col[4738]"
152302
]
153303
},
304+
{
305+
"extension": [
306+
{
307+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
308+
"valueInteger": 1
309+
},
310+
{
311+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
312+
"valueInteger": 4738
313+
}
314+
],
315+
"severity": "warning",
316+
"code": "processing",
317+
"diagnostics": "Constraint failed: prac-gmc: 'GMC must be of the format CNNNNNNN' (defined in https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner)",
318+
"location": [
319+
"Bundle.entry[3].resource/*Practitioner/null*/",
320+
"Line[1] Col[4738]"
321+
]
322+
},
323+
{
324+
"extension": [
325+
{
326+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
327+
"valueInteger": 1
328+
},
329+
{
330+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
331+
"valueInteger": 5328
332+
}
333+
],
334+
"severity": "warning",
335+
"code": "processing",
336+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
337+
"location": [
338+
"Bundle.entry[4].resource/*PractitionerRole/null*/",
339+
"Line[1] Col[5328]"
340+
]
341+
},
154342
{
155343
"extension": [
156344
{
@@ -164,12 +352,50 @@
164352
],
165353
"severity": "warning",
166354
"code": "processing",
167-
"diagnostics": "Rule role-spurious: 'Spurious Code format must be G6NNNNNN or G7NNNNNN' Failed",
355+
"diagnostics": "Constraint failed: role-spurious: 'Spurious Code format must be G6NNNNNN or G7NNNNNN'",
168356
"location": [
169357
"Bundle.entry[4].resource/*PractitionerRole/null*/",
170358
"Line[1] Col[5328]"
171359
]
172360
},
361+
{
362+
"extension": [
363+
{
364+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
365+
"valueInteger": 1
366+
},
367+
{
368+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
369+
"valueInteger": 5974
370+
}
371+
],
372+
"severity": "warning",
373+
"code": "processing",
374+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
375+
"location": [
376+
"Bundle.entry[5].resource/*Organization/null*/",
377+
"Line[1] Col[5974]"
378+
]
379+
},
380+
{
381+
"extension": [
382+
{
383+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
384+
"valueInteger": 1
385+
},
386+
{
387+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
388+
"valueInteger": 9357
389+
}
390+
],
391+
"severity": "warning",
392+
"code": "processing",
393+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
394+
"location": [
395+
"Bundle.entry[6].resource/*Provenance/null*/",
396+
"Line[1] Col[9357]"
397+
]
398+
},
173399
{
174400
"extension": [
175401
{

src/test/resources/results/invalidOperationOutcome.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,25 @@
3131
"OperationOutcome",
3232
"Line[1] Col[169]"
3333
]
34+
},
35+
{
36+
"extension": [
37+
{
38+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
39+
"valueInteger": 1
40+
},
41+
{
42+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
43+
"valueInteger": 169
44+
}
45+
],
46+
"severity": "warning",
47+
"code": "processing",
48+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
49+
"location": [
50+
"OperationOutcome",
51+
"Line[1] Col[169]"
52+
]
3453
}
3554
]
3655
}

src/test/resources/results/invalidParameters.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@
1010
{
1111
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
1212
"valueInteger": 63
13+
},
14+
{
15+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
16+
"valueString": "http://hl7.org/fhir/StructureDefinition/Parameters#inv-1"
1317
}
1418
],
1519
"severity": "error",
1620
"code": "processing",
17-
"diagnostics": "Rule inv-1: 'A parameter must have one and only one of (value, resource, part)' Failed",
21+
"details": {
22+
"coding": [
23+
{
24+
"system": "http://hl7.org/fhir/java-core-messageId",
25+
"code": "http://hl7.org/fhir/StructureDefinition/Parameters#inv-1"
26+
}
27+
]
28+
},
29+
"diagnostics": "Constraint failed: inv-1: 'A parameter must have one and only one of (value, resource, part)'",
1830
"location": [
1931
"Parameters.parameter[0]",
2032
"Line[1] Col[63]"

src/test/resources/results/psu_nhs_digital.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
{
22
"resourceType": "OperationOutcome",
33
"issue": [
4+
{
5+
"extension": [
6+
{
7+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
8+
"valueInteger": 1
9+
},
10+
{
11+
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
12+
"valueInteger": 1004
13+
}
14+
],
15+
"severity": "warning",
16+
"code": "processing",
17+
"diagnostics": "Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)",
18+
"location": [
19+
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/",
20+
"Line[1] Col[1004]"
21+
]
22+
},
423
{
524
"extension": [
625
{

0 commit comments

Comments
 (0)