Stream: implementers
Topic: About the special characters in URI, such as 'colon :'
Fan Lin (Aug 30 2017 at 14:11):
We wanted to use URI's as identifiers- but it seems current FHIR identifiers don't allow for characters like colon often used in URI's... Is it possible to override this somehow?
Alternatively, why don't we allow/encourage CURIE identifiers in FHIR (which enables URI's)? https://www.w3.org/TR/curie/
CURIEs is W3C standard like PROV used for provenance resource...
Lloyd McKenzie (Aug 30 2017 at 15:24):
Do you mean the "id" element or the Identifier.value element? The latter shouldn't have any restrictions. The former can't have URIs because it is itself used as part of a URI.
Fan Lin (Aug 30 2017 at 15:43):
In the URI , if we put the colon into the string , inusually it should be encode to UTF8
Fan Lin (Aug 30 2017 at 16:06):
I think what you means is the id is the part of URL ,it cannot support any special character that incompatible with browser and URL standard.
Question(2) is,that can each ID map to each identifier string ( the URN string), one-to-one correspondence? Could we assign this string to URL as the part of URL path string for replacing the id . If so ,we have to encode the special char .
Fan Lin (Aug 30 2017 at 16:15):
Question(3)- So, if our id is curie uri, what do you recommend?
Lloyd McKenzie (Aug 30 2017 at 18:45):
Our intention with the rules for "id" is to ensure that they work easily as part of a URL where we need them to appear and that they will also work well as primary keys in most database systems. That led to the constraints on the characters and lengths. So CURIE ids aren't going to work terribly well. You could certainly replace the non-permitted characters with permitted characters but I don't know you'll be able to go the other way - so you might have to define some escaping convention. And you may run into issues with the length limits.
Lloyd McKenzie (Aug 30 2017 at 18:46):
You may need to maintain a separate id and do a lookup.
Last updated: Apr 12 2022 at 19:14 UTC