Package org.mitre.synthea.helpers
Class PhysiologyValueGenerator
java.lang.Object
org.mitre.synthea.helpers.ValueGenerator
org.mitre.synthea.helpers.PhysiologyValueGenerator
- All Implemented Interfaces:
Serializable
A ValueGenerator for generation of values from a physiology simulation.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic PathPath to the directory containing physiology generator configurations.Fields inherited from class org.mitre.synthea.helpers.ValueGenerator
person -
Constructor Summary
ConstructorsConstructorDescriptionPhysiologyValueGenerator(PhysiologyGeneratorConfig config, SimRunner runner, org.mitre.synthea.world.concepts.VitalSign vitalSign, Person person, double outputVariance) A generator of VitalSign values from a physiology simulation. -
Method Summary
Modifier and TypeMethodDescriptionstatic List<PhysiologyValueGenerator>fromConfig(File configFile, Person person) Instantiates PhysiologyValueGenerators for each VitalSign output in the generator configuration at the provided path.static List<PhysiologyValueGenerator>fromConfig(PhysiologyGeneratorConfig generatorConfig, Person person) Instantiates PhysiologyValueGenerators for each VitalSign output in the generator configuration.static PhysiologyGeneratorConfigRetrieves the PhysiologyValueGenerator configuration from the given file.static PhysiologyGeneratorConfigRetrieves the PhysiologyValueGenerator configuration from the given path.doublegetValue(long time) Get a value at a given point in time.org.mitre.synthea.world.concepts.VitalSignReturns the VitalSign this generator targets.static List<PhysiologyValueGenerator>Returns a List of all PhysiologyValueGenerators defined in the configuration directory.static List<PhysiologyValueGenerator>Loads all PhysiologyValueGenerators defined in the given generator configuration subdirectory.static voidsetGeneratorsPath(Path newPath) Sets the path to the generators directory.voidsetOutputVariance(double variance) Sets the amount of variance to generate for the output VitalSign.toString()
-
Field Details
-
GENERATORS_PATH
Path to the directory containing physiology generator configurations.
-
-
Constructor Details
-
PhysiologyValueGenerator
public PhysiologyValueGenerator(PhysiologyGeneratorConfig config, SimRunner runner, org.mitre.synthea.world.concepts.VitalSign vitalSign, Person person, double outputVariance) A generator of VitalSign values from a physiology simulation.- Parameters:
config- physiology configuration filerunner- SimRunner to execute the physiology modelperson- Person instance to generate VitalSigns forvitalSign- VitalSign to generateoutputVariance- amount of variance to apply to the output values, represented as a multiplier that amplifies a random number
-
-
Method Details
-
setGeneratorsPath
Sets the path to the generators directory.- Parameters:
newPath- The new path to the generators directory.
-
loadAll
Returns a List of all PhysiologyValueGenerators defined in the configuration directory.- Parameters:
person- Person to generate values for- Returns:
- List of PhysiologyValueGenerator
-
loadAll
Loads all PhysiologyValueGenerators defined in the given generator configuration subdirectory.- Parameters:
person- Person to generate values forsubfolder- generator sub directory to load configurations from- Returns:
- List of PhysiologyValueGenerator
-
fromConfig
Instantiates PhysiologyValueGenerators for each VitalSign output in the generator configuration at the provided path.- Parameters:
configFile- generator configuration fileperson- Person to generate VitalSigns for- Returns:
- List of PhysiologyValueGenerator instances
-
fromConfig
public static List<PhysiologyValueGenerator> fromConfig(PhysiologyGeneratorConfig generatorConfig, Person person) Instantiates PhysiologyValueGenerators for each VitalSign output in the generator configuration.- Parameters:
generatorConfig- generator configuration objectperson- Person to generate VitalSigns for- Returns:
- List of PhysiologyValueGenerator instances
-
getConfig
Retrieves the PhysiologyValueGenerator configuration from the given path.- Parameters:
configPath- path to the generator configuration file- Returns:
- generator configuration object
-
getConfig
Retrieves the PhysiologyValueGenerator configuration from the given file.- Parameters:
configFile- generator configuration file- Returns:
- generator configuration object
-
getVitalSign
public org.mitre.synthea.world.concepts.VitalSign getVitalSign()Returns the VitalSign this generator targets.- Returns:
- VitalSign target
-
toString
-
getValue
public double getValue(long time) Description copied from class:ValueGeneratorGet a value at a given point in time.- Specified by:
getValuein classValueGenerator- Parameters:
time- the time, needs to be current or in the future.- Returns:
- a numerical value
-
setOutputVariance
public void setOutputVariance(double variance) Sets the amount of variance to generate for the output VitalSign.- Parameters:
variance- amount of variance
-