NeoFaker.Blood (neo_faker v0.9.0)

View Source

Functions for generating blood types.

This module provides utilities to generate random blood groups, blood types, and Rh factors.

Summary

Functions

Generates a random blood group.

Generates a random Rh factor.

Generates a random blood type.

Functions

group()

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

Generates a random blood group.

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

Examples

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

rh_factor()

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

Generates a random Rh factor.

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

Examples

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

type()

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

Generates a random blood type.

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

Examples

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