Package org.mitre.synthea.identity
Class Seed
- java.lang.Object
-
- org.mitre.synthea.identity.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 Summary
Constructors Constructor Description Seed()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
birthdateTimestamp()
java.util.Map<java.lang.String,java.lang.Object>
demographicAttributesForPerson()
Returns the attributes the Synthea Generator usually fills in for a person.java.util.List<java.lang.String>
getAddressLines()
java.lang.String
getCity()
java.time.LocalDate
getDateOfBirth()
java.lang.String
getFamilyName()
java.lang.String
getGender()
java.lang.String
getGivenName()
Period
getPeriod()
java.lang.String
getPhone()
java.lang.String
getSeedId()
java.lang.String
getSocialSecurityNumber()
java.lang.String
getState()
java.util.List<Variant>
getVariants()
java.lang.String
getZipCode()
Variant
selectVariant(RandomNumberGenerator rng)
Randomly pick a Variant of this seed, using the source of randomness passed in.void
setAddressLines(java.util.List<java.lang.String> addressLines)
void
setCity(java.lang.String city)
void
setEntity(Entity entity)
void
setFamilyName(java.lang.String familyName)
void
setGivenName(java.lang.String givenName)
void
setPeriod(Period period)
void
setPhone(java.lang.String phone)
void
setSeedId(java.lang.String seedId)
void
setSocialSecurityNumber(java.lang.String socialSecurityNumber)
void
setState(java.lang.String state)
void
setVariants(java.util.List<Variant> variants)
void
setZipCode(java.lang.String zipCode)
Variant
toVariant()
Wrap the Seed in a Variant.
-
-
-
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.
-
getDateOfBirth
public java.time.LocalDate getDateOfBirth()
- Specified by:
getDateOfBirth
in interfaceIdentityRecord
-
getGender
public java.lang.String getGender()
- Specified by:
getGender
in interfaceIdentityRecord
-
getGivenName
public java.lang.String getGivenName()
- Specified by:
getGivenName
in interfaceIdentityRecord
-
getFamilyName
public java.lang.String getFamilyName()
- Specified by:
getFamilyName
in interfaceIdentityRecord
-
getPhone
public java.lang.String getPhone()
- Specified by:
getPhone
in interfaceIdentityRecord
-
getAddressLines
public java.util.List<java.lang.String> getAddressLines()
- Specified by:
getAddressLines
in interfaceIdentityRecord
-
getCity
public java.lang.String getCity()
- Specified by:
getCity
in interfaceIdentityRecord
-
getState
public java.lang.String getState()
- Specified by:
getState
in interfaceIdentityRecord
-
getZipCode
public java.lang.String getZipCode()
- Specified by:
getZipCode
in interfaceIdentityRecord
-
getSocialSecurityNumber
public java.lang.String getSocialSecurityNumber()
- Specified by:
getSocialSecurityNumber
in interfaceIdentityRecord
-
setSocialSecurityNumber
public void setSocialSecurityNumber(java.lang.String socialSecurityNumber)
-
birthdateTimestamp
public long birthdateTimestamp()
- Specified by:
birthdateTimestamp
in interfaceIdentityRecord
-
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
-
-