| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Claims.Types
Synopsis
- data Claim = Claim {
- claimId :: Text
- patientId :: Text
- providerId :: Text
- serviceDate :: Day
- totalAmount :: Decimal
- diagnosisCodes :: [Text]
- procedureCodes :: [Text]
- placeOfService :: Text
- claimType :: ClaimType
- data ClaimType
- data ValidationResult
- data Rule a where
- AmountGreaterThan :: Decimal -> Rule Bool
- AmountLessThan :: Decimal -> Rule Bool
- AmountBetween :: Decimal -> Decimal -> Rule Bool
- HasDiagnosisCode :: Text -> Rule Bool
- HasProcedureCode :: Text -> Rule Bool
- IsClaimType :: ClaimType -> Rule Bool
- PlaceOfServiceIs :: Text -> Rule Bool
- And :: Rule Bool -> Rule Bool -> Rule Bool
- Or :: Rule Bool -> Rule Bool -> Rule Bool
- Not :: Rule Bool -> Rule Bool
- Reject :: Text -> Rule ValidationResult
- Approve :: Rule ValidationResult
- RequireReview :: Text -> Rule ValidationResult
- If :: Rule Bool -> Rule ValidationResult -> Rule ValidationResult -> Rule ValidationResult
- greaterThan :: Decimal -> Rule Bool
- lessThan :: Decimal -> Rule Bool
- between :: Decimal -> Decimal -> Rule Bool
- hasDx :: Text -> Rule Bool
- hasPx :: Text -> Rule Bool
- isType :: ClaimType -> Rule Bool
- pos :: Text -> Rule Bool
- reject :: Text -> Rule ValidationResult
- approve :: Rule ValidationResult
- needsReview :: Text -> Rule ValidationResult
Core Domain Types
Represents a healthcare claim
Constructors
| Claim | |
Fields
| |
data ValidationResult Source #
Result of claim validation
Instances
| Show ValidationResult Source # | |
Defined in Claims.Types Methods showsPrec :: Int -> ValidationResult -> ShowS # show :: ValidationResult -> String # showList :: [ValidationResult] -> ShowS # | |
| Eq ValidationResult Source # | |
Defined in Claims.Types Methods (==) :: ValidationResult -> ValidationResult -> Bool # (/=) :: ValidationResult -> ValidationResult -> Bool # | |
Rule Types
Rule expression GADT for type-safe DSL
Constructors
| AmountGreaterThan :: Decimal -> Rule Bool | |
| AmountLessThan :: Decimal -> Rule Bool | |
| AmountBetween :: Decimal -> Decimal -> Rule Bool | |
| HasDiagnosisCode :: Text -> Rule Bool | |
| HasProcedureCode :: Text -> Rule Bool | |
| IsClaimType :: ClaimType -> Rule Bool | |
| PlaceOfServiceIs :: Text -> Rule Bool | |
| And :: Rule Bool -> Rule Bool -> Rule Bool | |
| Or :: Rule Bool -> Rule Bool -> Rule Bool | |
| Not :: Rule Bool -> Rule Bool | |
| Reject :: Text -> Rule ValidationResult | |
| Approve :: Rule ValidationResult | |
| RequireReview :: Text -> Rule ValidationResult | |
| If :: Rule Bool -> Rule ValidationResult -> Rule ValidationResult -> Rule ValidationResult |
Smart Constructors
approve :: Rule ValidationResult Source #
Smart constructor for approve action
needsReview :: Text -> Rule ValidationResult Source #
Smart constructor for review action