FHIR Chat · Removing StructureDefinition.contextType · implementers

Stream: implementers

Topic: Removing StructureDefinition.contextType


view this post on Zulip Grahame Grieve (Feb 28 2018 at 15:38):

So I had a go at removing this... it's not so easy. There's kind of 2 problems:
- the FHIRPath for type testing is problematic.
- it's much harder for me to build the spec

view this post on Zulip Grahame Grieve (Feb 28 2018 at 15:39):

at the moment, I categorise extensions based on their context type and the string of the context.... it can be
- extension + uri
- type + a type name or a path into a type
- resource + a resource name or a path into a resource.

view this post on Zulip Grahame Grieve (Feb 28 2018 at 15:41):

see:
- contextType = extension: fhirpath = extension('uri')
- contextType = type: fhirpath = %this is [type], but a path into type... don't know how to do that..
- context type = resource - that's a straight forward fhirpath.... except that I have to process it to decide what possible paths could match, for indexing... I think I can do that... but I haven't tried because the type thing made me scared.

view this post on Zulip Grahame Grieve (Feb 28 2018 at 15:42):

@Lloyd McKenzie I kept wanting to bring back type... it's so much simpler.... maybe just repeat context type with context

view this post on Zulip Grahame Grieve (Feb 28 2018 at 15:54):

there's a related issue: both ElementDefinition.fixed[x] etc and Extension.value have a type of * - so the same list of possible types... I do not think that this is what we want.

view this post on Zulip Lloyd McKenzie (Feb 28 2018 at 16:42):

I'm fine with type if it's as part of a pair with context

view this post on Zulip Michel Rutten (Feb 28 2018 at 16:54):

but a path into type... don't know how to do that..

Hmm, the expression would need to verify that some (grand)parent element has the correct datatype, and that the relative path from below that node matches some specific path given by the expression. But (standard) fhirpath has no notion of element types...?

view this post on Zulip Grahame Grieve (Feb 28 2018 at 21:20):

fhirpath does have the notion of element type, but it is hard. And obtuse...

view this post on Zulip Grahame Grieve (Feb 28 2018 at 23:25):

@Ewout Kramer @Josh Mandel @Lloyd McKenzie so I propose to turn it into a repeating pair instead of removing context. And change it a little:
- type = extension, context is a url
- element id = context is an id that matches an elementdefinition.id
- path - context is a FHIRPath

view this post on Zulip Lloyd McKenzie (Feb 28 2018 at 23:32):

ok

view this post on Zulip Grahame Grieve (Mar 01 2018 at 23:40):

ok. reorganized, and got the build working again.

view this post on Zulip Grahame Grieve (Mar 02 2018 at 01:56):

.... and now it's built.... @Lloyd McKenzie you can check that

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 02:08):

Not clear on what I'm being asked to check?

view this post on Zulip Grahame Grieve (Mar 02 2018 at 07:04):

the new set up for StructureDefinition.context: http://build.fhir.org/structuredefinition-definitions.html#StructureDefinition.context

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 15:04):

The display names for contextType don't match the new codes & definitions

view this post on Zulip Grahame Grieve (Mar 02 2018 at 20:14):

where? look ok to me...

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 20:17):

Here: http://build.fhir.org/valueset-extension-context-type.html
element is called Datatype and fhirPath is called Resource

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 20:18):

The other question is whether elementId includes the possibility of sliced elementIds or not

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 20:18):

(And if not, how is elementId not a subset of fhirPath?)

view this post on Zulip Grahame Grieve (Mar 02 2018 at 20:28):

fixed. it differs from FHIRPath in 3 ways:
- includes slicing identifiers
- can start with a data type
- is limited to a very simple subset

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 21:05):

So how do we declare the profile that applies if we're allowing slice names in the Element id?

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 21:05):

(And I didn't realize that FHIRPath couldn't start with a data type)

view this post on Zulip Grahame Grieve (Mar 02 2018 at 21:20):

prefix with a profile uri#elementid

view this post on Zulip Lloyd McKenzie (Mar 02 2018 at 22:45):

That's not clear from the description

view this post on Zulip Michel Rutten (Mar 05 2018 at 10:05):

Looks good, I'm OK with the proposed change. Let's try to provide detailed description of these rules and preferably some examples in the spec.


Last updated: Apr 12 2022 at 19:14 UTC