Stream: conformance
Topic: Context for Normative Version
Ward Weistra (Mar 25 2020 at 14:23):
Hi @Grahame Grieve,
The normative-version extension has context 'element: StructureDefinition': https://www.hl7.org/fhir/extension-structuredefinition-normative-version.html
However, it seems to also be used in non-StructureDefinitions, like this OperationDefinition: https://www.hl7.org/fhir/operation-codesystem-lookup.xml.html#DomainResource.text.div-end
Also on, for example, the profile for the data type Identifier the extensions are both used on the StructureDefinition level (good), but also on deeper Element levels (bad): https://simplifier.net/packages/hl7.fhir.r4.core/4.0.1/files/82704/~xml
Since last release Forge copies the extensions on these elements to derived profiles. When validating these with the Java validator the error is thrown:
error: The extension http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version is not allowed to be used at this point (allowed = e:StructureDefinition; this element is [[StructureDefinition.differential.element, BackboneElement.element, ElementDefinition])
cc @Abel Enthoven @Matthijs van der Wielen
Ward Weistra (Mar 25 2020 at 16:40):
Not sure why http://hl7.org/fhir/OperationDefinition/CodeSystem-lookup has these claims at all:
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"> <valueInteger value="5"/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"> <valueCode value="normative"/> </extension> <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version"> <valueCode value="4.0.1"/> </extension>
since http://hl7.org/fhir/operation-codesystem-lookup.html lists it as Maturity Level: N/A and Standards Status: Informative
Grahame Grieve (Mar 29 2020 at 19:27):
it should not have those claims. And the context of use for the structure definition is too narrow; we use it in more places than that
Grahame Grieve (Mar 29 2020 at 19:28):
both issues added to my list of future technical corrections
Ward Weistra (Mar 31 2020 at 08:37):
@Grahame Grieve Should I create a Jira issue and/or add it to https://confluence.hl7.org/display/FHIR/Known+Issues+with+the+published+FHIR+Specifications ?
Grahame Grieve (Mar 31 2020 at 08:59):
both, I think
Ward Weistra (Mar 31 2020 at 15:01):
Created FHIR#26671 and FHIR#26672 for this.
Patrick Werner (Apr 09 2020 at 13:51):
Could this issue be resolved short term? Not copying the extension in Forge @Ward Weistra ? This bugs currently breaks all my CI pipelines (if i don't remove the element in a filter step, which i dislike)
Ward Weistra (Apr 09 2020 at 13:57):
@Patrick Werner I understand this is causing pain. Though, since Forge seems to align with the desired result, isn't it better to suppress this warning in the validator instead?
Patrick Werner (Apr 09 2020 at 13:58):
Hmm yes you are right. Ideally should be fixed in the package, but this would need another TC. So filtering the error in the Java Validator would be the fastest way i guess.
Patrick Werner (Apr 09 2020 at 13:58):
@Grahame Grieve ?
Patrick Werner (Apr 15 2020 at 12:59):
Ok i experimented more with the roundtrip: IG creator -> Forge -> FHIR Validator:
- if i open: http://build.fhir.org/ig/HL7/genomics-reporting/haplotype.profile.json.html in Forge, rename the profile and save it again without any further changes i get these errors in the java validator:
Error @ StructureDefinition.text.div (line 6, col4) : The URL {{[id]}}-definitions.html#Observation is not valid
Patrick Werner (Apr 15 2020 at 13:00):
Forge seems to replace this: <a href=\"haplotype-definitions.html#Observation
the original link in the div
Patrick Werner (Apr 15 2020 at 13:01):
so "haplotype" ist replaced with: "{{[id]}}"
Patrick Werner (Apr 15 2020 at 13:01):
- if i then switch on snapshot creation in Forge i end up with: FAILURE validating Haplotype-copy.StructureDefinition.json: error:206 warn:6 info:0
Patrick Werner (Apr 15 2020 at 13:05):
Many of these: Error @ StructureDefinition.snapshot.element[0].constraint[0].source (line 88, col12) : Canonical URLs must be absolute URLs if they are not fragment references (DomainResource)
Patrick Werner (Apr 15 2020 at 13:06):
also the known one mentioned above: http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version
Patrick Werner (Apr 15 2020 at 13:07):
The warnings are all: Warning @ StructureDefinition.snapshot.element[35].type[0].code (line 2795, col12) : The value provided ("http://hl7.org/fhirpath/System.String") is not in the value set http://hl7.org/fhir/ValueSet/defined-types (http://hl7.org/fhir/ValueSet/defined-types), and a code should come from this value set unless it has no suitable code) (error message = The code system "" is not known (encountered paired with code = "http://hl7.org/fhirpath/System.String"); The code provided (#http://hl7.org/fhirpath/System.String) is not valid in the value set FHIRDefinedType)
Patrick Werner (Apr 15 2020 at 13:07):
@Ward Weistra @Grahame Grieve
Patrick Werner (Apr 15 2020 at 13:08):
To reproduce: d/l http://build.fhir.org/ig/HL7/genomics-reporting/haplotype.profile.json.html, open it in Forge, save it with snapshot. Validate it with the java validator
Patrick Werner (Apr 15 2020 at 13:09):
after the roundtrip: https://gist.github.com/patrick-werner/caccff7cf45f4772bb12967e59032b72
Grahame Grieve (Apr 15 2020 at 13:17):
I'm not clear what you think the actual problem is here
Patrick Werner (Apr 15 2020 at 13:26):
Problems:
- (Java Validator) throws the http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version errors (could be filtered until the context is fixed in R4.0.2?)
Patrick Werner (Apr 15 2020 at 13:27):
- Forge replaces strings in
StructureDefinition.text.div
causing the java validator to throw errors (forge problem)
Patrick Werner (Apr 15 2020 at 13:29):
- Forge snapshot expansion leads to
Warning @ StructureDefinition.snapshot.element[35].type[0].code (line 2795, col12) : The value provided ("http://hl7.org/fhirpath/System.String") is not in the value set http://hl7.org/fhir/ValueSet/defined-types (http://hl7.org/fhir/ValueSet/defined-types), and a code should come from this value set unless it has no suitable code) (error message = The code system "" is not known (encountered paired with code = "http://hl7.org/fhirpath/System.String"); The code provided (#http://hl7.org/fhirpath/System.String) is not valid in the value set FHIRDefinedType)
Warnings
Patrick Werner (Apr 15 2020 at 13:30):
Is this caused because String is not written in lowercase? (forge problem)
Patrick Werner (Apr 15 2020 at 13:31):
- the validator returns:
(error message = The code system "" is not known
why is the code system = "" ? (Validator / TX Server Problem)
Ward Weistra (Apr 15 2020 at 13:57):
Thanks for the reports @Patrick Werner, we'll look into the two Forge issues!
Patrick Werner (Apr 15 2020 at 13:57):
Thanks!
Ward Weistra (Apr 15 2020 at 14:10):
@Patrick Werner we have trouble recreating the second issue. What were the steps:
- Open http://build.fhir.org/ig/HL7/genomics-reporting/haplotype.profile.json.html in Forge
- Switch on Options > Persistence Options > Save Snapshot component?
That doesn't give us the errors yet.
Patrick Werner (Apr 15 2020 at 15:02):
then you have to validate it: java -jar org.hl7.fhir.validator.jar Haplotype.StructureDefinition.json -ig hl7.fhir.uv.genomics-reporting -version 4.0
Patrick Werner (Apr 15 2020 at 15:46):
@Ward Weistra
Matthijs van der Wielen (Apr 16 2020 at 11:31):
@Patrick Werner The .json at http://build.fhir.org/ig/HL7/genomics-reporting/haplotype.profile.json.html already contains a snapshot. Am I correct to assume that this snapshot is created by Forge as well?
Patrick Werner (Apr 16 2020 at 11:34):
@Matthijs van der Wielen nope. This Snapshot is created by the IG Tooling (Spreadsheets).
Matthijs van der Wielen (Apr 16 2020 at 11:44):
@Patrick Werner Strange, when I download your entire IG and directly validate StructureDefinition-haplotype.json from the IG, I get
A few errors: Error @ StructureDefinition.text.div (line 7, col4) : The URL {{[id]}}-definitions.html#Observation is not valid
Same as you mentioned.
And a couple of these warnings: Warning @ StructureDefinition.snapshot.element[1].type[0].code (line 197, col12) : The value provided ("http://hl7.org/fhirpath/System.String") is not in the value set http://hl7.org/fhir/ValueSet/defined-types (http://hl7.org/fhir/ValueSet/defined-types), and a code should come from this value set unless it has no suitable code) (error message = The code system "" is not known (encountered paired with code = "http://hl7.org/fhirpath/System.String"); The code provided (#http://hl7.org/fhirpath/System.String) is not valid in the value set FHIRDefinedType)
So, to me, it seems that these aren't caused by Forge. Or am I missing something?
Patrick Werner (Apr 16 2020 at 11:45):
ohhhhh! let me double check.
Patrick Werner (Apr 16 2020 at 11:51):
@Matthijs van der Wielen
Sorry for reporting this. You are absolutely right. This is already contained in our IG. Didn't see this as the {{[id]}}- definitions are not shown if you look and c&p the resource from the IG pages.
Patrick Werner (Apr 16 2020 at 11:51):
This is clearly an IG publisher issue. Sorry again.
Matthijs van der Wielen (Apr 16 2020 at 11:54):
@Patrick Werner No problem!
Ward Weistra (May 07 2020 at 16:14):
@Grahame Grieve For resources that rightfully have the http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
and http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version
extension, should they both be at the StructureDefinition level and on the root element level? (besides normative-version currently only being allowed on SDs; FHIR#26671)
2020-05-07-18_04_26-Element.profile.json-FHIR-v4.0.1.png
Lloyd McKenzie (May 07 2020 at 17:54):
Both levels - some elements can be STU within a normative resource
Grahame Grieve (May 07 2020 at 20:18):
there's a task to fix the definition of that extension since it's used in lots of places, not just StructureDefinition
Lloyd McKenzie (May 07 2020 at 21:45):
Can we fix the value as well so it inheriting isn't going to cause a problem?
Grahame Grieve (May 08 2020 at 02:08):
sounds difficult to me but all the options aren't great
Lloyd McKenzie (May 08 2020 at 04:25):
If we made the extension complex, we could do this:
<extension url="http://hl7.org/fhir/StructureDefinition/metadata-standards-status">
<extension url="model">
<valueCanonical value="http://hl7.org/fhir/Patient|4.0.0"/>
</extension>
<extension url="status">
<valueCode value="Normative"/>
</extension>
</extension>
Lloyd McKenzie (May 08 2020 at 04:25):
If we preferred to split the model and the version into separate components, we could do that too
Lloyd McKenzie (May 08 2020 at 04:26):
Each layer in the profile hierarchy could then add its own declaration of status - and the artifact and version in which that status took effect.
Lloyd McKenzie (May 08 2020 at 04:26):
Not super-pretty, but not horrid...
Ward Weistra (May 14 2020 at 14:19):
@Patrick Werner This week's Forge release will no longer copy the structuredefinition-standards-status
and structuredefinition-normative-version
extensions everywhere and will remove them from opened profiles: https://simplifier.net/organization/firely/news/87
Patrick Werner (May 14 2020 at 14:31):
already saw that, and was very happy about it :slight_smile:
Patrick Werner (May 14 2020 at 14:31):
Ward Weistra (May 20 2020 at 14:49):
Created FHIR#27535 for the extension inheritance issue.
Last updated: Apr 12 2022 at 19:14 UTC