Indicator output types that can be cached.
A mapping of a type => function to use to turn an object of this type into a cache key
cache_indicator() is the function used to cache return values of indicator.indicator.Indicator.
Parameters: |
|
---|
cache_simple() is a decorator for caching a function of a single argument that returns a pickle-able object
A boolean indicating whether or not this indicator should be cached. Should be False for indicators with non-pickle-able output values.
A long human-readable name for this indicator, like “Percentage of women 15-49 using modern family planning methods.
True if the output type is indicator.percentage.Percentage.
A short human-readable name for this indicator, like “% FP”.
A machine-friendly identifier string for this indicator, using a-z, A-Z, 0-9, and underscore.
Type of the data argument to this indicator. Often this will be an instantiated indicator.query_set_type.QuerySetType like QuerySetType(Patient).
The type of the return value of this indicator. Used to figure out whether or not it can be cached.
How long to keep cached values for before expiring them.
Subclass of indicator.indicator.Indicator for difference values. You give it the two indicators that make up the numerator and denominator values and it gives you back their difference.
The inital indicator.indicator.Indicator value
The number to subtract from the initial indicator.indicator.Indicator value
Subclass of indicator.indicator.Indicator for percentage values. You give it the two indicators that make up the numerator and denominator values and it gives you back a indicator.percentage.Percentage.
The denominator indicator.indicator.Indicator
The numerator indicator.indicator.Indicator
alias of Percentage
QuerySetType is a bogus type just used with indicator.indicator.Indicator definitions to specify the particular model type of the QuerySet it accepts as an input argument.
This is not duck-typing and it makes me feel dirty. Let’s figure out a better way to do this.