FHIR Chat · publishing question · ontology

Stream: ontology

Topic: publishing question


view this post on Zulip Grahame Grieve (Mar 24 2016 at 19:42):

ok, back to the question of where to publish this. Publishing the RDF form in a different specification will be a problem because as time passes, we will do one of two things: we will see the ontology of FHIR as a peripheral thing that isn't really important, or we will have to release a new version of the ontology details every time we release a new version of FHIR - which is 3 times a year.

view this post on Zulip Grahame Grieve (Mar 24 2016 at 19:43):

I strongly believe that either of those is a mistake

view this post on Zulip Grahame Grieve (Mar 24 2016 at 19:43):

and that the ontology should be a core thing of FHIR

view this post on Zulip Grahame Grieve (Mar 24 2016 at 19:44):

hence, we should be working on bring rdf.html in the specification up to date.

view this post on Zulip Grahame Grieve (Mar 24 2016 at 19:45):

so I think we should merge the content from http://w3c.github.io/hcls-fhir-rdf/spec/rdf.html into https://hl7-fhir.github.io/rdf.html

view this post on Zulip David Booth (Mar 24 2016 at 22:04):

Yes, we absolutely plan to merge it in. We're just trying to get it to a more coherent state before doing so. The content currently at http://w3c.github.io/hcls-fhir-rdf/spec/rdf.html was merely copied wholesale from Tony Mallia's "Side by Side" document (as a placeholder), which is not the content that it should have. Eric is now doing major editing on it to bring it closer to being mergeable with the page at https://hl7-fhir.github.io/rdf.html .

view this post on Zulip Grahame Grieve (Mar 24 2016 at 23:17):

Ok. What's the timeline? I have a freeze on 5 days time. If I can merge the content in before that, we'll have something solid to test to - the Montreal connectathon version

view this post on Zulip Grahame Grieve (Mar 24 2016 at 23:17):

we could run a mini rdf connectathon

view this post on Zulip David Booth (Mar 24 2016 at 23:19):

Eric said on Tuesday that he wanted a week to work on it. Your freeze sounds like a good forcing function. :) We'll have to check with Eric to see if that's doable.

view this post on Zulip Grahame Grieve (Mar 24 2016 at 23:20):

Ok. Cool

view this post on Zulip Michael van der Zel (Mar 25 2016 at 15:40):

I hope I can join the turtle connecthathon!

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:23):

Hi gang, I'm overhauling http://w3c.github.io/hcls-fhir-rdf/spec/rdf which is currently based on the XML rather than structure definitions or their html representation, logical tables.

view this post on Zulip Grahame Grieve (Mar 28 2016 at 21:23):

using the logical tables would be better

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:24):

that was my intuition

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:25):

i've been using logical tables in examples and vocabulary (name, path) from structure definitions

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:25):

what are the corresponding documents for XML or JSON? how formally does one map from logical structure to format-specific structure?

view this post on Zulip Grahame Grieve (Mar 28 2016 at 21:34):

http://hl7-fhir.github.io/xml.html and http://hl7-fhir.github.io/json.html so the mapping

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:46):

is there anything which says that e.g. a BackboneElement begets an XML element with the tag name coming from the last segement of the path, and that new elements is the parent element for everything with a path equal to that path plus one more segment?

view this post on Zulip Grahame Grieve (Mar 28 2016 at 21:46):

umm, what?

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:47):

e.g. MedicationOrder.dosageInstruction -> <dosageInstruction><text>...</text><timing>...</timing>...

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:49):

we see MedicationOrder.dosageInstruction and we guess from the examples that the XML representation of that is an element with the name <dosageInstruction/>, but is that stated?

view this post on Zulip Richard Kavanagh (Mar 28 2016 at 21:50):

Is there a defined relationship between "Element Name" and "Path". Kind of touches on this http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=9421&start=0

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:52):

yeah, that's the sort of specification i'm looking to emulate in the RDF

view this post on Zulip Eric Prud'hommeaux (Mar 28 2016 at 21:53):

i'll look back here in the AM. gonna lay this jet-lagged body on the slab for a few hours.

view this post on Zulip Grahame Grieve (Mar 28 2016 at 21:53):

well, the path is constructed from the element names. I'm not quite sure what you're asking

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 06:30):

@Grahame Grieve, there appear to be n rules for representing data in XML

* start with a resource structure defn R
* type2struct = map from type to profile structure defn # "CodeableConcept" -> [@resourceType="StructureDefinition",name="CodeableConcept"]/snapshot/element
* curElement = XML element with the Resource name # MedicationOrder
* for each element in R/snapshot/element, curElement.appendChild(D.name)
** if (D.type includes BackboneElement) .. # Observation.referenceRange
** if (D.type includes type T and T in type2struct ... # Observation.code
** if (D.type includes type "code" ... # Observation.status
...
This sort of spec clarifies a bunch of stuff we otherwise guess at:

* iterate across snapshot/element vs. differential/element
* names like T[x] do not appear in the payload, instead their nested choices do.
etc

view this post on Zulip Grahame Grieve (Mar 29 2016 at 06:32):

all the rules that we've ever needed are here:

view this post on Zulip Grahame Grieve (Mar 29 2016 at 06:33):

http://hl7-fhir.github.io/xml.html

view this post on Zulip Grahame Grieve (Mar 29 2016 at 06:33):

I'm not understanding what you're missing, or why it's so complex

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:12):

how does this tell me what to do with asNeeded[x]?

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:14):

(I believe i know what to do because the 7th example down includes asNeededBoolean, which indicates that forms like <nameB[x]> don't include the [x] but instead include one of the choices of element name, but that takes some digging and isn't explicit.)

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:17):

one can use name similarity to guess the relationship with the data model as expressed in structure definitions or logical tables

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:18):

but sooner or later, folks will want an explicit binding between the data model and the serializations

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:19):

you know, I'm sure those sentences used to explicitly say what to do with [x]. how can they not?

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:20):

because it's here: http://hl7-fhir.github.io/formats.html#choice

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:28):

i'm trying to figure out what that tells the person reading the XML doc.

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:30):

i guess the interpretation is that the FHIR data model permits either MedicationOrder.asNeededBoolean or MedicationOrder.asNeededCodeableConcept , nothing called MedicationOrder.asNeeded[x]

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:31):

that's one way to interpret- an xs:choice. or you can treat it as polymorphic with constraints on the type

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:31):

RDF, it's 2 properties with a choice rule

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:32):

RDF isn't different from XML or JSON in this regard, right?

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:32):

no

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:32):

actually. hang on

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:33):

fhir:Observation.value [
a fhir:Quantity;

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:33):

yes, it's different. We make it a single property and say it can have multiple types

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:36):

is that delta from XML and JSON useful?

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:38):

yes, I think it is.

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:38):

so far the ITS/COI task force has said you only need a type arc on the resource; that the rest of the type arcs can be inferred from RDFS

view this post on Zulip Grahame Grieve (Mar 29 2016 at 07:39):

none of that sentence made any sense to me

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:42):

DiagnosticOrder.specimen and DiagnosticReport.specimen are the same thing and could easily be the same property.

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 07:43):

There are a whole lot of properties in different resources that could be considered to be the same property, but the current authoring mechanism doesn't capture that info. Lloyd said he'd like to extend that in the future. We can use the same mechanism to say that asNeededBoolean and asNeeded are subproperties of asNeeded.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 08:45):

DiagnosticOrder.specimen and DiagnosticReport.specimen - maybe, but there's no way to know that, even in principle, that's a hard thing to determine, unless we tie their definitions together. which the tooling exists to do, but hasn't been done

view this post on Zulip Grahame Grieve (Mar 29 2016 at 08:46):

I'm not familiar with the notion of sub-property

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:13):

the notion that it's better to have a single property rather than a choice of multiple properties.... I guess it's a question of how easy it is to select between different properties

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:13):

as it is, if you want to know whether an observation has a value, it's a queery for whether there's a value. but if you go for multiple properties, then it's multiple queries.

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:13):

how could you capture that currently and would it be sufficient to make ontological assertions, such as A samePropertyAs B or A subPropertyOf C. B subPropertyOf C?

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:14):

I kind of figured that sparql the balance was weighted to single property with types.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:14):

but how does json-ld handle poly-morphism? I bet it doesn't...

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:14):

what's a sub-property?

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:14):

not really, you end up doing a bit of extra writing with the same property

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:18):

Pchild rdfs:subPropertyOf Pparent means if (X Pchild Y) then X Pparent Y
x:hasMother rdfs:subPropertyOf x:hasParent + X x:hasMother Y => X x:hasParent Y

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:24):

ontologists prefer generic properties; SPARQL queries are a little easier with specific properties (saves a little typing). ultimately, i prefer using MedicationOrder.asNeededBoolean because it's less of a cognitive burden to translate between formats

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:25):

and it's how we've been doing it so far so everyone's bought into having discriminating properties

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:26):

it's a worry when searching for 'json polymorphism' leads you to your own blog

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:26):

doncha hate finding out you're the expert?

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:26):

umm, I'm not the expert

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:27):

anyway, since json-ld doesn't do polymorphic types, we shouldn't do them in rdf either

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:31):

JSON doesn't have polymorphic types, but JSON-LD does

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:31):

how?

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:32):

JSON-LD is just an RDF format. you can stick whatever inference you want on top.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:32):

I think it's not quite so simple.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:33):

how would you do a polymorphic type in json-ld?

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:33):

it's exactly the same as in Turtle or OWL Manchester syntax or whatever.

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:35):

people don't tend to write ontologies in json-ld but they certainly could. typically, instance data is separate from the ontology/schema/whatever you want to call it.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:35):

I thinky you'll find that there isn't a way to do polymoprhism in json-ld. In spite of what you say about this

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:35):

because it's not actually the same in the specific syntax

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:38):

if i'm feeding data to e.g. StarDog or GraphDB, i feed it the schema and some data and start doing queries. it doesn't matter whether that data came in as Turtle or JSON-LD.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:38):

no. but that means that json-ld is a subset of rdf, not that json-ld does everything rdf does

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:39):

once you parse JSON-LD into RDF, there's no way the graph even knows it came from JSON-LD

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:39):

so?

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 09:42):

none of Turtle, RDF/XML, JSON-LD, RDFa do any inference. they're just parsers. the inference is orthogonal. once it's a graph, you can do RDFS or OWL reasoning but the origin format of that graph doesn't matter.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 09:43):

so?

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 10:09):

i thought you were arguing that we couldn't benefit from subPropertyOf inferences in JSON-LD

view this post on Zulip Grahame Grieve (Mar 29 2016 at 10:10):

I'm not sure whether you can do subPropertyOf in json-ld

view this post on Zulip Grahame Grieve (Mar 29 2016 at 10:11):

what I was saying is that I'm sure that you can't have one property that can have different types in json

view this post on Zulip Grahame Grieve (Mar 29 2016 at 10:11):

I mean, json-ld

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 10:13):

i disagree, but i'm happy to disagree because i think we are both concluding that we want to use MedicationOrder.asNeededBoolean instead of MedicationOrder.asNeeded

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 10:13):

happy to agree to disagree

view this post on Zulip Grahame Grieve (Mar 29 2016 at 10:15):

I'm happy to be educated...

view this post on Zulip Michael van der Zel (Mar 29 2016 at 10:16):

Looking at the last message from Eric... Do I see it right that we are aligning xml/json and rdf now? So we will add the typename to the propertyname?

view this post on Zulip Grahame Grieve (Mar 29 2016 at 10:17):

for the ones that end in [x] yes

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 10:17):

that's my goal

view this post on Zulip Grahame Grieve (Mar 29 2016 at 10:17):

it sounds like it

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 10:18):

@Grahame Grieve re property with different types, i'll describe a bit of what you can/can't do and what's nice/non nice in OWL in a couple hours. gonna try to sleep a bit so i can keep my timezone in flux for the two days i'll be in europe.

view this post on Zulip Grahame Grieve (Mar 29 2016 at 10:21):

ok

view this post on Zulip Grahame Grieve (Mar 29 2016 at 11:27):

ok, committed an update to the rdf format - should be up on the site in 40min

view this post on Zulip Michael van der Zel (Mar 29 2016 at 14:14):

@Grahame Grieve What did you update? Are you talking about https://hl7-fhir.github.io/rdf.html?

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 14:15):

i think he updated examples

view this post on Zulip Eric Prud'hommeaux (Mar 29 2016 at 14:15):

(guessing -- didn't verify)

view this post on Zulip Grahame Grieve (Mar 29 2016 at 18:18):

yes

view this post on Zulip Michael van der Zel (Mar 29 2016 at 21:22):

Ok. Thanks. Have you had a chance to look at my generated ttl?

view this post on Zulip Grahame Grieve (Mar 29 2016 at 21:22):

not yet. too much going on

view this post on Zulip Michael van der Zel (Mar 29 2016 at 21:23):

Nop problem. Was just curious. Have to do some changes per above discussion still

view this post on Zulip David Booth (Mar 29 2016 at 21:23):

michael, want to join the FHIR RDF call now? Tuesdays 5:00pm Eastern US (Boston) time zone
Webex: https://mit.webex.com/mit/j.php?MTID=m5cd1bd8bb36825b9c4b369fd664bbb62
Teleconference: +1-617-324-0000 Access code: 645 777 110
Meeting password: 4257 ("HCLS")
IRC: irc.w3.org port 6665 channel #HCLS

view this post on Zulip Michael van der Zel (Mar 29 2016 at 21:24):

Sorry. Getting ready to go to bed now (almost midnight here). Will join sometime.

view this post on Zulip David Booth (Mar 29 2016 at 21:24):

ok :)

view this post on Zulip Michael van der Zel (Mar 29 2016 at 21:26):

Quickly looked at the example. @Grahame Grieve Why is the "a fhir:Quantity" removed with e.g. Observation.valueQuantity?

view this post on Zulip Michael van der Zel (Mar 29 2016 at 21:26):

TTYL

view this post on Zulip Grahame Grieve (Mar 29 2016 at 21:26):

because we changed to use valueQuantity instead of just value

view this post on Zulip Grahame Grieve (Mar 29 2016 at 21:26):

we no longer need to say what the type of it is


Last updated: Apr 12 2022 at 19:14 UTC