FHIR Chat · datatype uuid and regex · implementers

Stream: implementers

Topic: datatype uuid and regex


view this post on Zulip Jens Villadsen (Mar 04 2020 at 23:51):

It does not look like there's a regex backing the uuid datatype from what I can read on http://hl7.org/fhir/datatypes.html#uuid. Is there any reason why this is indeed the case - that e.g. something like [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12} is not used?

view this post on Zulip Grahame Grieve (Mar 05 2020 at 00:18):

probably an oversifht

view this post on Zulip Jens Villadsen (Mar 05 2020 at 08:40):

I just need to know if I need to provide a FhirPath expression to the value or not in order to verify that the format of the UUID is conformant.

view this post on Zulip Jens Villadsen (Mar 05 2020 at 08:42):

And to complicate matters even more: https://stackoverflow.com/questions/136505/searching-for-uuids-in-text-with-regex/38191078#38191078

view this post on Zulip Grahame Grieve (Mar 05 2020 at 08:48):

the validator checks that it can convert the string into UUID

view this post on Zulip Grahame Grieve (Mar 05 2020 at 08:48):

so you don't need to

view this post on Zulip Jens Villadsen (Mar 05 2020 at 08:49):

and the same goes for FhirPath datatype casts?

view this post on Zulip Grahame Grieve (Mar 05 2020 at 08:49):

umm?

view this post on Zulip Jens Villadsen (Mar 05 2020 at 08:50):

hmmm ... that last part may not be necessary ... I'm not entirely done with the design ...

view this post on Zulip Jens Villadsen (Mar 05 2020 at 08:51):

But I need to verify that the UUID is a v5

view this post on Zulip Jens Villadsen (Mar 05 2020 at 08:51):

so I'll end up with a FhirPath match regardless

view this post on Zulip Jens Villadsen (Mar 05 2020 at 08:54):

FYI https://jira.hl7.org/browse/FHIR-26452


Last updated: Apr 12 2022 at 19:14 UTC