Record Class AccidentExtension

java.lang.Object
java.lang.Record
de.gematik.test.erezept.fhir.extensions.kbv.AccidentExtension

public record AccidentExtension(AccidentCauseType accidentCauseType, @Nullable Date accidentDay, @Nullable String workplace) extends Record
  • Constructor Details

    • AccidentExtension

      public AccidentExtension(AccidentCauseType accidentCauseType, @Nullable Date accidentDay, @Nullable String workplace)
      Creates an instance of a AccidentExtension record class.
      Parameters:
      accidentCauseType - the value for the accidentCauseType record component
      accidentDay - the value for the accidentDay record component
      workplace - the value for the workplace record component
  • Method Details

    • asExtension

      public org.hl7.fhir.r4.model.Extension asExtension()
    • asExtension

      public org.hl7.fhir.r4.model.Extension asExtension(KbvItaErpVersion version)
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • faker

      public static AccidentExtension faker()
    • faker

      public static AccidentExtension faker(AccidentCauseType type)
    • accident

      public static AccidentExtension accident()
    • accident

      public static AccidentExtension accident(Date accidentDay)
      Creates a "normal" accident extension with the given date as the day of the accident
      Parameters:
      accidentDay - is the day of the accident
      Returns:
      AccidentExtension
    • accidentAtWork

      public static AccidentExtension.AccidentAtWorkBuilder accidentAtWork()
    • accidentAtWork

      public static AccidentExtension.AccidentAtWorkBuilder accidentAtWork(Date accidentDay)
    • occupationalDisease

      public static AccidentExtension occupationalDisease()
    • fromExtension

      public static AccidentExtension fromExtension(org.hl7.fhir.r4.model.Extension extension)
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • accidentCauseType

      public AccidentCauseType accidentCauseType()
      Returns the value of the accidentCauseType record component.
      Returns:
      the value of the accidentCauseType record component
    • accidentDay

      @Nullable public Date accidentDay()
      Returns the value of the accidentDay record component.
      Returns:
      the value of the accidentDay record component
    • workplace

      @Nullable public String workplace()
      Returns the value of the workplace record component.
      Returns:
      the value of the workplace record component