Class EMediplanExtension

java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanExtension
All Implemented Interfaces:
EMediplanExtendable, EMediplanObject

public class EMediplanExtension extends Object implements EMediplanExtendable, EMediplanObject
Extensions can be used to include additional information within an eMediplan that is not explicitly modelled by the ChMed specification.
  • Field Details

    • name

      protected String name
      Name of the field. Mandatory.
    • value

      protected @Nullable String value
      The value of the field. Optional.
    • schema

      protected String schema
      The Schema. It can be any string and can be used to determine how to interpret the extension. It is mandatory.
    • extensions

      protected @Nullable List<@NonNull EMediplanExtension> extensions
      The list of nested extensions. Optional if empty.
  • Constructor Details

    • EMediplanExtension

      public EMediplanExtension()
  • Method Details

    • getExtensions

      public List<@NonNull EMediplanExtension> getExtensions()
      Description copied from interface: EMediplanExtendable
      Gets the list of this object's extensions.
      Specified by:
      getExtensions in interface EMediplanExtendable
      Returns:
      The list of extensions.
    • validate

      public ValidationResult validate(@Nullable String basePath)
      Description copied from interface: EMediplanObject
      Validates the eMediplan object, without any further context than its JSON path and its own content, against the eMediplan specs.
      Specified by:
      validate in interface EMediplanObject
      Parameters:
      basePath - The JSON path of this object. If null, the object is considered to be root. Any validation issues produced by the validation will use this path as a base for each issue's path.
      Returns:
      The validation result containing all the encountered validation issues, if any.
    • findExtension

      @ExpectsValidResource public static @Nullable EMediplanExtension findExtension(@Nullable List<@NonNull EMediplanExtension> extensions, String schema, String name)
      Finds an extension within the provided list of extensions whose schema and name match the provided ones. If the list of extensions is null or empty, or if no match is found, null is returned.
      Parameters:
      extensions - The list of extensions within to perform the search.
      schema - The schema to be matched.
      name - The field name to be matched.
      Returns:
      The matching extension, if any, null otherwise.