Open dtr-agency opened 2 years ago
1st piece of work to address this is to add conditional cardinality Xpath expresssion e.g. inv-dh-obs-06 The component shall at least have a value or a data absent reason.
This is in progress.
Added Xpath for SNOMED system + conditional reference population via https://github.com/AuDigitalHealth/ci-fhir-r4/commit/bcd479970a9ed0b9dc628c602d81564b2924e86e
Added Xpath for section entry population that do not require resolve() via https://github.com/AuDigitalHealth/ci-fhir-r4/commit/27b1c432e09818503402ee8dcb83ba8ec23d28a5
Not all invariants can be checked with Xpath. The following invariants are not addressed with XPath:
Additionally, invariant on 'valid' identifier only checks for presence of identifier element - the XPath may be added at a later date if desired.
NOTE: At this time XPath expression is not present in HL7 AU Base materials and are therefore not included in generated schema / schematron files.
The introduced XPath expressions are ready for review.
Unit test cases to include XPath expression. Test case development beginning September 19th by @udaychandrupatla & @vikasmittal-dh.
Prerequisites
The issue / feature
Change description
Invariants in ADHA profiles have the FHIRPath expression of constraint defined but do not have an XPath expression of constraint defined.
Only invariants with XPath expression get included in the Schema+Schematron files generated in an ADHA FHIR NPM package.
This means that there significantly less rule coverage offered by thethe Schema+Schematron files vs the JSON StructureDefinitions.
Noting that JSON StructureDefinitions used in Validator or validate operation provide greater validation capabilities anyway including bindings and questionnaires
What it actually enables people to do
Complete automated Schema+Schematron XML files -
How awesome would it be?
Unclear as the primary expectation of use of ADHA FHIR NPM package in validation remains use of Validator or Validate Operation - these use the JSON StructureDefinitions (FHIRPath expression).
However
Workarounds
N/A
Additional context
Core FHIR standard provides XPath expression for all core FHIR invariants. US Core provides XPath expression for all US Core invariants. IPS does not provide XPath expression for all IPS invariants.