Skip to content

Blood Type

Type Registry

Blood Type

identity.person.blood_type

ABO blood group system (A, B, AB, O) with optional Rh factor (±). Format: "A+", "B-", "AB", "O+", etc.

Domain identityperson
Casts to VARCHAR
Scope Universal

Try it

CLI
$ finetype infer -i "O+"
→ identity.person.blood_type

DuckDB

Detect
SELECT finetype('O+');
-- → 'identity.person.blood_type'
Cast expression
UPPER(CAST({col} AS VARCHAR))
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'identity.person.blood_type';

Struct Expansion

blood_group: REGEXP_EXTRACT(UPPER({col}), '^([ABO]+)')
rh_factor: REGEXP_EXTRACT(UPPER({col}), '([+-])$')

JSON Schema

finetype schema identity.person.blood_type
{
  "$id": "https://noon.sh/schemas/identity.person.blood_type",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "ABO blood group system (A, B, AB, O) with optional Rh factor (±). Format: \"A+\", \"B-\", \"AB\", \"O+\", etc.",
  "examples": [
    "O+",
    "A-",
    "AB",
    "B+"
  ],
  "pattern": "^(A|B|AB|O)[+-]?$",
  "title": "Blood Type",
  "type": "string"
}

Examples

O+A-ABB+

Types in identity