w3c / hcls-fhir-rdf

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

How do we discriminate polymorphic primitive types #138

Open ericprud opened 6 months ago

ericprud commented 6 months ago

Turtle filename

FHIR Resource URL of corresponding attribute on build.fhir.org, e.g. https://build.fhir.org/observation.html#a26.b

Observation.instantiates Observation.subject

ShEx shape @<Observation>~fhir:instantiates

Description Current definition of polymorphic types requires addition of either

Is e.g. xsd:date a representation of more than one primitive type? Are there any polymorphic properties that include those primitive types? (Will there ever be?)

What about primitive types that are xsd:strings?

à la:

  <Observation/123>
    #  instantiates Reference
    fhir:instantiates ( [
+      a fhir:Reference ; # type needed because fhir:instantiates is polymorphic
       fhir:link <http://example.org/fhir/PlanDefinition/KDN5> ; # current
       fhir:reference [
         fhir:v "http://example.org/fhir/PlanDefinition/KDN5"^^xsd:anyURI # note: no version on reference
      ]
    ] ) ; 
    #  instantiates canonical
    fhir:instantiates ( [
+      a fhir:canonical ; # type needed because fhir:instantiates is polymorphic
       fhir:link <http://example.org/fhir/PlanDefinition/KDN5?version=v123> ; # new with this proposal
       fhir:v "http://example.org/fhir/PlanDefinition/KDN5|v123"^^xsd:anyURI ;
    ] ) ; # 
dbooth-boston commented 6 months ago

AGREED to add type arc on today's call. See: https://www.w3.org/2024/01/04-hcls-irc#T16-46-55

ACTION: DBooth to draft edits of the rdf.html page

dbooth-boston commented 5 months ago

Reopened pending the merge of the actual fix.