From 900faa2450f91d5e203dfaf19cf8276eeed421d8 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 21 Mar 2023 06:12:16 +1100 Subject: [PATCH] part of fix for type checking --- .../org/hl7/fhir/r5/model/StructureDefinition.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java index 0861ad248..0d532e830 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/StructureDefinition.java @@ -1245,6 +1245,20 @@ public class StructureDefinition extends CanonicalResource { return null; } + + public ElementDefinition getElementById(String id) { + if (id == null) { + return null; + } + for (ElementDefinition ed : getElement()) { + if (id.equals(ed.getId())) { + return ed; + } + } + return null; + } + + // end addition }