w3c / hcls-fhir-rdf

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

How does the current JSON-LD context generator invent names for inherited properties? #97

Closed ericprud closed 11 months ago

ericprud commented 2 years ago

Graham's interpretation of FHIR/RDF assumes we use the names of inherited properties. For example, CodeSystem extends CanonicalResource extends DomainResource extends Resource extends Base. These introduce properties, e.g. DomainResource introduces DomainResource.text (a Narrative).

An example code-system includes these properties with their inherited names:

<http://hl7.org/fhir/CodeSystem/example> a fhir:CodeSystem;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "example"];
  fhir:Resource.meta [...];
  fhir:DomainResource.text [...]
.

How were these extracted? The R4 snapshot (search for "snapeshot") has id and meta expressed as Observation properties, e.g. "Observation.id" and "Observation.meta" while the associated @context has them as "fhir:Resource.id", ""fhir:Resource.meta"", and "fhir:DomainResource.text".

Were the @context files derived from snapshots or did someone write something to follow inheritance (from baseDefinition and type, i guess)? If the latter, A, wow, that's a lot of work and B, can you explain it to me?

I've mostly recreated a the apparent inheritance semantics, but I'm unsure whether to follow the naming conventions in the snapshots or the @contexts.

dbooth-boston commented 11 months ago

Done