Class IoMapper
java.lang.Object
org.mitre.synthea.helpers.physiology.IoMapper
- All Implemented Interfaces:
Serializable
Class for handling simulation inputs and outputs.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the type of input/output mapping. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFrom()Retrieves the "from" field of this IoMapper.Gets the expression for the 'from' field.Retrieves the "fromList" field of this IoMapper.getOutputResult(org.simulator.math.odes.MultiTable results, double leadTime) Retrieves the numeric result for this IoMapper from simulation output.Gets the pre-generator instance.getTo()Retrieves the "to" field of this IoMapper.getType()Retrieves the type of this IoMapper.doubleGets the variance threshold.org.mitre.synthea.world.concepts.VitalSignRetrieves the VitalSign corresponding to this IoMapper's "to" field.voidInitializes the expression processor if needed with all inputs set as the default type (Decimal).voidinitialize(Map<String, String> paramTypes) Initializes the expression processor for each thread if needed.voidSets the "from" field of this IoMapper.voidsetFromExp(String fromExp) Sets the expression for the 'from' field.voidsetFromList(String fromList) Sets the "fromList" field of this IoMapper.voidsetPreGenerator(PreGenerator preGenerator) Sets the pre-generator instance.voidSets the "to" field of this IoMapper.voidsetType(IoMapper.IoType type) Sets the type of this IoMapper.voidsetVariance(double varianceThreshold) Sets the variance threshold.doubletoModelInputs(Person person, long time, Map<String, Double> modelInputs) Populates model input parameters from the given person object.
-
Constructor Details
-
IoMapper
public IoMapper()Default constructor for IoMapper. -
IoMapper
Copy constructor.- Parameters:
other- other IoMapper instance
-
-
Method Details
-
getType
Retrieves the type of this IoMapper.- Returns:
- The IoType of this IoMapper.
-
setType
Sets the type of this IoMapper.- Parameters:
type- The IoType to set.
-
getFrom
Retrieves the "from" field of this IoMapper.- Returns:
- The "from" field value.
-
setFrom
Sets the "from" field of this IoMapper.- Parameters:
from- The "from" field value to set.
-
getTo
Retrieves the "to" field of this IoMapper.- Returns:
- The "to" field value.
-
setTo
Sets the "to" field of this IoMapper.- Parameters:
to- The "to" field value to set.
-
getFromList
Retrieves the "fromList" field of this IoMapper.- Returns:
- The "fromList" field value.
-
setFromList
Sets the "fromList" field of this IoMapper.- Parameters:
fromList- The "fromList" field value to set.
-
getFromExp
Gets the expression for the 'from' field.- Returns:
- The 'from' expression.
-
setFromExp
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
Gets the pre-generator instance.- Returns:
- The pre-generator instance.
-
setPreGenerator
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
Initializes the expression processor for each thread if needed.- Parameters:
paramTypes- map of parameters to their CQL types
-
toModelInputs
Populates model input parameters from the given person object.- Parameters:
person- Person instance to get parameter values fromtime- Synthea simulation timemodelInputs- map of input parameters to be populated- Returns:
- double value of the mapped parameter
-
getOutputResult
Retrieves the numeric result for this IoMapper from simulation output.- Parameters:
results- simulation resultsleadTime- lead time in seconds before using simulation values- Returns:
- double value or List of Double values
-