Nf.Blood (neo_faker v0.5.0)

View Source

Provides functions for generating blood types.

This module includes functions to generate random blood type groups, blood types, and Rh factors.

Summary

Functions

Returns a random blood type group.

Returns a random Rh factor.

Returns a random blood type.

Functions

group()

(since 0.3.1)
@spec group() :: String.t()

Returns a random blood type group.

A blood type group consists of a blood type (A, B, AB, or O) and an Rh factor (+ or -), forming a complete blood group.

Examples

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

rh_factor()

(since 0.3.1)
@spec rh_factor() :: String.t()

Returns a random Rh factor.

The Rh factor is either + (positive) or - (negative).

Examples

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

type()

(since 0.3.1)
@spec type() :: String.t()

Returns a random blood type.

A blood type is one of A, B, AB, or O, without the Rh factor.

Examples

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