Stream: implementers
Topic: reference regex
Kevin Olbrich (Aug 24 2017 at 13:17):
Does the regex for validating references (see http://build.fhir.org/references.html#literal) actually exist anywhere in the json or xml download files? I'd like to use it in some generated code but it's FHIR version specific and I'd like to get the right one for the version I'm generating.
Michel Rutten (Aug 24 2017 at 13:37):
The center part of the expression represents a list of all resource names. You could generate it by enumerating the StructureDefinition resources in profiles-resources.xml.
Kevin Olbrich (Aug 24 2017 at 13:41):
Yeah, constructing it from scratch isn't that hard. After closer reading of this "Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach.", it seems to me that the regex is really just intended to be a helpful tool rather than an indication of the validity of the url.
Grahame Grieve (Aug 24 2017 at 21:07):
that's correct. It may become validating in some contexts but isn't in all cases
Last updated: Apr 12 2022 at 19:14 UTC