Class PhysiologyValueGenerator

java.lang.Object
org.mitre.synthea.helpers.ValueGenerator
org.mitre.synthea.helpers.PhysiologyValueGenerator
All Implemented Interfaces:
Serializable

public class PhysiologyValueGenerator extends ValueGenerator
A ValueGenerator for generation of values from a physiology simulation.
See Also:
  • Field Details

    • GENERATORS_PATH

      public static Path 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 file
      runner - SimRunner to execute the physiology model
      person - Person instance to generate VitalSigns for
      vitalSign - VitalSign to generate
      outputVariance - amount of variance to apply to the output values, represented as a multiplier that amplifies a random number
  • Method Details

    • setGeneratorsPath

      public static void setGeneratorsPath(Path newPath)
      Sets the path to the generators directory.
      Parameters:
      newPath - The new path to the generators directory.
    • loadAll

      public static List<PhysiologyValueGenerator> loadAll(Person person)
      Returns a List of all PhysiologyValueGenerators defined in the configuration directory.
      Parameters:
      person - Person to generate values for
      Returns:
      List of PhysiologyValueGenerator
    • loadAll

      public static List<PhysiologyValueGenerator> loadAll(Person person, String subfolder)
      Loads all PhysiologyValueGenerators defined in the given generator configuration subdirectory.
      Parameters:
      person - Person to generate values for
      subfolder - generator sub directory to load configurations from
      Returns:
      List of PhysiologyValueGenerator
    • fromConfig

      public static List<PhysiologyValueGenerator> fromConfig(File configFile, Person person)
      Instantiates PhysiologyValueGenerators for each VitalSign output in the generator configuration at the provided path.
      Parameters:
      configFile - generator configuration file
      person - 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 object
      person - Person to generate VitalSigns for
      Returns:
      List of PhysiologyValueGenerator instances
    • getConfig

      public static PhysiologyGeneratorConfig getConfig(String configPath)
      Retrieves the PhysiologyValueGenerator configuration from the given path.
      Parameters:
      configPath - path to the generator configuration file
      Returns:
      generator configuration object
    • getConfig

      public static PhysiologyGeneratorConfig getConfig(File configFile)
      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

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public double getValue(long time)
      Description copied from class: ValueGenerator
      Get a value at a given point in time.
      Specified by:
      getValue in class ValueGenerator
      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