Stream: shorthand
Topic: Naming issues
Richard Kavanagh (May 11 2020 at 08:27):
I tried to create CodeSystem using FSH with the following
CodeSystem: CodeSystem-MaritalStatus
This threw an error, reporting the following (note the typo - repeating 'of')
error The string "CodeSystem-MaritalStatus" does not represent a valid FHIR name. Valid names start with an upper-case ASCII letter ('A'..'Z') followed by any combination of of upper- or lower-case ASCII letters ('A'..'Z', and 'a'..'z'), numerals ('0'..'9') and '_', with a length limit of 255 characters.
I'd missed the invariant introduced in R4 (which is at level warning). So I amended the name to the following
CodeSystem: CodeSystem_MaritalStatus
This still threw an error with the following - which does not appear to be correct
error The string "CodeSystem_MaritalStatus" does not represent a valid FHIR id. FHIR ids may contain any combination of upper- or lower-case ASCII letters ('A'..'Z', and 'a'..'z'), numerals ('0'..'9'), '-' and '.', with a length limit of 64 characters.
I assume this is an error? For info, I am on SUSHI v0.12.5
Richard Kavanagh (May 11 2020 at 09:29):
Ahh - looking further it would appear that the issue is at my end... :grimacing:
I have raised an issue on GitHub for the typo
Chris Moesel (May 11 2020 at 13:26):
It looks like Richard figured it out, but for those who stumble on this later... if you don't explicitly state an Id:
, then SUSHI will default the id to be the same as what you stated as Name:
. Since id
and name
have slightly different rules regarding allowed characters, however, this can sometimes cause conflicts which force you to have to explicitly declare the Id:
as well.
David Hay (May 11 2020 at 18:09):
Actually - would be good if the SUSHI spec was more explicit about that...
Last updated: Apr 12 2022 at 19:14 UTC