Class IoMapper

java.lang.Object
org.mitre.synthea.helpers.physiology.IoMapper
All Implemented Interfaces:
Serializable

public class IoMapper extends Object implements Serializable
Class for handling simulation inputs and outputs.
See Also:
  • Constructor Details

    • IoMapper

      public IoMapper()
      Default constructor for IoMapper.
    • IoMapper

      public IoMapper(IoMapper other)
      Copy constructor.
      Parameters:
      other - other IoMapper instance
  • Method Details

    • getType

      public IoMapper.IoType getType()
      Retrieves the type of this IoMapper.
      Returns:
      The IoType of this IoMapper.
    • setType

      public void setType(IoMapper.IoType type)
      Sets the type of this IoMapper.
      Parameters:
      type - The IoType to set.
    • getFrom

      public String getFrom()
      Retrieves the "from" field of this IoMapper.
      Returns:
      The "from" field value.
    • setFrom

      public void setFrom(String from)
      Sets the "from" field of this IoMapper.
      Parameters:
      from - The "from" field value to set.
    • getTo

      public String getTo()
      Retrieves the "to" field of this IoMapper.
      Returns:
      The "to" field value.
    • setTo

      public void setTo(String to)
      Sets the "to" field of this IoMapper.
      Parameters:
      to - The "to" field value to set.
    • getFromList

      public String getFromList()
      Retrieves the "fromList" field of this IoMapper.
      Returns:
      The "fromList" field value.
    • setFromList

      public void setFromList(String fromList)
      Sets the "fromList" field of this IoMapper.
      Parameters:
      fromList - The "fromList" field value to set.
    • getFromExp

      public String getFromExp()
      Gets the expression for the 'from' field.
      Returns:
      The 'from' expression.
    • setFromExp

      public void setFromExp(String fromExp)
      Sets the expression for the 'from' field.
      Parameters:
      fromExp - The 'from' expression to set.
    • getVariance

      public double getVariance()
      Gets the variance threshold.
      Returns:
      The variance threshold.
    • setVariance

      public void setVariance(double varianceThreshold)
      Sets the variance threshold.
      Parameters:
      varianceThreshold - The variance threshold to set.
    • getPreGenerator

      public PreGenerator getPreGenerator()
      Gets the pre-generator instance.
      Returns:
      The pre-generator instance.
    • setPreGenerator

      public void setPreGenerator(PreGenerator preGenerator)
      Sets the pre-generator instance.
      Parameters:
      preGenerator - The pre-generator instance to set.
    • getVitalSignTarget

      public org.mitre.synthea.world.concepts.VitalSign getVitalSignTarget()
      Retrieves the VitalSign corresponding to this IoMapper's "to" field.
      Returns:
      target VitalSign Enum
    • initialize

      public void initialize()
      Initializes the expression processor if needed with all inputs set as the default type (Decimal).
    • initialize

      public void initialize(Map<String,String> paramTypes)
      Initializes the expression processor for each thread if needed.
      Parameters:
      paramTypes - map of parameters to their CQL types
    • toModelInputs

      public double toModelInputs(Person person, long time, Map<String,Double> modelInputs)
      Populates model input parameters from the given person object.
      Parameters:
      person - Person instance to get parameter values from
      time - Synthea simulation time
      modelInputs - map of input parameters to be populated
      Returns:
      double value of the mapped parameter
    • getOutputResult

      public Object getOutputResult(org.simulator.math.odes.MultiTable results, double leadTime)
      Retrieves the numeric result for this IoMapper from simulation output.
      Parameters:
      results - simulation results
      leadTime - lead time in seconds before using simulation values
      Returns:
      double value or List of Double values