| Copyright | (c) Target RWE 2023 |
|---|---|
| License | BSD3 |
| Maintainer | bbrown@targetrwe.com ljackman@targetrwe.com dpritchard@targetrwe.com |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Cohort.Output
Description
Synopsis
- data CohortJSON = MkCohortJSON {}
- data ObsUnitJSON = MkObsUnitJSON {
- obsIdJSON :: Value
- variableRowJSON :: [VariableWrapped]
- toObsUnitJSON :: ToJSON a => ObsUnit a -> ObsUnitJSON
- toCohortJSON :: ToJSON a => CohortMap a -> CohortMapJSON
- type CohortMapJSON = Map Text CohortJSON
Documentation
data CohortJSON Source #
Internal. Type controling the output shape of a Cohort.
Constructors
| MkCohortJSON | |
Fields | |
Instances
| ToJSON CohortJSON Source # | |
Defined in Cohort.Output Methods toJSON :: CohortJSON -> Value toEncoding :: CohortJSON -> Encoding toJSONList :: [CohortJSON] -> Value toEncodingList :: [CohortJSON] -> Encoding | |
| Generic CohortJSON Source # | |
Defined in Cohort.Output Associated Types type Rep CohortJSON :: Type -> Type # | |
| Show CohortJSON Source # | |
Defined in Cohort.Output Methods showsPrec :: Int -> CohortJSON -> ShowS # show :: CohortJSON -> String # showList :: [CohortJSON] -> ShowS # | |
| Eq CohortJSON Source # | |
Defined in Cohort.Output | |
| type Rep CohortJSON Source # | |
Defined in Cohort.Output type Rep CohortJSON = D1 ('MetaData "CohortJSON" "Cohort.Output" "hasklepias-core-0.30.3-inplace" 'False) (C1 ('MetaCons "MkCohortJSON" 'PrefixI 'True) (S1 ('MetaSel ('Just "attritionJSON") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AttritionInfo) :*: S1 ('MetaSel ('Just "cohortJSON") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ObsUnitJSON]))) | |
data ObsUnitJSON Source #
Internal. Type controling the output shape of each ObsUnit.
Constructors
| MkObsUnitJSON | |
Fields
| |
Instances
| ToJSON ObsUnitJSON Source # | |
Defined in Cohort.Output Methods toJSON :: ObsUnitJSON -> Value toEncoding :: ObsUnitJSON -> Encoding toJSONList :: [ObsUnitJSON] -> Value toEncodingList :: [ObsUnitJSON] -> Encoding | |
| Generic ObsUnitJSON Source # | |
Defined in Cohort.Output Associated Types type Rep ObsUnitJSON :: Type -> Type # | |
| Show ObsUnitJSON Source # | |
Defined in Cohort.Output Methods showsPrec :: Int -> ObsUnitJSON -> ShowS # show :: ObsUnitJSON -> String # showList :: [ObsUnitJSON] -> ShowS # | |
| Eq ObsUnitJSON Source # | |
Defined in Cohort.Output | |
| type Rep ObsUnitJSON Source # | |
Defined in Cohort.Output | |
toObsUnitJSON :: ToJSON a => ObsUnit a -> ObsUnitJSON Source #
Internal. Convert ObsUnit to ObsUnitJSON using the ToJSON instances
for ObsId and VariableWrapped, to which the obsData are first
converted.
toCohortJSON :: ToJSON a => CohortMap a -> CohortMapJSON Source #
Internal. Convert each Cohort in a CohortMap to CohortJSON.
type CohortMapJSON = Map Text CohortJSON Source #
Similar to CohortMap, but where the Cohorts have been mapped to a
CohortJSON.