w3c / hcls-fhir-rdf

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

Should RDF preserve comments? #60

Closed hsolbrig closed 6 years ago

hsolbrig commented 7 years ago

The FHIR JSON specification allows the preservation of XML comments via the fhir_comments mechanism. Example (from http://fhirtest.uhn.ca/baseDstu3/Patient/176556?_format=html/xml):

    ...
   <active value="true"/>
   <!--   Peter James Chalmers, but called "Jim"   -->
   <name>
      <use value="official"/>
      <family value="Chalmers"/>
      <given value="Peter"/>
      <given value="James"/>
   </name>
   <name>
      <use value="usual"/>
      <given value="Jim"/>
   </name>
   <telecom>
      <!--   home communication details aren't known   -->
      <use value="home"/>
   </telecom>

Is represented in JSON as:

  ...
  "active": true,
  "name": [
    {
      "fhir_comments": [
        "   Peter James Chalmers, but called \"Jim\"   "
      ],
      "use": "official",
      "family": "Chalmers",
      "given": [
        "Peter",
        "James"
      ]
    },
    {
      "use": "usual",
      "given": [
        "Jim"
      ]
    }
  ],
  "telecom": [
    {
      "use": "home",
      "_use": {
        "fhir_comments": [
          "   home communication details aren't known   "
        ]
      }
    },

There is no equivalent in RDF.

ericprud commented 7 years ago

We could do the same thing as in JSON and invent a term, but we'd have to write it into every shape. Out of curiosity, are "fhir_comments" allowed everywhere in the JSON schema?

hsolbrig commented 7 years ago

Interestingly, while fhir_comments is documented in DSTU2 (http://hl7.org/fhir/DSTU2/json.html), it has been pulled from DSTU3 -- see http://www.healthintersections.com.au/?p=2569 for details so I'm not sure where to go with this.

It appears that "fhir_comments" can appear anywhere an extension can appear...

ericprud commented 7 years ago

if it's gone from STU3, perhaps we don't have to worry about it?

hsolbrig commented 7 years ago

It's gone from the STU3 spec, but you will note that the test data comes from a (theoretically) STU3 compliant server. Probably need to address this with the Zulip community to decide where to go.