Class EMediplanPostalAddress

java.lang.Object
org.projecthusky.fhir.emed.ch.epr.model.emediplan.EMediplanPostalAddress
All Implemented Interfaces:
EMediplanObject
Direct Known Subclasses:
ChMed16APostalAddress, ChMed23APostalAddress

public abstract class EMediplanPostalAddress extends Object implements EMediplanObject
  • Field Details

    • COUNTRY_CODE_PATTERN

      protected static final Pattern COUNTRY_CODE_PATTERN
  • Constructor Details

    • EMediplanPostalAddress

      public EMediplanPostalAddress()
  • Method Details

    • getStreet

      public abstract String getStreet()
    • getPostalCode

      public abstract String getPostalCode()
    • getCity

      public abstract String getCity()
    • getCountry

      public abstract @Nullable String getCountry()
    • setStreet

      public abstract void setStreet(@Nullable String street)
    • setPostalCode

      public abstract void setPostalCode(@Nullable String postalCode)
    • setCity

      public abstract void setCity(@Nullable String city)
    • setCountry

      public abstract void setCountry(@Nullable String country)
    • getStreetFieldName

      public abstract String getStreetFieldName()
    • getPostalCodeFieldName

      public abstract String getPostalCodeFieldName()
    • getCityFieldName

      public abstract String getCityFieldName()
    • getCountryFieldName

      public abstract String getCountryFieldName()
    • 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.
    • fromFhirAddress

      public static <T extends EMediplanPostalAddress> T fromFhirAddress(Supplier<T> addressSupplier, org.hl7.fhir.r4.model.Address fhirAddress)
      Fills the received (normally, new) eMediplan postal address object with the content of the received FHIR address.
      Type Parameters:
      T - The type of eMediplanPostalAddress object.
      Parameters:
      addressSupplier - A supplier for the eMediplan address to be filled.
      fhirAddress - The FHIR address with the postal address data.
      Returns:
      The mutated eMediplan address object.
    • toFhir

      @ExpectsValidResource public org.hl7.fhir.r4.model.Address toFhir()
    • hasExtensions

      public boolean hasExtensions(boolean inDepth)
      Description copied from interface: EMediplanObject
      Whether the eMediplan object has any extension or not.
      Specified by:
      hasExtensions in interface EMediplanObject
      Parameters:
      inDepth - If true, the called object, and all its children objects, are subject to the check. If false, only the called object is checked for extensions.
      Returns:
      true if the object contains any extensions; false otherwise.