From 1321ae421e8e5d08e9a5152874a7d0a8c35875dc Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 19 Nov 2024 07:42:18 +1100 Subject: [PATCH] Fix for illegal names in profiles when code generating --- .../java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java index 8abcf88f0..a65e62e9d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/profilemodel/gen/PECodeGenerator.java @@ -343,6 +343,7 @@ public class PECodeGenerator { } return null; } + private void defineField(PEDefinition source, PEDefinition field) { if (field.types().size() == 1) { StructureDefinition sd = workerContext.fetchTypeDefinition(field.types().get(0).getUrl()); @@ -846,7 +847,7 @@ public class PECodeGenerator { private PEGenClass genClass(PEDefinition source) { PEGenClass cls = new PEGenClass(); - cls.name = source.getProfile().getName(); + cls.name = Utilities.javaTokenize(source.getProfile().getName(), true); cls.base = source.getProfile().getType(); cls.doco = source.documentation(); cls.url = source.getProfile().getVersionedUrl();