w3c / hcls-fhir-rdf

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

FHIR rdf representation does not pass shex - canonical URL properties need metadata #70

Closed hsolbrig closed 1 year ago

hsolbrig commented 4 years ago

FHIR R5 has a new feature that doesn't pass the ShEx validation. See:

https://raw.githubusercontent.com/fhircat/fhir_rdf_validator/master/tests/log


Testing questionnaireresponse-example-ussg-fht-answers.ttl Type: http://hl7.org/fhir/QuestionnaireResponse
*****   Testing <http://hl7.org/fhir/QuestionnaireResponse/ussg-fht-answers> against shape http://hl7.org/fhir/shape/QuestionnaireResponse
    Testing _:b1 against shape http://hl7.org/fhir/shape/canonical
    _:b1 context:
      <http://hl7.org/fhir/QuestionnaireResponse/ussg-fht-answers> fhir:QuestionnaireResponse.questionnaire _:b1 .
         _:b1 fhir:link <http://hl7.org/fhir/Questionnaire/ussg-fht> .
         _:b1 fhir:value "Questionnaire/ussg-fht" .

      Unmatched triples in CLOSED shape:
    <ub27bL15C44> <http://hl7.org/fhir/link> http://hl7.org/fhir/Questionnaire/ussg-fht .```
dbooth-boston commented 4 years ago

This will need to be handled in the JSON pre-processing. We should also consider raising this to the broader FHIR community.

dbooth-boston commented 2 years ago

Closing this, because it will be caught by shex validation in the build process, so we will address then if it is still an issue.

dbooth-boston commented 1 year ago

Reopening this, because it showed up again when Deepak was shex validating the R5 examples. See this example:

  fhir:transform [
     fhir:v "http://example.org/fhir/StructureMap/supplyrequest-transform"^^xsd:anyURI ;
     fhir:link <http://example.org/fhir/StructureMap/supplyrequest-transform>
  ]] . # 

fhir:transform has a datatype of fhir:canonical . According to our current rules, it should not have the contained fhir:link, though it makes sense to have it. We added fhir:link to fhir:References in FHIR RDF, though as a sibling of fhir:reference rather than being contained inside it.

ericprud commented 1 year ago

re-closing after creating #120