FHIR Chat · Best practice for pattern validated codes · conformance

Stream: conformance

Topic: Best practice for pattern validated codes


view this post on Zulip Simone Heckmann (Nov 07 2017 at 16:09):

We're in a situation where we need to create extensions to capture coded information of which we have both very little knowledge about the semantics of the codes nor control over them. Maintaining ValueSet definitions for those codes seems to be more trouble than it's worth.
However we do know the patterns used in the XML source format to validate these codes.

So we can at least provide the same level of validation. What I am wondering about though, is whether it's prudent to use valueCode in these cases.
Is a data type of code without any binding and only a pattern for validation even legitimate? Or should we use valueString instead?

The constraints for code would apply here as well: no trailing whitespace + the codesystem is implicitly known. It's just not known as a FHIR ValueSet, we could bind to.

view this post on Zulip Richard Townley-O'Neill (Nov 08 2017 at 02:24):

If you cannot trust them to use codes nicely (e.g. not to reuse codes with different meanings. Or to be careful with versioning.) it might be best to treat them as strings.


Last updated: Apr 12 2022 at 19:14 UTC