Record Class SliceRequirement.Pattern

java.lang.Object
java.lang.Record
org.fhirfrog.frog.profilecompiler.model.SliceRequirement.Pattern
All Implemented Interfaces:
SliceRequirement
Enclosing interface:
SliceRequirement

public static record SliceRequirement.Pattern(String sliceElementId, String sliceName, String baseElementPath, boolean mandatory, String discriminatorSubPath, PatternKind kind, String code, String system, boolean resolvedViaReferencedProfile) extends Record implements SliceRequirement
A slice identified by a single fixed/pattern value at the discriminator's sub-path (algorithm.md §3.2.1's patternCodeableConcept/patternCoding/ patternIdentifier branches). discriminatorSubPath is "" when the discriminator path was $this. For PatternKind.PATTERN_IDENTIFIER, code is always null - identity is carried by system alone, per algorithm.md §3.2.1's patternIdentifier branch. system may also be null for PatternKind.PATTERN_CODING/PatternKind.PATTERN_CODEABLE_CONCEPT when the source pattern didn't itself constrain a system.
  • Constructor Details

    • Pattern

      public Pattern(String sliceElementId, String sliceName, String baseElementPath, boolean mandatory, String discriminatorSubPath, PatternKind kind, String code, String system, boolean resolvedViaReferencedProfile)
      Creates an instance of a Pattern record class.
      Parameters:
      sliceElementId - the value for the sliceElementId record component
      sliceName - the value for the sliceName record component
      baseElementPath - the value for the baseElementPath record component
      mandatory - the value for the mandatory record component
      discriminatorSubPath - the value for the discriminatorSubPath record component
      kind - the value for the kind record component
      code - the value for the code record component
      system - the value for the system record component
      resolvedViaReferencedProfile - the value for the resolvedViaReferencedProfile record component
  • Method Details

    • toString

      public final 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
    • hashCode

      public final 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
    • equals

      public final 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • sliceElementId

      public String sliceElementId()
      Returns the value of the sliceElementId record component.
      Specified by:
      sliceElementId in interface SliceRequirement
      Returns:
      the value of the sliceElementId record component
    • sliceName

      public String sliceName()
      Returns the value of the sliceName record component.
      Specified by:
      sliceName in interface SliceRequirement
      Returns:
      the value of the sliceName record component
    • baseElementPath

      public String baseElementPath()
      Returns the value of the baseElementPath record component.
      Specified by:
      baseElementPath in interface SliceRequirement
      Returns:
      the value of the baseElementPath record component
    • mandatory

      public boolean mandatory()
      Returns the value of the mandatory record component.
      Specified by:
      mandatory in interface SliceRequirement
      Returns:
      the value of the mandatory record component
    • discriminatorSubPath

      public String discriminatorSubPath()
      Returns the value of the discriminatorSubPath record component.
      Returns:
      the value of the discriminatorSubPath record component
    • kind

      public PatternKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • code

      public String code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component
    • system

      public String system()
      Returns the value of the system record component.
      Returns:
      the value of the system record component
    • resolvedViaReferencedProfile

      public boolean resolvedViaReferencedProfile()
      Returns the value of the resolvedViaReferencedProfile record component.
      Returns:
      the value of the resolvedViaReferencedProfile record component