{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ComprehendMedical.Types.RxNormEntity
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ComprehendMedical.Types.RxNormEntity where

import Amazonka.ComprehendMedical.Types.RxNormAttribute
import Amazonka.ComprehendMedical.Types.RxNormConcept
import Amazonka.ComprehendMedical.Types.RxNormEntityCategory
import Amazonka.ComprehendMedical.Types.RxNormEntityType
import Amazonka.ComprehendMedical.Types.RxNormTrait
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The collection of medical entities extracted from the input text and
-- their associated information. For each entity, the response provides the
-- entity text, the entity category, where the entity text begins and ends,
-- and the level of confidence that Amazon Comprehend Medical has in the
-- detection and analysis. Attributes and traits of the entity are also
-- returned.
--
-- /See:/ 'newRxNormEntity' smart constructor.
data RxNormEntity = RxNormEntity'
  { -- | The extracted attributes that relate to the entity. The attributes
    -- recognized by InferRxNorm are @DOSAGE@, @DURATION@, @FORM@, @FREQUENCY@,
    -- @RATE@, @ROUTE_OR_MODE@, and @STRENGTH@.
    RxNormEntity -> Maybe [RxNormAttribute]
attributes :: Prelude.Maybe [RxNormAttribute],
    -- | The 0-based character offset in the input text that shows where the
    -- entity begins. The offset returns the UTF-8 code point in the string.
    RxNormEntity -> Maybe Int
beginOffset :: Prelude.Maybe Prelude.Int,
    -- | The category of the entity. The recognized categories are @GENERIC@ or
    -- @BRAND_NAME@.
    RxNormEntity -> Maybe RxNormEntityCategory
category :: Prelude.Maybe RxNormEntityCategory,
    -- | The 0-based character offset in the input text that shows where the
    -- entity ends. The offset returns the UTF-8 code point in the string.
    RxNormEntity -> Maybe Int
endOffset :: Prelude.Maybe Prelude.Int,
    -- | The numeric identifier for the entity. This is a monotonically
    -- increasing id unique within this response rather than a global unique
    -- identifier.
    RxNormEntity -> Maybe Int
id :: Prelude.Maybe Prelude.Int,
    -- | The RxNorm concepts that the entity could refer to, along with a score
    -- indicating the likelihood of the match.
    RxNormEntity -> Maybe [RxNormConcept]
rxNormConcepts :: Prelude.Maybe [RxNormConcept],
    -- | The level of confidence that Amazon Comprehend Medical has in the
    -- accuracy of the detected entity.
    RxNormEntity -> Maybe Double
score :: Prelude.Maybe Prelude.Double,
    -- | The segment of input text extracted from which the entity was detected.
    RxNormEntity -> Maybe Text
text :: Prelude.Maybe Prelude.Text,
    -- | Contextual information for the entity.
    RxNormEntity -> Maybe [RxNormTrait]
traits :: Prelude.Maybe [RxNormTrait],
    -- | Describes the specific type of entity. For InferRxNorm, the recognized
    -- entity type is @MEDICATION@.
    RxNormEntity -> Maybe RxNormEntityType
type' :: Prelude.Maybe RxNormEntityType
  }
  deriving (RxNormEntity -> RxNormEntity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RxNormEntity -> RxNormEntity -> Bool
$c/= :: RxNormEntity -> RxNormEntity -> Bool
== :: RxNormEntity -> RxNormEntity -> Bool
$c== :: RxNormEntity -> RxNormEntity -> Bool
Prelude.Eq, ReadPrec [RxNormEntity]
ReadPrec RxNormEntity
Int -> ReadS RxNormEntity
ReadS [RxNormEntity]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RxNormEntity]
$creadListPrec :: ReadPrec [RxNormEntity]
readPrec :: ReadPrec RxNormEntity
$creadPrec :: ReadPrec RxNormEntity
readList :: ReadS [RxNormEntity]
$creadList :: ReadS [RxNormEntity]
readsPrec :: Int -> ReadS RxNormEntity
$creadsPrec :: Int -> ReadS RxNormEntity
Prelude.Read, Int -> RxNormEntity -> ShowS
[RxNormEntity] -> ShowS
RxNormEntity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RxNormEntity] -> ShowS
$cshowList :: [RxNormEntity] -> ShowS
show :: RxNormEntity -> String
$cshow :: RxNormEntity -> String
showsPrec :: Int -> RxNormEntity -> ShowS
$cshowsPrec :: Int -> RxNormEntity -> ShowS
Prelude.Show, forall x. Rep RxNormEntity x -> RxNormEntity
forall x. RxNormEntity -> Rep RxNormEntity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RxNormEntity x -> RxNormEntity
$cfrom :: forall x. RxNormEntity -> Rep RxNormEntity x
Prelude.Generic)

-- |
-- Create a value of 'RxNormEntity' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'attributes', 'rxNormEntity_attributes' - The extracted attributes that relate to the entity. The attributes
-- recognized by InferRxNorm are @DOSAGE@, @DURATION@, @FORM@, @FREQUENCY@,
-- @RATE@, @ROUTE_OR_MODE@, and @STRENGTH@.
--
-- 'beginOffset', 'rxNormEntity_beginOffset' - The 0-based character offset in the input text that shows where the
-- entity begins. The offset returns the UTF-8 code point in the string.
--
-- 'category', 'rxNormEntity_category' - The category of the entity. The recognized categories are @GENERIC@ or
-- @BRAND_NAME@.
--
-- 'endOffset', 'rxNormEntity_endOffset' - The 0-based character offset in the input text that shows where the
-- entity ends. The offset returns the UTF-8 code point in the string.
--
-- 'id', 'rxNormEntity_id' - The numeric identifier for the entity. This is a monotonically
-- increasing id unique within this response rather than a global unique
-- identifier.
--
-- 'rxNormConcepts', 'rxNormEntity_rxNormConcepts' - The RxNorm concepts that the entity could refer to, along with a score
-- indicating the likelihood of the match.
--
-- 'score', 'rxNormEntity_score' - The level of confidence that Amazon Comprehend Medical has in the
-- accuracy of the detected entity.
--
-- 'text', 'rxNormEntity_text' - The segment of input text extracted from which the entity was detected.
--
-- 'traits', 'rxNormEntity_traits' - Contextual information for the entity.
--
-- 'type'', 'rxNormEntity_type' - Describes the specific type of entity. For InferRxNorm, the recognized
-- entity type is @MEDICATION@.
newRxNormEntity ::
  RxNormEntity
newRxNormEntity :: RxNormEntity
newRxNormEntity =
  RxNormEntity'
    { $sel:attributes:RxNormEntity' :: Maybe [RxNormAttribute]
attributes = forall a. Maybe a
Prelude.Nothing,
      $sel:beginOffset:RxNormEntity' :: Maybe Int
beginOffset = forall a. Maybe a
Prelude.Nothing,
      $sel:category:RxNormEntity' :: Maybe RxNormEntityCategory
category = forall a. Maybe a
Prelude.Nothing,
      $sel:endOffset:RxNormEntity' :: Maybe Int
endOffset = forall a. Maybe a
Prelude.Nothing,
      $sel:id:RxNormEntity' :: Maybe Int
id = forall a. Maybe a
Prelude.Nothing,
      $sel:rxNormConcepts:RxNormEntity' :: Maybe [RxNormConcept]
rxNormConcepts = forall a. Maybe a
Prelude.Nothing,
      $sel:score:RxNormEntity' :: Maybe Double
score = forall a. Maybe a
Prelude.Nothing,
      $sel:text:RxNormEntity' :: Maybe Text
text = forall a. Maybe a
Prelude.Nothing,
      $sel:traits:RxNormEntity' :: Maybe [RxNormTrait]
traits = forall a. Maybe a
Prelude.Nothing,
      $sel:type':RxNormEntity' :: Maybe RxNormEntityType
type' = forall a. Maybe a
Prelude.Nothing
    }

-- | The extracted attributes that relate to the entity. The attributes
-- recognized by InferRxNorm are @DOSAGE@, @DURATION@, @FORM@, @FREQUENCY@,
-- @RATE@, @ROUTE_OR_MODE@, and @STRENGTH@.
rxNormEntity_attributes :: Lens.Lens' RxNormEntity (Prelude.Maybe [RxNormAttribute])
rxNormEntity_attributes :: Lens' RxNormEntity (Maybe [RxNormAttribute])
rxNormEntity_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe [RxNormAttribute]
attributes :: Maybe [RxNormAttribute]
$sel:attributes:RxNormEntity' :: RxNormEntity -> Maybe [RxNormAttribute]
attributes} -> Maybe [RxNormAttribute]
attributes) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe [RxNormAttribute]
a -> RxNormEntity
s {$sel:attributes:RxNormEntity' :: Maybe [RxNormAttribute]
attributes = Maybe [RxNormAttribute]
a} :: RxNormEntity) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 0-based character offset in the input text that shows where the
-- entity begins. The offset returns the UTF-8 code point in the string.
rxNormEntity_beginOffset :: Lens.Lens' RxNormEntity (Prelude.Maybe Prelude.Int)
rxNormEntity_beginOffset :: Lens' RxNormEntity (Maybe Int)
rxNormEntity_beginOffset = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe Int
beginOffset :: Maybe Int
$sel:beginOffset:RxNormEntity' :: RxNormEntity -> Maybe Int
beginOffset} -> Maybe Int
beginOffset) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe Int
a -> RxNormEntity
s {$sel:beginOffset:RxNormEntity' :: Maybe Int
beginOffset = Maybe Int
a} :: RxNormEntity)

-- | The category of the entity. The recognized categories are @GENERIC@ or
-- @BRAND_NAME@.
rxNormEntity_category :: Lens.Lens' RxNormEntity (Prelude.Maybe RxNormEntityCategory)
rxNormEntity_category :: Lens' RxNormEntity (Maybe RxNormEntityCategory)
rxNormEntity_category = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe RxNormEntityCategory
category :: Maybe RxNormEntityCategory
$sel:category:RxNormEntity' :: RxNormEntity -> Maybe RxNormEntityCategory
category} -> Maybe RxNormEntityCategory
category) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe RxNormEntityCategory
a -> RxNormEntity
s {$sel:category:RxNormEntity' :: Maybe RxNormEntityCategory
category = Maybe RxNormEntityCategory
a} :: RxNormEntity)

-- | The 0-based character offset in the input text that shows where the
-- entity ends. The offset returns the UTF-8 code point in the string.
rxNormEntity_endOffset :: Lens.Lens' RxNormEntity (Prelude.Maybe Prelude.Int)
rxNormEntity_endOffset :: Lens' RxNormEntity (Maybe Int)
rxNormEntity_endOffset = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe Int
endOffset :: Maybe Int
$sel:endOffset:RxNormEntity' :: RxNormEntity -> Maybe Int
endOffset} -> Maybe Int
endOffset) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe Int
a -> RxNormEntity
s {$sel:endOffset:RxNormEntity' :: Maybe Int
endOffset = Maybe Int
a} :: RxNormEntity)

-- | The numeric identifier for the entity. This is a monotonically
-- increasing id unique within this response rather than a global unique
-- identifier.
rxNormEntity_id :: Lens.Lens' RxNormEntity (Prelude.Maybe Prelude.Int)
rxNormEntity_id :: Lens' RxNormEntity (Maybe Int)
rxNormEntity_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe Int
id :: Maybe Int
$sel:id:RxNormEntity' :: RxNormEntity -> Maybe Int
id} -> Maybe Int
id) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe Int
a -> RxNormEntity
s {$sel:id:RxNormEntity' :: Maybe Int
id = Maybe Int
a} :: RxNormEntity)

-- | The RxNorm concepts that the entity could refer to, along with a score
-- indicating the likelihood of the match.
rxNormEntity_rxNormConcepts :: Lens.Lens' RxNormEntity (Prelude.Maybe [RxNormConcept])
rxNormEntity_rxNormConcepts :: Lens' RxNormEntity (Maybe [RxNormConcept])
rxNormEntity_rxNormConcepts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe [RxNormConcept]
rxNormConcepts :: Maybe [RxNormConcept]
$sel:rxNormConcepts:RxNormEntity' :: RxNormEntity -> Maybe [RxNormConcept]
rxNormConcepts} -> Maybe [RxNormConcept]
rxNormConcepts) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe [RxNormConcept]
a -> RxNormEntity
s {$sel:rxNormConcepts:RxNormEntity' :: Maybe [RxNormConcept]
rxNormConcepts = Maybe [RxNormConcept]
a} :: RxNormEntity) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The level of confidence that Amazon Comprehend Medical has in the
-- accuracy of the detected entity.
rxNormEntity_score :: Lens.Lens' RxNormEntity (Prelude.Maybe Prelude.Double)
rxNormEntity_score :: Lens' RxNormEntity (Maybe Double)
rxNormEntity_score = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe Double
score :: Maybe Double
$sel:score:RxNormEntity' :: RxNormEntity -> Maybe Double
score} -> Maybe Double
score) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe Double
a -> RxNormEntity
s {$sel:score:RxNormEntity' :: Maybe Double
score = Maybe Double
a} :: RxNormEntity)

-- | The segment of input text extracted from which the entity was detected.
rxNormEntity_text :: Lens.Lens' RxNormEntity (Prelude.Maybe Prelude.Text)
rxNormEntity_text :: Lens' RxNormEntity (Maybe Text)
rxNormEntity_text = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe Text
text :: Maybe Text
$sel:text:RxNormEntity' :: RxNormEntity -> Maybe Text
text} -> Maybe Text
text) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe Text
a -> RxNormEntity
s {$sel:text:RxNormEntity' :: Maybe Text
text = Maybe Text
a} :: RxNormEntity)

-- | Contextual information for the entity.
rxNormEntity_traits :: Lens.Lens' RxNormEntity (Prelude.Maybe [RxNormTrait])
rxNormEntity_traits :: Lens' RxNormEntity (Maybe [RxNormTrait])
rxNormEntity_traits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe [RxNormTrait]
traits :: Maybe [RxNormTrait]
$sel:traits:RxNormEntity' :: RxNormEntity -> Maybe [RxNormTrait]
traits} -> Maybe [RxNormTrait]
traits) (\s :: RxNormEntity
s@RxNormEntity' {} Maybe [RxNormTrait]
a -> RxNormEntity
s {$sel:traits:RxNormEntity' :: Maybe [RxNormTrait]
traits = Maybe [RxNormTrait]
a} :: RxNormEntity) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes the specific type of entity. For InferRxNorm, the recognized
-- entity type is @MEDICATION@.
rxNormEntity_type :: Lens.Lens' RxNormEntity (Prelude.Maybe RxNormEntityType)
rxNormEntity_type :: Lens' RxNormEntity (Maybe RxNormEntityType)
rxNormEntity_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RxNormEntity' {Maybe RxNormEntityType
type' :: Maybe RxNormEntityType
$sel:type':RxNormEntity' :: RxNormEntity -> Maybe RxNormEntityType
type'} -> Maybe RxNormEntityType
type') (\s :: RxNormEntity
s@RxNormEntity' {} Maybe RxNormEntityType
a -> RxNormEntity
s {$sel:type':RxNormEntity' :: Maybe RxNormEntityType
type' = Maybe RxNormEntityType
a} :: RxNormEntity)

instance Data.FromJSON RxNormEntity where
  parseJSON :: Value -> Parser RxNormEntity
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RxNormEntity"
      ( \Object
x ->
          Maybe [RxNormAttribute]
-> Maybe Int
-> Maybe RxNormEntityCategory
-> Maybe Int
-> Maybe Int
-> Maybe [RxNormConcept]
-> Maybe Double
-> Maybe Text
-> Maybe [RxNormTrait]
-> Maybe RxNormEntityType
-> RxNormEntity
RxNormEntity'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Attributes" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BeginOffset")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Category")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EndOffset")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RxNormConcepts" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Score")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Text")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Traits" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Type")
      )

instance Prelude.Hashable RxNormEntity where
  hashWithSalt :: Int -> RxNormEntity -> Int
hashWithSalt Int
_salt RxNormEntity' {Maybe Double
Maybe Int
Maybe [RxNormConcept]
Maybe [RxNormTrait]
Maybe [RxNormAttribute]
Maybe Text
Maybe RxNormEntityCategory
Maybe RxNormEntityType
type' :: Maybe RxNormEntityType
traits :: Maybe [RxNormTrait]
text :: Maybe Text
score :: Maybe Double
rxNormConcepts :: Maybe [RxNormConcept]
id :: Maybe Int
endOffset :: Maybe Int
category :: Maybe RxNormEntityCategory
beginOffset :: Maybe Int
attributes :: Maybe [RxNormAttribute]
$sel:type':RxNormEntity' :: RxNormEntity -> Maybe RxNormEntityType
$sel:traits:RxNormEntity' :: RxNormEntity -> Maybe [RxNormTrait]
$sel:text:RxNormEntity' :: RxNormEntity -> Maybe Text
$sel:score:RxNormEntity' :: RxNormEntity -> Maybe Double
$sel:rxNormConcepts:RxNormEntity' :: RxNormEntity -> Maybe [RxNormConcept]
$sel:id:RxNormEntity' :: RxNormEntity -> Maybe Int
$sel:endOffset:RxNormEntity' :: RxNormEntity -> Maybe Int
$sel:category:RxNormEntity' :: RxNormEntity -> Maybe RxNormEntityCategory
$sel:beginOffset:RxNormEntity' :: RxNormEntity -> Maybe Int
$sel:attributes:RxNormEntity' :: RxNormEntity -> Maybe [RxNormAttribute]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RxNormAttribute]
attributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
beginOffset
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RxNormEntityCategory
category
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
endOffset
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RxNormConcept]
rxNormConcepts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
score
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
text
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RxNormTrait]
traits
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RxNormEntityType
type'

instance Prelude.NFData RxNormEntity where
  rnf :: RxNormEntity -> ()
rnf RxNormEntity' {Maybe Double
Maybe Int
Maybe [RxNormConcept]
Maybe [RxNormTrait]
Maybe [RxNormAttribute]
Maybe Text
Maybe RxNormEntityCategory
Maybe RxNormEntityType
type' :: Maybe RxNormEntityType
traits :: Maybe [RxNormTrait]
text :: Maybe Text
score :: Maybe Double
rxNormConcepts :: Maybe [RxNormConcept]
id :: Maybe Int
endOffset :: Maybe Int
category :: Maybe RxNormEntityCategory
beginOffset :: Maybe Int
attributes :: Maybe [RxNormAttribute]
$sel:type':RxNormEntity' :: RxNormEntity -> Maybe RxNormEntityType
$sel:traits:RxNormEntity' :: RxNormEntity -> Maybe [RxNormTrait]
$sel:text:RxNormEntity' :: RxNormEntity -> Maybe Text
$sel:score:RxNormEntity' :: RxNormEntity -> Maybe Double
$sel:rxNormConcepts:RxNormEntity' :: RxNormEntity -> Maybe [RxNormConcept]
$sel:id:RxNormEntity' :: RxNormEntity -> Maybe Int
$sel:endOffset:RxNormEntity' :: RxNormEntity -> Maybe Int
$sel:category:RxNormEntity' :: RxNormEntity -> Maybe RxNormEntityCategory
$sel:beginOffset:RxNormEntity' :: RxNormEntity -> Maybe Int
$sel:attributes:RxNormEntity' :: RxNormEntity -> Maybe [RxNormAttribute]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [RxNormAttribute]
attributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
beginOffset
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RxNormEntityCategory
category
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
endOffset
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RxNormConcept]
rxNormConcepts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
score
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
text
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RxNormTrait]
traits
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RxNormEntityType
type'