FHIR Chat · Profiling String character subset · implementers

Stream: implementers

Topic: Profiling String character subset


view this post on Zulip John Moehrke (Jun 28 2017 at 20:22):

Are there ways to profile the character restrictions on String for a specific element use? For example in a Provider Directory to restrict the email addresses to a subset of the "String" characters to the subset of characters allowed for email address (or even smaller subset due to organizational / technical restrictions)... An email address is a complex amalgamation of two totally different string constraints, joined by a "@". Or is this beyond our profiling ability, and thus it becomes a narrative SHALL statement with appropriate testing scenarios driven by the IG? I don't mind either answer, just don't want to spend energy where it is not possible.

view this post on Zulip Eric Haas (Jun 28 2017 at 20:22):

sound like a regex invariant

view this post on Zulip Grahame Grieve (Jun 28 2017 at 20:23):

yes. regex is easiest way. could add some fhirpath primitives for common unicode subranges - that's a bit hard in regex

view this post on Zulip John Moehrke (Jun 28 2017 at 20:32):

Yes, the email address standard is outright ugly. Many dragons. different for the local-part and the domain... BUT, domains tend to restrict the character set further because of organizational or technical reasons. For example most email platforms forbid some characters allowed by the standard. Some organizations choose to further refine due to internal processing or tools that are plugged into the email system. Hence any regex or fhirpath would be further refined. ---- But I picked on this one as a examplar of a more general need to subset the character set for the String datatype.

view this post on Zulip Lloyd McKenzie (Jun 28 2017 at 22:32):

We also have an extension for defining a regex on a data element. And I believe the validator supports it. http://hl7.org/fhir/extension-regex.html


Last updated: Apr 12 2022 at 19:14 UTC