w3c / hcls-fhir-rdf

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

Should FHIR datatype values have an rdf:type? #106

Closed dbooth-boston closed 11 months ago

dbooth-boston commented 1 year ago

FHIR has four kinds of datatypes:

  1. Simple / primitive types, which are single elements with a primitive value
  2. General-purpose complex types, which are re-usable clusters of elements
  3. Metadata types: A set of types for use with metadata resources
  4. Special purpose data types - defined elsewhere in the specification for specific usages

We decided against hoisting scalars, so all FHIR properties in Turtle (except our special fhir:v, fhir:index and fhir:nodeRole properties) are OWL object properties, and use the bnode-fhir:v idiom like this. For a simple / primitive / scalar property, this comes out like:

##### Example exGenderTurtle
... fhir:gender [
    fhir:v "male"
  ] ;

The value of the Patient.gender property above is of type code. Simple / primitive / scalar types start with a lower case letter, so we probably don't want to use something like fhir:code both as a property and a class.

But complex types start with an upper case letter, and have sub-structure. For example, the Patient.name property has a value of type HumanName:

##### Example exHumanNameTurtle
... fhir:name [
    # a fhir:HumanName ;    # Should we declare the type like this?
    fhir:use [
      fhir:v "official"
    ];
    fhir:family [
      fhir:v "Donald"
    ];
    fhir:given [
      fhir:v "Duck";
      fhir:index 0
    ];
    fhir:index 0
  ];

Should we include a type declaration on complex objects, such as above?

dbooth-boston commented 1 year ago

On today's call, we decided to table this issue for the moment, while we focus on R5 changes for the upcoming ballot:

AGREED: Table this for the moment.

dbooth-boston commented 11 months ago

Implemented in R5.