Class Seed

  • All Implemented Interfaces:
    IdentityRecord

    public class Seed
    extends java.lang.Object
    implements IdentityRecord
    A representation of demographic information for an Entity for a period of time. A seed is considered "ground truth" for the simulation. The city and state supplied in the seed are what Synthea will use determine location, which will impact the providers used.

    Seeds have an associated Period, which is the time range that they should be used for in the simulation. The last seed in a Entity should have an open ended Period. That is, the Period should have an end date set to null. This means that the seed will be used from its start date until the end of the simulation.

    Seeds may have one or more Variants. These variants can be used to capture error or other deviation from the demographic information in the seeds.

    • Constructor Detail

      • Seed

        public Seed()
    • Method Detail

      • getSeedId

        public java.lang.String getSeedId()
      • setSeedId

        public void setSeedId​(java.lang.String seedId)
      • getPeriod

        public Period getPeriod()
      • setPeriod

        public void setPeriod​(Period period)
      • setGivenName

        public void setGivenName​(java.lang.String givenName)
      • setFamilyName

        public void setFamilyName​(java.lang.String familyName)
      • setPhone

        public void setPhone​(java.lang.String phone)
      • setAddressLines

        public void setAddressLines​(java.util.List<java.lang.String> addressLines)
      • setCity

        public void setCity​(java.lang.String city)
      • setState

        public void setState​(java.lang.String state)
      • setZipCode

        public void setZipCode​(java.lang.String zipCode)
      • getVariants

        public java.util.List<Variant> getVariants()
      • setVariants

        public void setVariants​(java.util.List<Variant> variants)
      • selectVariant

        public Variant selectVariant​(RandomNumberGenerator rng)
        Randomly pick a Variant of this seed, using the source of randomness passed in.
        Parameters:
        rng - A source of randomness. Likely Person
        Returns:
        a random Variant. If no variants exist for this Seed, it is wrapped in Variant and returned.
      • setSocialSecurityNumber

        public void setSocialSecurityNumber​(java.lang.String socialSecurityNumber)
      • setEntity

        public void setEntity​(Entity entity)
      • demographicAttributesForPerson

        public java.util.Map<java.lang.String,​java.lang.Object> demographicAttributesForPerson()
        Returns the attributes the Synthea Generator usually fills in for a person. These can be used to overwrite those attributes with information from the fixed record file
        Returns:
        a map of person attributes
      • toVariant

        public Variant toVariant()
        Wrap the Seed in a Variant. Essentially, create a Variant that just uses all of the information from the Seed.
        Returns:
        a Variant that is the same as the Seed