Skip to content

RDF ShExGenerator R6 fixes -- FHIR-53178 - #2491

Draft
tmprd wants to merge 30 commits into
hapifhir:masterfrom
fhircat:master-bridge
Draft

RDF ShExGenerator R6 fixes -- FHIR-53178 #2491
tmprd wants to merge 30 commits into
hapifhir:masterfrom
fhircat:master-bridge

Conversation

@tmprd

@tmprd tmprd commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🕊️ In memory of Detlef Grittner https://trauer.nn.de/traueranzeige/detlef-grittner

Applies fixes from @detlef-grittner-sohard and @ericprud after recent ShExGenerator cross-version refactor in #2230

Bug fixes for https://jira.hl7.org/browse/FHIR-53178

Minor fixes

  • Removes extra space after ? in constraints
  • Ensures fhir:l links are optional
  • Enforces rdf:type for choice type elements needed for disambiguation (names like valueQuantity aren't used)
  • Removes broken & unused content references like <PlanDefinition.action.actionnull>, see ShEx content references w3c-cg/hcls-fhir-rdf#243
  • Adds missing <Resource> to long "OR" list of <Resource> shapes
  • Adds missing (NOT { fhir:nodeRole [fhir:treeRoot] ; a [fhir:Resource] } OR @<Resource>) OR to long list of <All> shapes

Eric Prud'hommeaux and others added 23 commits October 30, 2025 16:57
Rebase of "Changes in ShEx for R6" on master
e.g. "contentReference" : "#Resouce1.element3"

``` shex
<ArtifactAssessment.content.componentnull> CLOSED {
}
```
@tmprd tmprd changed the title RDF ShExGenerator R6 fixes RDF ShExGenerator R6 fixes -- FHIR-53178 Jul 10, 2026
@tmprd

tmprd commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Comparison from same set of StructureDefinitions

New R6 ShEx

fhir-r6.shex.txt

Old R6 ShEx from current master

fhir-r6-master-pre-apply.shex.txt

@tmprd

tmprd commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

xhtml and SimpleQuantity are the only core profiles with a max 0 cardinality constraint, which are now corrected to this:

<SimpleQuantity> EXTENDS @<Quantity> CLOSED {   
    a [fhir:SimpleQuantity]?;
    fhir:comparator . {0}
} 
<Xhtml> EXTENDS @<PrimitiveType> CLOSED {  
    fhir:v rdf:XMLLiteral;
    fhir:extension . {0};
}  

@dbooth-boston dbooth-boston left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 8.57%. Comparing base (94b579c) to head (3a82d9a).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff               @@
##              master     #2491      +/-   ##
==============================================
+ Coverage       8.55%     8.57%   +0.02%     
- Complexity     41051     41205     +154     
==============================================
  Files           3411      3417       +6     
  Lines        1255084   1255850     +766     
  Branches      373380    373554     +174     
==============================================
+ Hits          107377    107716     +339     
+ Misses       1111707   1111574     -133     
- Partials       36000     36560     +560     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix OWL + shex polymorphic types + references

5 participants