FHIR Chat · ValueSet expansion id behavior · implementers

Stream: implementers

Topic: ValueSet expansion id behavior


view this post on Zulip Alexander Henket (Jul 18 2016 at 12:42):

When you ask for an expansion of a ValueSet then:

- ValueSet.id SHOULD be a uuid to allow receivers to track a particular expansion (http://hl7-fhir.github.io/valueset-operations.html#expand)

- ValueSet.identifier SHOULD be what? Definition: "Additional identifier for the value set"
- ValueSet.expansion.identifier SHOULD be what? Definition: "Uniquely identifies this expansion"

It occurs to me that ValueSet.expansion.identifier is in fact a duplicate of ValueSet.identifier, and because of the nature of expansions, ValueSet.identifier in turn is duplicating ValueSet.id.

So should, for expansion, the ValueSet.identifier and ValueSet.expansion.identifier be populated at all?

view this post on Zulip Alexander Henket (Jul 18 2016 at 12:49):

Second thing: if you picture a system that at some interval asks for expansions of a ValueSet, what happens when you retrieve a new expansion for the same logical ValueSet when every expansion has a shiny new UUID?

I am asking because we supply Bundles with expansions for all relevant ValueSets in a paricular use case. How would an implementer know that expansion X1 is of logical valueset Y so that upon receiving expansion X2 of valueset Y, he knows that he needs to update X1 in his system?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 12:52):

you missed canonical URL which si that most important thing

view this post on Zulip Grahame Grieve (Jul 18 2016 at 12:52):

canonical URL and identifier have the same scope, but identifier is used for non-FHIR usage

view this post on Zulip Grahame Grieve (Jul 18 2016 at 12:53):

.expansion.id you can reuse as long as the expansion is identical.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 12:53):

I don't remember what I do with ValueSet.id on return

view this post on Zulip Alexander Henket (Jul 18 2016 at 12:58):

Canonical URL always points to the object it is on right? But if the object is a runtime generated object (expansion), then the canonical URL also shall be of the expansion, not of the definitional valueset it was generated from?

view this post on Zulip Alexander Henket (Jul 18 2016 at 13:00):

Suppose what you say is right then both ValueSet.identifier and ValueSet.url SHALL be of the definitional valueset (intensional/extensional) which makes them behave differently on ValueSet expansions then on any other FHIR resource as far as I can tell

view this post on Zulip Alexander Henket (Jul 18 2016 at 13:01):

(ValueSet.id is 'defined' in the examples under http://hl7-fhir.github.io/valueset-operations.html#expand in an XML comment :-) as "<!-- the server SHOULD populate the id with a newly created UUID so clients can easily track a particular expansion -->")

view this post on Zulip Alexander Henket (Jul 18 2016 at 13:05):

Your system (http://fhir-dev.healthintersections.com.au/open/ValueSet/v2-0354/$expand):
- Does not do ValueSet.id
- Gives the definitional ValueSet.identifier (e.g. <url value="http://hl7.org/fhir/ValueSet/v2-0354"/>)
- Gives the expansion UUID in ValueSet.expansion.identifier (e.g. <identifier value="urn:uuid:0ea43aa0-d645-41c2-b77c-a05679abe78b"/>)

view this post on Zulip Alexander Henket (Jul 18 2016 at 13:22):

canonical URL and identifier have the same scope, but identifier is used for non-FHIR usage

This also raises an interesting question: I can find no text that says that a canonical URL needs to resolve to somewhere although there is a preference it does. But more importantly: I cannot find any text that says that *if* it resolves *then* it SHALL be a FHIR endpoint. Background: we offer a service that produces FHIR STU2 compatible ValueSet expansions, but not on a FHIR Terminology Services endpoint.

view this post on Zulip Alexander Henket (Jul 18 2016 at 19:45):

Created GF#10375

view this post on Zulip Grahame Grieve (Jul 18 2016 at 21:07):

hang on! too quick! I'll get to this, but I've been asleep and on the phone....

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:04):

O I wasn't trying to bypass you. I thought you would actually appreciate the task. Sorry I've already created it. I can withdraw if we get closure here, but I believe some enhancement text is in order anyhow.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:05):

having a task is not a problem, but I think had we waited it, it would have been more precise

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:06):

Ah. Ok let's give that a try, and I can withdraw and open a new one that aims for just that

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:07):

so, the canonical URL and the identifier both identify the value set object. That is, whether you have a cld or an expansion, it's still the same value set

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:07):

So the basic question is better guidance on these paths:
- ValueSet.id
- ValueSet.identifier -- Shall be that of the definitional ValueSet
- ValueSet.url -- Shall be that of the definitional ValueSet
- ValueSet.expansion.identifier

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:08):

ValueSet.expansion.id identifies a specific expansion of the value set - may be filtered, a particular page in a paged view, and is subject to expansion conditions

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:08):

a terminology server might re-issue an expansion with the same expansion id, but it must be identical

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:09):

And ValueSet.id == ValueSet.expansion.identifier? At least according to current guidance it appears to be

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:09):

ValueSet.id is the local identifier for the resource. In an expansion response, I'd expect that to blank, unles a GET ValueSet/[id] returns the same expansion

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:09):

so, no, not necessarily the same

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:10):

though I'm not sure when it would be different as opposed to missing. I'll have to think through scenarios on that

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:10):

So how would you read this then: http://hl7-fhir.github.io/valueset-operations.html#expand

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:10):

-- ValueSet.id SHOULD be a uuid to allow receivers to track a particular expansion

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:10):

Is that remark not accurate?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:11):

I think that should say 'ValueSet.expansion.id"

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:12):

where is that remark? I don't see it

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:13):

It is an xml comment in the Response example

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:14):

ah

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:14):

I think it's wrong.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:14):

should be on expansion.id

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:14):

Right. So I think I am clear on where we're heading. Just one thing that hunts my mind: the .identifier and .url in any resource points to the object it is on. In an expansion it points to a different object (the definitional ValueSet). Isn't that inconsistent?

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:19):

And to summarize where we go so far:

On a ValueSet expansion:
- ValueSet.id -- leave empty unless one can retrieve the exact same expansion under that id
- ValueSet.identifier -- SHALL be that of the definitional ValueSet
- ValueSet.url -- SHALL be that of the definitional ValueSet
- ValueSet.expansion.identifier -- SHOULD be a uuid to allow receivers to track a particular expansion

I would prefer SHALL on that last one.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:22):

- ValueSet.identifier -- SHALL be that of the definitional ValueSet
- ValueSet.url -- SHALL be that of the definitional ValueSet

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:22):

not quite

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:23):

- ValueSet.identifier -- SHALL be that of the master ValueSet
- ValueSet.url -- SHALL be that of the master ValueSet

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:23):

the master may just be an expansion. I think that's terrible practice, myself, and you may happily not have that practice, but there's plenty of legacy value sets where that will be true

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:23):

if you asume that you always have a definition, then you're correct

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:45):

Fair enough. I did not think of expansion on expansion, but I guess it is possible. Leaves the disjunct between how .identifier/.url normally behave and how they behave on expansion. Would you say that is inconsistent or how would you explain it is not?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 22:50):

what's the disjuncture?

view this post on Zulip Alexander Henket (Jul 18 2016 at 22:58):

the .identifier and .url in any resource points to the object it is on. In an expansion it points to a different object (the definitional/master ValueSet). Isn't that inconsistent?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:02):

the url identifies the master definition. An expansion is still derived from the master value set, and an expression of it. So I don't think it's inconsistent. The canonical URL points to the underling idea, not any particular instantiation of it

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:04):

I was afraid you were going to say that. So an expansion cannot have its own identifier, nor url. So what about that awful use case you'd rather not see: the expansion that does not have a definition?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:06):

well, presumably, that expansion is a proxy for the definition. So any subset of the expansion is still the same thing - a form of expression of the underyling idea.

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:08):

Maybe yes maybe no. How about when I use that expansion without definition in an ImplementationGuide? Would I not need a canonical id/identifier/url for that ValueSet except that it cannot have one?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:10):

'cannot have one'?

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:11):

Admitted, we established id is possible, but url and identifier are not. However id is not the same as a canonical thing. It varies from server to server.

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:12):

url and identifier are not possible because there is no definitional valueset to point to.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:12):

I haven't said that, and wouldn't have

view this post on Zulip Jim Steel (Jul 18 2016 at 23:13):

I'm confused. How can one have an expansion without a valueset?

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:14):

Well maybe because the definitional ValueSet does not exist in the FHIR space?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:14):

no, the right question is, 'how can I have an expansion without also *me* having the the definition". And the answer is, if someone has it but didn't share it with you

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:14):

That sounds like a good second reason

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:15):

but the thought experiment is worthwhile: there is an idea somewhere, and that has the canonical URL, so an expansion only value set does

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:18):

Where you still chewing on that sentence or was that a finished statement? If it was, then who would be in charge of adding the canonical URL for the "idea" on that expansion?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:19):

whoever owns the original expansion.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:20):

VSAC, for instance, that only has expansions. Or at least, that's what they had till recently

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:21):

I'm still puzzled by the idea that the canonical URL on an expansion points to a different object than the thing it is on.

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:24):

A derivative object and the object it is derived from, in my mind means we have 2 objects. Just like a profile on Patient receives a different canonical URL from a profile that is based on that profile.

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:26):

If the canonical URL for and expansion would be [canonical URL of master]/$expand

I would be less puzzled.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:31):

I think you're confused between ValueSet.id and ValueSet.url. The id does change as the object is cloned or new related objects are derived from it.

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:31):

it's the thing that identifies the object

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:32):

So it is wrong to assume that two objects carrying the same canonical URL will be the same and resolve to the same object?

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:32):

we do not have 'expansion' as a concept on StructureDefinition, so there is no direct parallel. if we somehow defined conditions where the snapshot could be generated differently under different circumstances, then we'd be having the same dicussion about StructureDefinition

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:33):

yes. not necessarily the same *object*

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:33):

but must the same underling idea

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:35):

I'm sorry but that idea doesn't come to me naturally. I should probably sleep on it since it is 01:34 here. What shall I do with the other things? Just update the existing tracker item with the summary or withdraw that and create a new one? Main goal is additional guidance along the lines of what we discussed

view this post on Zulip Grahame Grieve (Jul 18 2016 at 23:36):

note sure. I'll think on that while you sleep

view this post on Zulip Alexander Henket (Jul 18 2016 at 23:37):

:-) ttyl

view this post on Zulip Alexander Henket (Jul 19 2016 at 12:20):

Back online. My sleep did not bring new insights, other than a clear head. Did you reach any conclusions?

view this post on Zulip Grahame Grieve (Jul 19 2016 at 12:23):

well no one else said anything. let me try something

view this post on Zulip Grahame Grieve (Jul 19 2016 at 12:24):

see the terminology stream

view this post on Zulip Alexander Henket (Jul 19 2016 at 16:08):

Continuing conversation in https://chat.fhir.org/#narrow/stream/terminology/subject/ValueSet.2Eurl.20and.20.2Eidentifier.20on.20expansions closing here.


Last updated: Apr 12 2022 at 19:14 UTC