| Copyright | (c) Target RWE 2022 |
|---|---|
| License | BSD3 |
| Maintainer | bbrown@targetrwe.com, ljackman@targetrwe.com, dpritchard@targetrwe.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Cohort.Criteria
Description
This module defines the return type of Cohort.Cohort. in a
runCriteriaCohortSpec. Criteria, an alias for NonEmpty Criterion, is computed
subject-by-subject for each cohort. Each Criteria is computed from
subject-level data and a given index time. A single subject has one value of
Criteria, with one or more Criterion values, at each given index time.
Each Criterion indicates whether an Cohort.Cohort., of which there
is one per subject and index time, should be ObsUnitExcludeed from the cohort, or
Includeed contingent on the Cohort.Cohort. not being ObsUnitExcludeed
by any other criterion. In other words, a Cohort.Cohort. is included
if and only if they are ObsUnitIncludeed for every Criterion.
See the Hasklepias module documentation in `hasklepias-main` for more
information on how Criteria are processed in a CohortApp pipeline.
Documentation
A Status paired with some descriptive label.
Constructors
| MkCriterion | |
Fields
| |
Indication of whether a given subject should be included or excluded from the cohort.
type Criteria = NonEmpty Criterion Source #
Type alias for a NE. list of NonEmptyCriterion. This is the return
type of Cohort.Cohort.CohortSpec.. runCriteriaNE. is used to
prevent ill-defined behavior in the cohort processing logic of
NonEmptyCohort.Core: An subject with no Criterion computed for a given index
time would need to be given an implicit Include or Exclude with empty
label, which instead is better supplied explicitly as a singleton list of
Criteria.