FHIR Chat · Constraint on 'name' · committers

Stream: committers

Topic: Constraint on 'name'


view this post on Zulip Lloyd McKenzie (Mar 16 2019 at 03:02):

Right now, the 'name' element in Meta (which gets inherited all over) has a constraint expression that says: "name.matches('A-Z{0,254}')", It doesn't allow for the possibility that name might not be present at all - which is legitimate for most of our infrastructure resources. 'name' is a computable class name and it doesn't necessarily make sense for all Questionnaires, Valuesets, etc. to have one of those. Right now, the absense of a name triggers a warning that the name must match the regex - even when there isn't a name.

view this post on Zulip Lloyd McKenzie (Mar 16 2019 at 03:04):

I think it should be a technical correction to R4 to revise the invariant to say "name.exists() implies name.matches('A-Z{0,254}')" - i.e. only give the warning if a name is present. If the name has to be present (due to a tighter cardinality in the resource or a downstream profile), the invariant will still work.

view this post on Zulip Lloyd McKenzie (Mar 16 2019 at 03:04):

Thoughts?

view this post on Zulip Lloyd McKenzie (Mar 16 2019 at 03:04):

(Getting opinions before I submit a tracker item.)

view this post on Zulip Eric Haas (Mar 16 2019 at 15:16):

It’s not that challenging to create a name from the id. But I’ve got no dog in the hunt.

view this post on Zulip Lloyd McKenzie (Mar 16 2019 at 16:16):

It's not really a question about whether it's hard, it's about whether we should be spitting out a warning about a badly formatted name when the name is optional and has been omitted.


Last updated: Apr 12 2022 at 19:14 UTC