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
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAccidentExtension(AccidentCauseType accidentCauseType, Date accidentDay, String workplace) Creates an instance of aAccidentExtensionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic AccidentExtensionaccident()static AccidentExtensionCreates a "normal" accident extension with the given date as the day of the accidentaccidentAtWork(Date accidentDay) Returns the value of theaccidentCauseTyperecord component.Returns the value of theaccidentDayrecord component.org.hl7.fhir.r4.model.Extensionorg.hl7.fhir.r4.model.ExtensionasExtension(KbvItaErpVersion version) booleanIndicates whether some other object is "equal to" this one.static AccidentExtensionfaker()static AccidentExtensionfaker(AccidentCauseType type) static AccidentExtensionfromExtension(org.hl7.fhir.r4.model.Extension extension) inthashCode()Returns a hash code value for this object.static AccidentExtensiontoString()Returns a string representation of this record class.Returns the value of theworkplacerecord component.
-
Constructor Details
-
AccidentExtension
public AccidentExtension(AccidentCauseType accidentCauseType, @Nullable Date accidentDay, @Nullable String workplace) Creates an instance of aAccidentExtensionrecord class.- Parameters:
accidentCauseType- the value for theaccidentCauseTyperecord componentaccidentDay- the value for theaccidentDayrecord componentworkplace- the value for theworkplacerecord component
-
-
Method Details
-
asExtension
public org.hl7.fhir.r4.model.Extension asExtension() -
asExtension
-
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. -
faker
-
faker
-
accident
-
accident
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
-
accidentAtWork
-
occupationalDisease
-
fromExtension
-
equals
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 withObjects::equals(Object,Object). -
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. -
accidentCauseType
Returns the value of theaccidentCauseTyperecord component.- Returns:
- the value of the
accidentCauseTyperecord component
-
accidentDay
Returns the value of theaccidentDayrecord component.- Returns:
- the value of the
accidentDayrecord component
-
workplace
Returns the value of theworkplacerecord component.- Returns:
- the value of the
workplacerecord component
-