Skip to content

NDC (National Drug Code)

Type Registry

NDC (National Drug Code)

identity.medical.ndc

10-11 digit identifier for drug products in the US, assigned by the FDA. Three segments: labeler code, product code, package code. Common formats with dashes: 4-4-2, 5-3-2, or 5-4-1 (totaling 10 digits). May also appear as 11 digits with zero-padded segments.

Domain identitymedical
Casts to VARCHAR
Scope Universal

Try it

CLI
$ finetype infer -i "0002-1433-80"
→ identity.medical.ndc

DuckDB

Detect
SELECT finetype('0002-1433-80');
-- → 'identity.medical.ndc'
Cast expression
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.medical.ndc';

JSON Schema

finetype schema identity.medical.ndc
{
  "$id": "https://noon.sh/schemas/identity.medical.ndc",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "10-11 digit identifier for drug products in the US, assigned by the FDA. Three segments: labeler code, product code, package code. Common formats with dashes: 4-4-2, 5-3-2, or 5-4-1 (totaling 10 digits). May also appear as 11 digits with zero-padded segments.",
  "examples": [
    "0002-1433-80",
    "12345-678-90",
    "12345-6789-0",
    "00021433801"
  ],
  "pattern": "^\\d{4}-\\d{4}-\\d{2}$|^\\d{5}-\\d{3}-\\d{2}$|^\\d{5}-\\d{4}-\\d{1}$|^\\d{11}$",
  "title": "NDC (National Drug Code)",
  "type": "string"
}

Examples

0002-1433-8012345-678-9012345-6789-000021433801

Also known as

national_drug_codedrug_code

Types in identity