Class QualifyingConditionCodesEligibility

  • All Implemented Interfaces:
    java.io.Serializable, IPlanEligibility

    public class QualifyingConditionCodesEligibility
    extends java.lang.Object
    implements IPlanEligibility
    An algorithm that defines the logic for eligibility based on a set of qualifying condition codes. The codes can either be input as seperated by "xxx|xxx" or can be input in a file with a heading "codes". This can be used to define Social Security eligibility, as described by: https://www.ssa.gov/disability/professionals/bluebook/AdultListings.htm Note that the SSD file (ssd_dsiabilities.csv) list is incomplete, some condtions are not currently simulated in Synthea.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getEarliestDiagnosis​(Person person)
      Gets the earliest occurrence of a qualifying condition that is active/present on the person.
      boolean isPersonEligible​(Person person, long time)
      Returns whether the given person meets the eligibility criteria of this algorithm at the given time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QualifyingConditionCodesEligibility

        public QualifyingConditionCodesEligibility​(java.lang.String codes)
        Constructor.
        Parameters:
        codes - The "|" delimited string or file of qualifying attributes.
    • Method Detail

      • isPersonEligible

        public boolean isPersonEligible​(Person person,
                                        long time)
        Description copied from interface: IPlanEligibility
        Returns whether the given person meets the eligibility criteria of this algorithm at the given time.
        Specified by:
        isPersonEligible in interface IPlanEligibility
        Parameters:
        person - The person to check against.
        time - The time.
        Returns:
        Whether the person is eligible.
      • getEarliestDiagnosis

        public long getEarliestDiagnosis​(Person person)
        Gets the earliest occurrence of a qualifying condition that is active/present on the person.
        Parameters:
        person - The person.
        Returns:
        Start time of the earliest qualifying condition, or Long.MAX_VALUE if not present.