You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transferred from internal JIRA issue originally created 2024-03-26.
When exporting an Instance, rules are validated against the InstanceOf StructureDefinition. During this validation step, there is a check for paths that refer to named slices without using the slice name. This involves checking if the element at the path is a “preloaded slice,” which it is if it contains required descendants with fixed or pattern values. Elements are not unfolded during these checks. Warnings are emitted for these paths.
Later in the export process, implied values from the StructureDefinition are assigned to the Instance definition. As part of this step, elements on the StructureDefinition may be unfolded. This unfolding may add elements that are required and have fixed or pattern values. This means these elements should have been found during the validation step, creating a warning. But, since they didn’t exist, the warning was not generated.
If another Instance uses the same StructureDefinition, it will already have those unfolded elements on it during the rule validation step. So, it will correctly generate a warning for a similar-looking rule.
This pattern was observed in (https://github.com/nightingaleproject/vital_records_fhir_messaging_ig/tree/main). Specifically, consider Instances defined in examples/EX_DeathCertificateDocument.fsh. In both Instances of DeathCertificateDocument, rules are set at entry.resource, which should refer to the required slice. No warnings are emitted for the first Instance of this Profile, but warnings are emitted for the second Instance. A third Instance with a similar structure would emit similar warnings.
The text was updated successfully, but these errors were encountered:
Transferred from internal JIRA issue originally created 2024-03-26.
When exporting an Instance, rules are validated against the InstanceOf StructureDefinition. During this validation step, there is a check for paths that refer to named slices without using the slice name. This involves checking if the element at the path is a “preloaded slice,” which it is if it contains required descendants with fixed or pattern values. Elements are not unfolded during these checks. Warnings are emitted for these paths.
Later in the export process, implied values from the StructureDefinition are assigned to the Instance definition. As part of this step, elements on the StructureDefinition may be unfolded. This unfolding may add elements that are required and have fixed or pattern values. This means these elements should have been found during the validation step, creating a warning. But, since they didn’t exist, the warning was not generated.
If another Instance uses the same StructureDefinition, it will already have those unfolded elements on it during the rule validation step. So, it will correctly generate a warning for a similar-looking rule.
This pattern was observed in (https://github.com/nightingaleproject/vital_records_fhir_messaging_ig/tree/main). Specifically, consider Instances defined in examples/EX_DeathCertificateDocument.fsh. In both Instances of DeathCertificateDocument, rules are set at
entry.resource
, which should refer to the required slice. No warnings are emitted for the first Instance of this Profile, but warnings are emitted for the second Instance. A third Instance with a similar structure would emit similar warnings.The text was updated successfully, but these errors were encountered: