Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reference-slice-resolve test #206

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions validator/Observation-TestObservationInstanceWithResolve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"resourceType": "Observation",
"id": "TestObservationInstanceWithResolve",
"meta": {
"profile": [
"http://example.org/StructureDefinition/TestObservationProfileWithResolve"
]
},
"performer": [
{
"reference": "Patient/pat-good"
}
],
"status": "final",
"code": {
"coding": [
{
"code": "test",
"system": "http://test.org/CodeSystem"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"resourceType": "StructureDefinition",
"id": "TestObservationProfileWithResolve",
"url": "http://example.org/StructureDefinition/TestObservationProfileWithResolve",
"name": "TestObservationProfileWithResolve",
"title": "TestObservationProfileWithResolve",
"status": "draft",
"description": "TestObservationProfileWithResolve",
"fhirVersion": "4.0.1",
"kind": "resource",
"abstract": false,
"type": "Observation",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Observation.performer",
"path": "Observation.performer",
"slicing": {
"discriminator": [
{
"type": "type",
"path": "$this.resolve()"
}
],
"rules": "open"
},
"min": 1
},
{
"id": "Observation.performer:test",
"path": "Observation.performer",
"sliceName": "test",
"min": 1,
"max": "1",
"type": [
{
"code": "Reference",
"targetProfile": [
"http://hl7.org/fhir/StructureDefinition/Patient"
]
}
]
}
]
}
}
30 changes: 30 additions & 0 deletions validator/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -50178,6 +50178,36 @@
}
}
},
{
"name": "reference-slice-resolve",
"file": "Observation-TestObservationInstanceWithResolve.json",
"version": "4.0",
"description": "Validator should be able to fetch reference from validation context",
"supporting": [
"StructureDefinition-TestObservationProfileWithResolve.json",
"patient-good.json"
],
"java": {
"warningCount": 1,
"outcome": {
"resource": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "warning",
"code": "not-found",
"details": {
"text": "A definition for CodeSystem 'http://test.org/CodeSystem' could not be found, so the code cannot be validated"
},
"expression": [
"Observation.code.coding[0].system"
]
}
]
}
}
}
},
{
"name": "zzz",
"file": "zzz.json",
Expand Down
Loading