Class ExtensionHelper

java.lang.Object
org.hl7.fhir.r4.model.ExtensionHelper

public class ExtensionHelper extends Object
in a language with helper classes, this would be a helper class (at least, the base exgtension helpers would be)
Author:
Grahame
  • Constructor Details

  • Method Details

    • hasExtension

      public static boolean hasExtension(Element element, String name)
      Parameters:
      name - the identity of the extension of interest
      Returns:
      true if the named extension is on this element. Will check modifier extensions too if appropriate
    • hasExtension

      public static boolean hasExtension(BackboneElement element, String name)
      Parameters:
      name - the identity of the extension of interest
      Returns:
      true if the named extension is on this element. Will check modifier extensions
    • getExtension

      public static Extension getExtension(Element element, String name)
      Parameters:
      name - the identity of the extension of interest
      Returns:
      The extension, if on this element, else null. will check modifier extensions too, if appropriate
    • getExtension

      public static Extension getExtension(DomainResource resource, String name)
      Parameters:
      name - the identity of the extension of interest
      Returns:
      The extension, if on this element, else null. will check modifier extensions too, if appropriate
    • getExtension

      public static Extension getExtension(BackboneElement element, String name)
      Parameters:
      name - the identity of the extension of interest
      Returns:
      The extension, if on this element, else null. will check modifier extensions too
    • setExtension

      public static void setExtension(Element element, boolean modifier, String uri, Type value) throws org.hl7.fhir.exceptions.FHIRException
      set the value of an extension on the element. if value == null, make sure it doesn't exist
      Parameters:
      element - - the element to act on. Can also be a backbone element
      modifier - - whether this is a modifier. Note that this is a definitional property of the extension; don't alternate
      uri - - the identifier for the extension
      value - - the value of the extension. Delete if this is null
      Throws:
      Exception - - if the modifier logic is incorrect
      org.hl7.fhir.exceptions.FHIRException
    • hasExtensions

      public static boolean hasExtensions(Element element)