w3c / hcls-fhir-rdf

Sketching out an RDF representation for FHIR
39 stars 15 forks source link

Update FHIR RDF Playground for R5 modifier extensions #112

Open dbooth-boston opened 1 year ago

dbooth-boston commented 1 year ago

Our approach for R5 modifier extensions (option 6): https://github.com/w3c/hcls-fhir-rdf/issues/93#issuecomment-1202853624

From DBooth to James on 12/11/22:

I was preparing to edit the FHIR spec to reflect our decision to change
how modifier extensions are handled in FHIR RDF R5, but ran into a snag.
As you may recall, when an element has a modifierExtension attached,
we decided to rename that element (by prepending an underscore),
to prevent that element from being accidentally processed
as a regular non-modified element, as described in option 6:
https://github.com/w3c/hcls-fhir-rdf/issues/93#issuecomment-1202853624

The FHIR spec page that I need to edit is here:
https://build.fhir.org/extensibility.html#modifierExtension

The only Turtle template shown on that page is for the Extension
element: https://build.fhir.org/extensibility.html#extension That
does not change for our R5 decision about modifier extensions,
so we do not need to update the FHIR spec build process for that
template. However, in the narrative of the extensibility.html page we
do need to add a Turtle example snippet of using a modifierExtension,
corresponding to the existing JSON anti-prescription example:
https://build.fhir.org/extensibility.html#modifierExtension I can hand
craft such an example snippet, but I will also want to test it in the
FHIR RDF Playground, and that's where I became blocked, because AFAIK we
have not yet implemented our modifierExtension changes in the Playground.

If there are any (complete) examples of modifierExtensions in the FHIR
example suite (as opposed to a narrative snippet) then the update of
HAPI to support modifierExtensions will automatically convert them
appropriately.  Here is what I mean by a (complete) example in the
FHIR example suite, though this one does not use a modifierExtension:
https://build.fhir.org/medicationrequest0302.html

The bottom line of all this is that the FHIR RDF Playground needs to
be upgraded to support modifierExtensions.  This is a task that I don't
think we previously identified.

James, since you have been working on other aspects of the Playground, I'm
wondering if you could undertake this as well, to update it to support the
change in how we are representing modifierExtensions.  You might need Eric
or Deepak's help on ShEx aspects, since ShEx is used in the Playground.
But Deepak is already working to update the ShEx that is generated by
the FHIR build process, to reflect the R5 changes, so the change in the
handling of modifierExtensions should already be reflected in the ShEx
when Deepak is done.

HAPI also needs to be updated to reflect our change in how
modifierExtensions are handled, so that FHIR spec build process
generates the Turtle example suite correctly for any examples that use
modifierExtensions.  But Eric has already signed up for the HAPI changes,
so we should be good on those when he's done.