Skip to content

Commit 1593c17

Browse files
committed
working tests
1 parent fddfd49 commit 1593c17

File tree

3 files changed

+19
-215
lines changed

3 files changed

+19
-215
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void invalidBundle() {
117117
"Unable to find a match for profile urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca666 among choices: https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-EPSLegal",
118118
OperationOutcome.IssueSeverity.ERROR));
119119
assertTrue(issueListHasDiagnosticMessageAtSeverity(validatorResult.getIssue(),
120-
"Except for transactions and batches, each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry",
120+
"Except for transactions and batches, each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry ",
121121
OperationOutcome.IssueSeverity.ERROR));
122122
}
123123

dual/src/test/resources/results/5.4.2/psu_nhs_digital.json

Lines changed: 17 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -2,208 +2,66 @@
22
"resourceType": "OperationOutcome",
33
"issue": [
44
{
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",
5+
"severity": "information",
166
"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)",
7+
"diagnostics": "Binding for path Bundle.entry[0].resource.ofType(Task).businessStatus has no source, so can't be checked",
188
"location": [
19-
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/",
20-
"Line[1] Col[1004]"
9+
"Bundle.entry[0].resource.ofType(Task).businessStatus",
10+
"Line 1, Col 668"
2111
]
2212
},
2313
{
24-
"extension": [
25-
{
26-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
27-
"valueInteger": 1
28-
},
29-
{
30-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
31-
"valueInteger": 1004
32-
},
33-
{
34-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
35-
"valueString": "Validation_VAL_Profile_Minimum"
36-
}
37-
],
3814
"severity": "error",
3915
"code": "processing",
40-
"details": {
41-
"coding": [
42-
{
43-
"system": "http://hl7.org/fhir/java-core-messageId",
44-
"code": "Validation_VAL_Profile_Minimum"
45-
}
46-
]
47-
},
4816
"diagnostics": "Task.identifier: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
4917
"location": [
50-
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/",
51-
"Line[1] Col[1004]"
18+
"Bundle.entry[0].resource.ofType(Task)",
19+
"Line 1, Col 267"
5220
]
5321
},
5422
{
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": 1004
63-
},
64-
{
65-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
66-
"valueString": "Validation_VAL_Profile_Minimum"
67-
}
68-
],
6923
"severity": "error",
7024
"code": "processing",
71-
"details": {
72-
"coding": [
73-
{
74-
"system": "http://hl7.org/fhir/java-core-messageId",
75-
"code": "Validation_VAL_Profile_Minimum"
76-
}
77-
]
78-
},
7925
"diagnostics": "Task.code: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
8026
"location": [
81-
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/",
82-
"Line[1] Col[1004]"
27+
"Bundle.entry[0].resource.ofType(Task)",
28+
"Line 1, Col 267"
8329
]
8430
},
8531
{
86-
"extension": [
87-
{
88-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
89-
"valueInteger": 1
90-
},
91-
{
92-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
93-
"valueInteger": 1004
94-
},
95-
{
96-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
97-
"valueString": "Validation_VAL_Profile_Minimum"
98-
}
99-
],
10032
"severity": "error",
10133
"code": "processing",
102-
"details": {
103-
"coding": [
104-
{
105-
"system": "http://hl7.org/fhir/java-core-messageId",
106-
"code": "Validation_VAL_Profile_Minimum"
107-
}
108-
]
109-
},
11034
"diagnostics": "Task.authoredOn: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
11135
"location": [
112-
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/",
113-
"Line[1] Col[1004]"
36+
"Bundle.entry[0].resource.ofType(Task)",
37+
"Line 1, Col 267"
11438
]
11539
},
11640
{
117-
"extension": [
118-
{
119-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
120-
"valueInteger": 1
121-
},
122-
{
123-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
124-
"valueInteger": 1004
125-
},
126-
{
127-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
128-
"valueString": "Validation_VAL_Profile_Minimum"
129-
}
130-
],
13141
"severity": "error",
13242
"code": "processing",
133-
"details": {
134-
"coding": [
135-
{
136-
"system": "http://hl7.org/fhir/java-core-messageId",
137-
"code": "Validation_VAL_Profile_Minimum"
138-
}
139-
]
140-
},
14143
"diagnostics": "Task.requester: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
14244
"location": [
143-
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/",
144-
"Line[1] Col[1004]"
45+
"Bundle.entry[0].resource.ofType(Task)",
46+
"Line 1, Col 267"
14547
]
14648
},
14749
{
148-
"extension": [
149-
{
150-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
151-
"valueInteger": 1
152-
},
153-
{
154-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
155-
"valueInteger": 625
156-
},
157-
{
158-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
159-
"valueString": "Terminology_TX_NoValid_1_CC"
160-
}
161-
],
16250
"severity": "error",
16351
"code": "processing",
164-
"details": {
165-
"coding": [
166-
{
167-
"system": "http://hl7.org/fhir/java-core-messageId",
168-
"code": "Terminology_TX_NoValid_1_CC"
169-
}
170-
]
171-
},
172-
"diagnostics": "None of the codings provided are in the value set 'EPSTaskBusinessPrescriptionStatus' (https://fhir.nhs.uk/ValueSet/DM-task-business-status|1.0.0), and a coding from this value set is required) (codes = https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt#Dispatched)",
52+
"diagnostics": "None of the codings provided are in the value set https://fhir.nhs.uk/ValueSet/DM-task-business-status (https://fhir.nhs.uk/ValueSet/DM-task-business-status), and a coding from this value set is required) (codes = https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt#Dispatched)",
17353
"location": [
174-
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/.businessStatus",
175-
"Line[1] Col[625]"
54+
"Bundle.entry[0].resource.ofType(Task).businessStatus",
55+
"Line 1, Col 668"
17656
]
17757
},
17858
{
179-
"extension": [
180-
{
181-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
182-
"valueInteger": 1
183-
},
184-
{
185-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
186-
"valueInteger": 623
187-
},
188-
{
189-
"url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
190-
"valueString": "Validation_VAL_Profile_Minimum"
191-
}
192-
],
19359
"severity": "error",
19460
"code": "processing",
195-
"details": {
196-
"coding": [
197-
{
198-
"system": "http://hl7.org/fhir/java-core-messageId",
199-
"code": "Validation_VAL_Profile_Minimum"
200-
}
201-
]
202-
},
20361
"diagnostics": "Task.businessStatus.coding.display: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
20462
"location": [
205-
"Bundle.entry[0].resource/*Task/4d70678c-81e4-4ff4-8c67-17596fd0aa46*/.businessStatus.coding[0]",
206-
"Line[1] Col[623]"
63+
"Bundle.entry[0].resource.ofType(Task).businessStatus.coding[0]",
64+
"Line 1, Col 676"
20765
]
20866
}
20967
]

dual/src/test/resources/results/5.4.2/psu_update.json

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,61 +7,7 @@
77
"diagnostics": "Binding for path Bundle.entry[0].resource.ofType(Task).businessStatus has no source, so can't be checked",
88
"location": [
99
"Bundle.entry[0].resource.ofType(Task).businessStatus",
10-
"Line 1, Col 668"
11-
]
12-
},
13-
{
14-
"severity": "error",
15-
"code": "processing",
16-
"diagnostics": "Task.identifier: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
17-
"location": [
18-
"Bundle.entry[0].resource.ofType(Task)",
19-
"Line 1, Col 267"
20-
]
21-
},
22-
{
23-
"severity": "error",
24-
"code": "processing",
25-
"diagnostics": "Task.code: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
26-
"location": [
27-
"Bundle.entry[0].resource.ofType(Task)",
28-
"Line 1, Col 267"
29-
]
30-
},
31-
{
32-
"severity": "error",
33-
"code": "processing",
34-
"diagnostics": "Task.authoredOn: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
35-
"location": [
36-
"Bundle.entry[0].resource.ofType(Task)",
37-
"Line 1, Col 267"
38-
]
39-
},
40-
{
41-
"severity": "error",
42-
"code": "processing",
43-
"diagnostics": "Task.requester: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
44-
"location": [
45-
"Bundle.entry[0].resource.ofType(Task)",
46-
"Line 1, Col 267"
47-
]
48-
},
49-
{
50-
"severity": "error",
51-
"code": "processing",
52-
"diagnostics": "None of the codings provided are in the value set https://fhir.nhs.uk/ValueSet/DM-task-business-status (https://fhir.nhs.uk/ValueSet/DM-task-business-status), and a coding from this value set is required) (codes = https://fhir.nhs.uk/CodeSystem/task-businessStatus-nppt#Dispatched)",
53-
"location": [
54-
"Bundle.entry[0].resource.ofType(Task).businessStatus",
55-
"Line 1, Col 668"
56-
]
57-
},
58-
{
59-
"severity": "error",
60-
"code": "processing",
61-
"diagnostics": "Task.businessStatus.coding.display: minimum required = 1, but only found 0 (from https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task-EPS)",
62-
"location": [
63-
"Bundle.entry[0].resource.ofType(Task).businessStatus.coding[0]",
64-
"Line 1, Col 676"
10+
"Line 1, Col 481"
6511
]
6612
}
6713
]

0 commit comments

Comments
 (0)