Copyright | (c) Target RWE 2023 |
---|---|
License | BSD3 |
Maintainer | bbrown@targetrwe.com ljackman@targetrwe.com dpritchard@targetrwe.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
.
Instances
data ObsUnitJSON Source #
Internal. Type controling the output shape of each ObsUnit
.
MkObsUnitJSON | |
|
Instances
ToJSON ObsUnitJSON Source # | |
Defined in Cohort.Output toJSON :: ObsUnitJSON -> Value toEncoding :: ObsUnitJSON -> Encoding toJSONList :: [ObsUnitJSON] -> Value toEncodingList :: [ObsUnitJSON] -> Encoding | |
Generic ObsUnitJSON Source # | |
Defined in Cohort.Output type Rep ObsUnitJSON :: Type -> Type # from :: ObsUnitJSON -> Rep ObsUnitJSON x # to :: Rep ObsUnitJSON x -> ObsUnitJSON # | |
Show ObsUnitJSON Source # | |
Defined in Cohort.Output showsPrec :: Int -> ObsUnitJSON -> ShowS # show :: ObsUnitJSON -> String # showList :: [ObsUnitJSON] -> ShowS # | |
Eq ObsUnitJSON Source # | |
Defined in Cohort.Output (==) :: ObsUnitJSON -> ObsUnitJSON -> Bool # (/=) :: ObsUnitJSON -> ObsUnitJSON -> Bool # | |
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 Cohort
s have been mapped to a
CohortJSON
.