Stream: conformance
Topic: validator and profiling with spreadsheets
Bob Milius (Oct 30 2018 at 19:53):
I have some questions about using the FHIR Validator to validate examples based on profiles that have been authored with spreadsheets (xml). Is this the right stream for that?
Grahame Grieve (Oct 30 2018 at 19:59):
sure
Bob Milius (Oct 30 2018 at 20:31):
I'm working on examples for our Genomics Reporting IG, and using the FHIR Validator to validate them. I initially found an issue where a Pattern (in json) was being ignored and the observation.code binding wasn't being enforced. I created a gf ticket on this (#19565). So I tried editing the spreadsheet to do the slicing as I've seen other profiles do it (eg heartrate), and have this: obs-genotype.png.
Now the validator seems to work, ie gives me an error when I don't have the correct observation.code.coding. But it doesn't allow for other codings. e.g., if I use this coding
<code> <coding> <system value="http://loinc.org"/> <code value="84413-4"/> <display value="Genotype display name"/> </coding> <coding> <system value="http://loinc.org"/> <code value="57290-9"/> <display value="HLA-A [Type] by High resolution"/> </coding> </code>
I get this error that tells me the second coding doesn't match any known slice. If I comment out the second coding, it passes validation.
$ java -jar org.hl7.fhir.validator.jar observation_genotype_test.xml -ig hl7.fhir.uv.genomics-reporting#dev -profile http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/obs-genotype FHIR Validator Build ?? Arguments: observation_genotype_test.xml -ig hl7.fhir.uv.genomics-reporting#dev -profile http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/obs-genotype .. connect to tx server @ http://tx.fhir.org .. definitions from hl7.fhir.core#3.6.0 (v3.6.0-null) + .. load IG from hl7.fhir.uv.genomics-reporting#dev .. validate [observation_genotype_test.xml] against [http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/obs-genotype] Terminology server: Check for supported code systems for http://loinc.org Success...validating observation_genotype_test.xml: error:0 warn:0 info:1 Information @ Observation.code.coding[2] (line 24, col17) : This element does not match any known slice for the profile http://hl7.org/fhir/uv/genomics-reporting/StructureDefinition/obs-genotype
I want the validator to make sure the first coding is present, but allow for other codings as well.
I hope that makes sense.
Last updated: Apr 12 2022 at 19:14 UTC