# `NeoFaker.Blood`
[🔗](https://github.com/muzhawir/neo_faker/blob/main/lib/neo_faker/blood.ex#L1)

Functions for generating blood types.

Provides utilities to generate random blood groups, blood types, and Rh factors
following the ABO and Rh blood group system classification.

# `all_rh_factors`
*since 0.3.1* 

```elixir
@spec all_rh_factors() :: [String.t()]
```

Returns both possible Rh factors.

## Examples

    iex> NeoFaker.Blood.all_rh_factors()
    ["+", "-"]

# `all_types`
*since 0.3.1* 

```elixir
@spec all_types() :: [String.t()]
```

Returns all 4 blood types in the ABO system.

## Examples

    iex> NeoFaker.Blood.all_types()
    ["A", "B", "AB", "O"]

# `group`
*since 0.3.1* 

```elixir
@spec group(Keyword.t()) :: String.t()
```

Generates a random blood group.

Combines a blood type (`A`, `B`, `AB`, or `O`) with an Rh factor (`+` or `-`).
Use the `:format` option to return only part of the result.

## Options

- `:format` - Controls what is returned. Defaults to `:group`.
  - `:group` - Full blood group, e.g. `"B+"` (default).
  - `:type_only` - Blood type only, e.g. `"B"`.
  - `:rh_only` - Rh factor only, e.g. `"+"`.

## Examples

    iex> NeoFaker.Blood.group()
    "B+"

    iex> NeoFaker.Blood.group(format: :type_only)
    "O"

    iex> NeoFaker.Blood.group(format: :rh_only)
    "-"

# `medical_notation`
*since 0.3.1* 

```elixir
@spec medical_notation(Keyword.t()) :: String.t()
```

Generates a random blood type in medical notation.

Returns a descriptive string combining the ABO type and Rh factor. Set
`verbose: true` for the extended `"Type X, Rh Y"` form.

## Options

- `:verbose` - When `true`, uses full descriptive text. Defaults to `false`.

## Examples

    iex> NeoFaker.Blood.medical_notation()
    "B positive"

    iex> NeoFaker.Blood.medical_notation(verbose: true)
    "Type AB, Rh positive"

# `rh_factor`
*since 0.3.1* 

```elixir
@spec rh_factor() :: String.t()
```

Generates a random Rh factor.

Returns either `"+"` (positive) or `"-"` (negative).

## Examples

    iex> NeoFaker.Blood.rh_factor()
    "+"

# `type`
*since 0.3.1* 

```elixir
@spec type() :: String.t()
```

Generates a random blood type.

Returns one of the four ABO blood types: `"A"`, `"B"`, `"AB"`, or `"O"`.

## Examples

    iex> NeoFaker.Blood.type()
    "B"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
