Record Class GeneratedAssertion

java.lang.Object
java.lang.Record
org.fhirfrog.frog.profilecompiler.model.GeneratedAssertion
Record Components:
path - the FHIR element path this check is about, resource-type-prefix stripped (e.g. "identifier", or a compiler-synthesized choice path like "onsetDateTime" - see algorithm.md §3.3)
resourceType - the profile's base resource type (e.g. "Patient")
fhirPath - the literal, self-contained FHIRPath boolean expression to assert
severity - Severity.ERROR if missing this fails the profile; Severity.WARNING if merely optional-but-unsupported
description - a short, human-readable statement of what this check verifies

public record GeneratedAssertion(String path, String resourceType, String fhirPath, Severity severity, String description) extends Record
One compiled, literal, per-instance FHIRPath check derived from a profile's must-support or mandatory-element requirements (algorithm.md §7, §5.11) - the compiler's actual output artifact. fhirPath is always evaluable against a single resource instance of resourceType; v1 deliberately does not emit Bundle-scoped/aggregate assertions (see design.md's spike finding).
  • Constructor Details

    • GeneratedAssertion

      public GeneratedAssertion(String path, String resourceType, String fhirPath, Severity severity, String description)
      Creates an instance of a GeneratedAssertion record class.
      Parameters:
      path - the value for the path record component
      resourceType - the value for the resourceType record component
      fhirPath - the value for the fhirPath record component
      severity - the value for the severity record component
      description - the value for the description 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.
    • path

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

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

      public String fhirPath()
      Returns the value of the fhirPath record component.
      Returns:
      the value of the fhirPath record component
    • severity

      public Severity severity()
      Returns the value of the severity record component.
      Returns:
      the value of the severity record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component