Stream: implementers
Topic: Forge R4 and naming conventions
Katarina (Jul 15 2019 at 12:30):
When I create a StructureDefinietion (Profil or Extension) in Forge R4 with a name that incluses "-" or starts with Lower Case Letter I get the following error, see Error.png . That is different to the naming convention [context]-[name] (https://api.simplifier.net/guide/profilingacademy/Best-practices). Is this a bug in forge or are there new naming conventions?
Lloyd McKenzie (Jul 15 2019 at 14:51):
New naming conventions enforced R4 and on.
Katarina (Jul 15 2019 at 15:03):
Where can I find the new naming conventions?
John Moehrke (Jul 15 2019 at 15:08):
Note that Forge does complain improperly about the use of the "_" character in the name. I have reported this and it is recorded as an issue to be fixed.
John Moehrke (Jul 15 2019 at 15:08):
http://build.fhir.org/structuredefinition-definitions.html#StructureDefinition.name
Lloyd McKenzie (Jul 15 2019 at 15:13):
Specifically, constraint eld-19 http://build.fhir.org/elementdefinition#constraints
Katarina (Jul 15 2019 at 15:28):
So when Forge complains about a name including "-" or starting with a lower case letter its a bug in Forge and has nothing to do with new naming conventions?
John Moehrke (Jul 15 2019 at 15:30):
a dash is not allowed anymore in R4, it was allowed in STU3
John Moehrke (Jul 15 2019 at 15:30):
but an "_" underbar is still valid, but Forge complains.
John Moehrke (Jul 15 2019 at 15:31):
Name must start with an uppercase character --- name.matches('A-Z{0,254}')
Katarina (Jul 16 2019 at 08:15):
Thank you. I wonder why, for example the R4 FHIR extension http://hl7.org/fhir/StructureDefinition/condition-dueTo has "dueTo" as value for name then?
Lloyd McKenzie (Jul 16 2019 at 14:11):
Good point. Can you submit a change request for us to revisit those?
Michel Rutten (Jul 16 2019 at 15:46):
Thank you for reporting this. Looks like I need to update the implementation of validation rule sdf-19 in Forge R4 to support the new regex. I'll fix this in the next update.
Katarina (Jul 17 2019 at 14:46):
Thank you. One last question, just to be sure. Does name.matches('A-Z{0,254}') apply to all types of resources? Also for CodeSystems, SearchParameters, ...?
Lloyd McKenzie (Jul 17 2019 at 16:25):
Yes
Katarina (Jul 19 2019 at 14:14):
What was the motivation behind new naming rules and regex?
How do I submit a change request?
Lloyd McKenzie (Jul 19 2019 at 14:20):
The purpose of 'name' is to provide a computable name for use when doing code generation. '-' is a prohibited character in class names in several languages. Originally 'name' was a human friendly name, but then we added 'title' for that purpose. The Regex is to enforce that the 'name' is truly a computer-friendly name.
Lloyd McKenzie (Jul 19 2019 at 14:21):
To submit a change request, click on the "propose a change" link at the bottom of any page in the spec. You'll need to do a one-time (free) registration. Once we confirm you're a real human, you should be able to submit changes.
Katarina (Jul 19 2019 at 14:23):
Great, thank you.
Last updated: Apr 12 2022 at 19:14 UTC