This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "FHIR RDF Mapping - Potential Strategies"

From HL7Wiki
Jump to navigation Jump to search
Line 33: Line 33:
 
Pros/Cons:
 
Pros/Cons:
 
* (PRO) @@ TODO: Ask Grahame to fill in @@
 
* (PRO) @@ TODO: Ask Grahame to fill in @@
 +
 +
@@ TODO: Add example @@

Revision as of 19:12, 24 March 2015

Return to ITS Main Page | ITS RDF Minutes 2014 | All ITS RDF Pages | ITS Email Archives | W3C HCLS Email Archives | Issues List

Option 1: Custom Mapping with ShEx

This strategy would use a custom FHIR XML<->RDF mapping, defined using ShEx. In practice, it would be mostly generated from the FHIR specification (as EricP and Josh Mandel did), with some customizations to produce the desired RDF result.

Description:

Pros/Cons:

  • (PRO) This strategy gives us the most latitude in the style of RDF that we can choose.

@@ TODO: Add an example @@

Option 2: JSON-LD with @lists

In this strategy, FHIR would adopt JSON-LD instead of plain JSON, by adding a single @context line to the beginning of the existing FHIR JSON. The referenced @context would use @list to ensure that ordering information is retained in the corresponding RDF. Because JSON-LD offers no way in a single @context to distinguish between differ uses of the same term in different places with a JSON document, @list would use pretty much everywhere.

Description:

Pros/Cons:

  • (PRO) No need to define a third FHIR representation: standard JSON-LD parsers could interpret FHIR JSON-LD instance data as RDF.
  • (CON) The resulting RDF would have RDF lists wrapped around single items when they otherwise would not need to be in lists, because the @context would not be able to distinguish cases that need list to retain ordering and cases that do not.

@@ TODO: Add example @@

Option 3: JSON-LD brief/verbose use of @context

This strategy attemps to work around the @list problem of option 2 by using different @contexts at different points in the JSON hierarchy. It would use JSON-LD as a mechanism for mapping to RDF in a two-step process. Plain FHIR JSON (perhaps with a single @context statement) would be transmitted on the wire, but this would be considered the "brief" form. To propertly interpret the data as RDF, it would first have to be transformed into the "verbose" form by a standard JSON transformation that would insert lots of @context statements into different points in the JSON hierarchy, so that different uses of the same JSON term could be mapped differently to RDF.

Description: https://lists.w3.org/Archives/Public/public-semweb-lifesci/2015Mar/0064.html

Pros/Cons:

  • (PRO) @@ TODO: Ask Grahame to fill in @@

@@ TODO: Add example @@