FHIR Chat · Resource.id Data Type · implementers

Stream: implementers

Topic: Resource.id Data Type


view this post on Zulip Md Nazrul Islam (Jan 18 2021 at 09:28):

As per documentation https://www.hl7.org/fhir/resource-definitions.html, Resource ID must be certain format and minimum 1 & maximum 64 characters.
As we have python implementation https://github.com/nazrulworld/fhir.resources/pull/48 , currently Resource.id datatype is string currently,
it is possible to use Id type but some tests are failing because some resources ID is longer than 64 (example resources).
My question here Resource.id value would always be 64 characters maximum in length or we should not add that constraint. ?

view this post on Zulip René Spronk (Jan 18 2021 at 09:37):

See https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Resource.2Eid.20restrictions , which discusses this very same topic.

view this post on Zulip Grahame Grieve (Jan 18 2021 at 11:32):

short answer: we're not going to change the 64 character limit

view this post on Zulip Cooper Thompson (Jan 18 2021 at 14:03):

Another short answer: not all systems generate ids within that 64 character limit...

view this post on Zulip René Spronk (Jan 18 2021 at 14:39):

short comment: hash them if too long

view this post on Zulip Md Nazrul Islam (Jan 18 2021 at 20:37):

Grahame Grieve said:

short answer: we're not going to change the 64 character limit

But I see https://www.hl7.org/fhir/R4/resource.profile.json.html here in profile description Ressource.id value is String @Grahame Grieve

view this post on Zulip Grahame Grieve (Jan 18 2021 at 21:07):

it is, but that doesn't change the fact that the length limit applies. @Cooper Thompson yes, that's a challenge, but we can't make it indefinite, and you only get out past 64 chars if you're doing some inefficient construction mechanism (inefficient in terms of entropy density), and anything beyond 64 chars is just trading between issues. however the 64 character limit is from an external standard

view this post on Zulip Lloyd McKenzie (Jan 18 2021 at 23:03):

The 64 character limit is also normative - so we're past the point where we can realistically change it.

view this post on Zulip Itay Goren (Jan 22 2021 at 14:20):

@Grahame Grieve what about changing the field type in the specification? it sounds like it indeed needs to be Resource.Id and not String.

view this post on Zulip Lloyd McKenzie (Jan 22 2021 at 14:34):

@Itay Goren change what?

view this post on Zulip Itay Goren (Jan 22 2021 at 15:05):

it says here https://www.hl7.org/fhir/R4/resource.profile.json.html that the type of Resource.id is String and not Id. Hence, any automated tool run on this specification, creates a different type.

view this post on Zulip Grahame Grieve (Feb 02 2021 at 21:33):

yes you could create a task to fix the value of the http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type extension to 'id'

view this post on Zulip Md Nazrul Islam (Feb 13 2021 at 11:16):

Thanks a lot for all clarifications. With the new release of the https://pypi.org/project/fhir.resources/6.1.0/ [Python implementation] now PrimitiveType.Id has a default behavior of a maximum of 64 characters but as a part developer's flexibility, it is possible to change the default behavior, for example allowing more characters, even possible to implement a new regex.
https://github.com/nazrulworld/fhir.resources#resourceid-aka-fhirtypesid-constraint-extensibility


Last updated: Apr 12 2022 at 19:14 UTC