Stream: implementers
Topic: Validation
nicola (RIO/SS) (Nov 21 2015 at 11:26):
@Dunmail I've played with internal representation custom validation and got almost the same structure like JSON schema :) So i think that's the way.
Dunmail (Nov 21 2015 at 11:31):
So go for JSON schema?
Dunmail (Nov 21 2015 at 11:31):
Do you think FHIRpath could play a part? Ewout made the suggestion that we could process a structureDefinition to produce a set of assertions that (FHIRPath + expectation). We then just test all the assertions against the resource.
Josh Mandel (Nov 21 2015 at 12:05):
Interesting question. Fhir path would need valueset membership testing too, for that to work.
Dunmail (Nov 21 2015 at 12:06):
Recognising that we're definitely early on the FHIRpath hype cycle!
Josh Mandel (Nov 21 2015 at 12:12):
Yes quite. We're on the cusp of reinventing schematron.
Grahame Grieve (Nov 21 2015 at 12:46):
well, we're doing what we're doing speciically to address issues in schematron. So it's no surprise that there's a strong functional overlap
Grahame Grieve (Nov 21 2015 at 13:08):
what would be really nice would be to be step the evaluation as it proceeds....
nicola (RIO/SS) (Nov 21 2015 at 16:49):
Yes, let's use JSON schema!
Josh Mandel (Nov 23 2015 at 15:07):
"to be step the evaluation"?
Ewout Kramer (Nov 23 2015 at 15:20):
I think json schema would need to knpw the type of resource, but that's property....
David Hay (Apr 01 2016 at 00:38):
I understand that there is reference code in the distribution that will validate whether an instance is actually conformant to a specific profile. Does it also validate extensions? ie that an extension in a resource instance is valid according to its StructureDefinition?
Grahame Grieve (Apr 01 2016 at 00:39):
yes, if it can find the extension definition
Grahame Grieve (Apr 01 2016 at 00:39):
if it can't, it'll be a warning
David Hay (Apr 01 2016 at 00:42):
thanks!
Vadim Peretokin (Apr 14 2016 at 00:57):
What does "No profile found for contained resource of type "Observation"" mean? I think it's checking for http://hl7.org/fhir/StructureDefinition/Observation, but that is valid
Grahame Grieve (Apr 14 2016 at 00:57):
where did you get this?
Vadim Peretokin (Apr 14 2016 at 00:57):
On your fhir3 server
Grahame Grieve (Apr 14 2016 at 00:57):
what did you post?
Vadim Peretokin (Apr 14 2016 at 00:58):
Sorry, pastebin being slow - https://ada-young.appspot.com/pastebin/abe7493a
Josh Mandel (Apr 27 2016 at 13:17):
Just added gforge:9896 to point out a bug in validation example.
Josh Mandel (Apr 27 2016 at 13:18):
Also: running the validator.jar locally requires me to have access to http://fhir-dev.healthintersections.com.au
??
Grahame Grieve (Apr 27 2016 at 13:23):
hmm.
Grahame Grieve (Apr 27 2016 at 13:24):
yes you need a terminology service. That I can't revoke. but the naming problem... hmm
Josh Mandel (Apr 27 2016 at 14:39):
What's "the naming problem"?
Grahame Grieve (Apr 27 2016 at 14:39):
fhir-dev.healthintersections.com.au got retired. I'll have to bring it back to life
Grahame Grieve (Apr 27 2016 at 14:39):
I retired it because it was not a fixed version referenc
Christiaan Knaap (Jul 12 2016 at 11:24):
I try to use the validator with a number of custom profiles, including the extension nl-core-address-official. I have put all these profiles in two xml bundles and added them to the validation.xml.zip. When I run the validator, it loads the definitions but this results in an exception:
Exception in thread "main" org.hl7.fhir.exceptions.DefinitionException: Profile nl-core-address-official (http://fhir.nl/fhir/StructureDefinition/nl-address-official) base http://hl7.org/fhir/StructureDefinition/Extension could not be resolved
But http://hl7.org/fhir/StructureDefinition/Extension is in profiles-types.xml, also in the same zip. Why can it not be resolved?
Grahame Grieve (Jul 12 2016 at 11:48):
beats me. Which version is this?
Christiaan Knaap (Jul 12 2016 at 11:50):
can I let validator.jar display its version?
Grahame Grieve (Jul 12 2016 at 11:54):
umm no? that would be a good idea though wouldn't it?
Christiaan Knaap (Jul 12 2016 at 12:44):
Yes it would :-) It has a modified date of April 20th, so not too old.
Christiaan Knaap (Jul 12 2016 at 21:05):
I checked the code: I think it is dependent on the order of the StructureDefinitions being read. It can only resolve a base if it has read it before. I think it should read them all first, and resolve the base resources later.
Grahame Grieve (Jul 12 2016 at 22:21):
hm that's an interesting point. I'll look at that
David Teirney (Aug 01 2016 at 10:09):
Is there an appropriate place to raise what looks to be a bug with the FHIR Validator? E.g. a NullPointerException.
David Teirney (Aug 01 2016 at 10:13):
Is there a validation tool that crawls and validates all of the contents of a FHIR server? Similar to how a search engine crawler bot follows all links from the home page on a web-site, except in this case that tool would validate each resource that it finds a reference to.
Grahame Grieve (Aug 01 2016 at 10:17):
we haven't got around to doing a tool like that - would be a wrapper around the vlaidator
Grahame Grieve (Aug 01 2016 at 10:18):
report issues with the java validator using the normal gForge
Werner De Mulder (Nov 10 2020 at 21:22):
Hi all. I'm working on a graduation assignment and trying to validate my solution. I've created a structuredefinintion and in this structuredefinition I refer to a valueset with URL http://test.org/mygraduation/ValueSet/MyValueSetValueBoolean
Part of my structuredefinition resource with Profile URL: http://mygraduation.org/fhir/StructureDefinition/MyObservationValueBoolean
"abstract": false,
"type": "Observation",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
"derivation": "constraint",
"differential": {
"element": [
{
"id": "Observation.code.coding.system",
"path": "Observation.code.coding.system",
"min": 1,
"binding": {
"strength": "required",
"valueSetUri": "http://test.org/mygraduation/ValueSet/MyValueSetValueBoolean"
}
},
Part of my ValueSet resource:
"compose": {
"lockedDate": "2020-11-03",
"inactive": true,
"include": [
{
"system": "http://snomed.info/sct",
"concept": [
{
"code": "38341003",
"display": "Indicate if the patient has a current diagnosis of hypertension."
},
After sending an observation resource to my CDR, I receive a message :
"Code 'http://snomed.info/sct' from system '' does not exist in valueset 'http://test.org/mygraduation/ValueSet/MyValueSetValueBoolean'.
The related observation contains correctly the system value and a code value :
"fullUrl": "xxx",
"resource": {
"resourceType": "Observation",
"meta": {
"profile": [
"http://mygraduation.org/fhir/StructureDefinition/MyObservationValueBoolean"
]
},
"identifier": [
{
"value": "xxx"
}
],
"status": "final",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "38341003",
"display": "Indicate if the patient has a current diagnosis of hypertension."
}
]
},
I don't understand the error message here as my valueset contains the system and code value. Any advice here?
Lloyd McKenzie (Nov 10 2020 at 22:00):
The message sounds like the code and system are getting messed up somehow
Werner De Mulder (Nov 12 2020 at 13:42):
@Lloyd McKenzie Thank you for replying.
Meanwhile, I could solve my issue.
StructureDefinition was wrong.
corrected to:
"id": "Observation.code",
"path": "Observation.code",
"min": 1,
"binding": {
"strength": "required",
"valueSetUri": "http://test.org/mygraduation/ValueSet/MyValueSetValueBoolean"
instead of:
"id": "Observation.code.coding.system",
"path": "Observation.code.coding.system",
"min": 1,
"binding": {
"strength": "required",
"valueSetUri": "http://test.org/mygraduation/ValueSet/MyValueSetValueBoolean"
I have made a mistake in the "id" and the "path".
Kind regards,
Werner
Last updated: Apr 12 2022 at 19:14 UTC