Record Class ProfileRequirements

java.lang.Object
java.lang.Record
org.fhirfrog.frog.profilecompiler.model.ProfileRequirements
Record Components:
mandatoryElementPaths - every element path (not id) with min > 0 in the snapshot, per algorithm.md §4 - kept for descriptive/diagnostic use; slice and choice mandatory-ness is decided per-item from that item's own element, not by looking paths up in this set (see design.md's "mandatory-elements-by-path is ambiguous for slices" note)

public record ProfileRequirements(String resourceType, String profileUrl, List<MustSupportExtension> extensions, List<SliceRequirement> slices, List<ChoiceTypeMustSupportElement> choiceElements, List<PlainMustSupportElement> plainElements, Set<String> mandatoryElementPaths) extends Record
The full must-support/mandatory derivation for one profile (algorithm.md §2/§3/§4), before compilation to literal FHIRPath. Deliberately does not carry a bindings or references bucket - both are out of scope for v1 (design.md's Decisions; algorithm.md §5/§6 have no found consumer or aren't needed for the per-instance must-support/mandatory case).
  • Constructor Details

    • ProfileRequirements

      public ProfileRequirements(String resourceType, String profileUrl, List<MustSupportExtension> extensions, List<SliceRequirement> slices, List<ChoiceTypeMustSupportElement> choiceElements, List<PlainMustSupportElement> plainElements, Set<String> mandatoryElementPaths)
      Creates an instance of a ProfileRequirements record class.
      Parameters:
      resourceType - the value for the resourceType record component
      profileUrl - the value for the profileUrl record component
      extensions - the value for the extensions record component
      slices - the value for the slices record component
      choiceElements - the value for the choiceElements record component
      plainElements - the value for the plainElements record component
      mandatoryElementPaths - the value for the mandatoryElementPaths 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. 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.
    • resourceType

      public String resourceType()
      Returns the value of the resourceType record component.
      Returns:
      the value of the resourceType record component
    • profileUrl

      public String profileUrl()
      Returns the value of the profileUrl record component.
      Returns:
      the value of the profileUrl record component
    • extensions

      public List<MustSupportExtension> extensions()
      Returns the value of the extensions record component.
      Returns:
      the value of the extensions record component
    • slices

      public List<SliceRequirement> slices()
      Returns the value of the slices record component.
      Returns:
      the value of the slices record component
    • choiceElements

      public List<ChoiceTypeMustSupportElement> choiceElements()
      Returns the value of the choiceElements record component.
      Returns:
      the value of the choiceElements record component
    • plainElements

      public List<PlainMustSupportElement> plainElements()
      Returns the value of the plainElements record component.
      Returns:
      the value of the plainElements record component
    • mandatoryElementPaths

      public Set<String> mandatoryElementPaths()
      Returns the value of the mandatoryElementPaths record component.
      Returns:
      the value of the mandatoryElementPaths record component