FHIR Chat · UUID and OIDs in Identifier type · implementers

Stream: implementers

Topic: UUID and OIDs in Identifier type


view this post on Zulip Rick Riemer (Apr 13 2016 at 10:34):

I'm implementing DocumentManifest resource support, and am wondering how UUIDs and OIDs should be encoded in the 'identifier' property. Should they be encoded in the Identifier type as a URN? So with the urn:uuid: and urn:oid: prefixes, or without the prefixes?

view this post on Zulip Rick Riemer (Apr 13 2016 at 11:09):

I might have solved the issue myself now that I read it again. From http://hl7.org/fhir/DSTU2/datatypes.html#Identifier:
"If the identifier itself is naturally globally unique (e.g. an OID, a UUID, or a URI with no trailing local part), then the system SHALL be "urn:ietf:rfc:3986", and the URI is in the value."

I think this says, that, since a UUID or OID is globally unique, it should be encoded as a URN, so with the prefix.

Do others read this in the same way?

view this post on Zulip Grahame Grieve (Apr 13 2016 at 11:45):

You're meant to read it that way

view this post on Zulip Michel Rutten (Apr 13 2016 at 11:49):

I must admit that I find the documentation a bit unclear on this point. Maybe we can improve the description and/or show an example of an OID-style Identifier?

view this post on Zulip John Moehrke (Apr 13 2016 at 11:56):

Showing an example would be nice. When working on the IHE MHD profile we had people confused by this too. People get confused by the system urn, and forget that they still need to uri encode their oid. Simple once you have seen it, but quite a few moving parts to catch on the first try.

view this post on Zulip Michel Rutten (Apr 13 2016 at 12:25):

Created a GForge issue #9813:
http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=9813

view this post on Zulip Lloyd McKenzie (Apr 13 2016 at 15:21):

Are you dealing with OIDs as systems or OIDs as identifier values? If the latter, you don't need to make them urns. If the former, seriously consider translating them to meaningful URIs. You'll make your developers (and all downstream support people) much happier. The NamingSystem resource can help you manage the translations

view this post on Zulip Grahame Grieve (Apr 13 2016 at 20:02):

@Lloyd McKenzie "If the latter, you don't need to make them urns" - umm, depends. In general, if you have an OID you are using as an identifier, then you do need to make it a urn

view this post on Zulip John Moehrke (Apr 13 2016 at 20:23):

we need clarity. My understanding is that with an OID, you must first convert it to a URI, and use the system of rfc 3986. Is this not correct?

view this post on Zulip Grahame Grieve (Apr 13 2016 at 20:27):

yes. there's one exception to this, where you deem the OIDS as part of another system, and use a different system. We've done this in one case; an IHE/DICOM code system

view this post on Zulip Lloyd McKenzie (Apr 13 2016 at 21:16):

@Grahame Grieve If your identifier is an OID, it'll appear in Identifier.value and doesn't need to be a URI. (You'll use "urn:ietf:rfc:3986" in the system). If your identifier namespace is an OID, it'll appear in Identifier.system as a URN, or could (and - in my opinion - ideally should) be converted to a URL or some sort of a meaningful identifier

view this post on Zulip Grahame Grieve (Apr 13 2016 at 21:16):

"If your identifier is an OID, it'll appear in Identifier.value and doesn't need to be a URI. (You'll use "urn:ietf:rfc:3986" in the system)" - wrong.

view this post on Zulip Grahame Grieve (Apr 13 2016 at 21:17):

quoting.... "If the identifier itself is naturally globally unique (e.g. an OID, a UUID, or a URI with no trailing local part), then the system SHALL be "urn:ietf:rfc:3986", and the URI is in the value"

view this post on Zulip Lloyd McKenzie (Apr 13 2016 at 21:20):

Isn't that what I just said?

view this post on Zulip Lloyd McKenzie (Apr 13 2016 at 21:21):

I.e. you'd have:
<identifier>
<system value="urn:ietf:rfc:3986"/>
<value value="2.15.398.2.7"/>
</identifier>
?

view this post on Zulip Grahame Grieve (Apr 13 2016 at 21:21):

you said 'doesn't need to be a URI' but if you use the "urn:ietf:rfc:3986" as the system, then it does, as it says, have to be a URI

view this post on Zulip Lloyd McKenzie (Apr 13 2016 at 21:21):

Ah

view this post on Zulip Lloyd McKenzie (Apr 13 2016 at 21:21):

I suppose it would.

view this post on Zulip Lloyd McKenzie (Apr 13 2016 at 21:21):

tx

view this post on Zulip Grahame Grieve (Apr 13 2016 at 21:21):

np

view this post on Zulip Grahame Grieve (Apr 13 2016 at 21:21):

hence, we obviously need to add an example

view this post on Zulip Rick Riemer (Apr 14 2016 at 09:56):

That was precisely the same mistake I made when reading it. I agree with what Graham says, so 'vote +1' for the example.

view this post on Zulip Michel Rutten (Apr 14 2016 at 11:25):

I'm still confused. If I understand RFC3986 correctly, then a URI must always have a "scheme:" prefix. This would imply that "2.15.398.2.7" is not a valid URI, because it doesn't have a scheme prefix?

view this post on Zulip Rick Riemer (Apr 14 2016 at 11:28):

Yes. All OIDs need to be prefixed with urn:oid: if the scheme is set to urn:ietf:rfc:3986.

view this post on Zulip Peter Scholz (Apr 14 2016 at 11:30):

Michel is definately right: an URI *must* contain a scheme otherwise it is no URI


Last updated: Apr 12 2022 at 19:14 UTC