Document¶
Referenced schema · Source · Dereferenced version
A source document. At present every document is a regulatory approval.
Fields¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
string matching ^doc:(fda|ema|hse|hc|hpra):.+$ |
yes | |
type |
always Document |
yes | |
documentType |
one of Regulatory approval |
yes | |
name |
string | yes | |
title |
string or null | yes | |
aliases |
array of string | yes | |
description |
string | yes | |
urls |
array of string matching ^url:(fda|ema|hse|hc|hpra):.+$ |
yes | |
doi |
string or null | yes | |
pmid |
string or null | yes | |
agent_id |
string matching ^agent:(org|user):[a-z0-9]+$ |
yes | Foreign key to agents.id. |
company |
string | yes | |
drug_name_brand |
string or null | yes | |
drug_name_generic |
string or null | yes | |
first_publication_date |
iso_date_or_null | yes | |
publication_date |
iso_date_or_null | yes | |
regulatory_identifier |
string or null | yes | Identifier assigned by the regulatory agency. FDA documents use the application type and six-digit application number (e.g. NDA208716, BLA125427); EMA documents use the product number (e.g. EMEA/H/C/006184). |
status |
one of Active, Deprecated |
yes |
Definitions¶
iso_date_or_null¶
An ISO 8601 date (YYYY-MM-DD) or null.
Type: null or string format date
Additional rules¶
These rules also apply to every record:
- When
idmatches^doc:fda::regulatory_identifieris string matching^(BLA|NDA)[0-9]{6}$.
JSON Schema¶
Full JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://moalmanac.org/schemas/referenced/documents.schema.json",
"title": "Document",
"description": "A source document. At present every document is a regulatory approval.",
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^doc:(fda|ema|hse|hc|hpra):.+$"
},
"type": {
"const": "Document"
},
"documentType": {
"enum": [
"Regulatory approval"
]
},
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
},
"description": {
"type": "string"
},
"urls": {
"type": "array",
"items": {
"type": "string",
"pattern": "^url:(fda|ema|hse|hc|hpra):.+$",
"description": "Foreign key to `urls.id`."
}
},
"doi": {
"type": [
"string",
"null"
]
},
"pmid": {
"type": [
"string",
"null"
]
},
"agent_id": {
"type": "string",
"pattern": "^agent:(org|user):[a-z0-9]+$",
"description": "Foreign key to `agents.id`."
},
"company": {
"type": "string"
},
"drug_name_brand": {
"type": [
"string",
"null"
]
},
"drug_name_generic": {
"type": [
"string",
"null"
]
},
"first_publication_date": {
"$ref": "#/$defs/iso_date_or_null"
},
"publication_date": {
"$ref": "#/$defs/iso_date_or_null"
},
"regulatory_identifier": {
"type": [
"string",
"null"
],
"description": "Identifier assigned by the regulatory agency. FDA documents use the application type and six-digit application number (e.g. NDA208716, BLA125427); EMA documents use the product number (e.g. EMEA/H/C/006184)."
},
"status": {
"enum": [
"Active",
"Deprecated"
]
}
},
"required": [
"id",
"type",
"documentType",
"name",
"title",
"aliases",
"description",
"urls",
"doi",
"pmid",
"agent_id",
"company",
"drug_name_brand",
"drug_name_generic",
"first_publication_date",
"publication_date",
"regulatory_identifier",
"status"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"id"
],
"properties": {
"id": {
"pattern": "^doc:fda:"
}
}
},
"then": {
"properties": {
"regulatory_identifier": {
"type": "string",
"pattern": "^(BLA|NDA)[0-9]{6}$"
}
}
}
}
],
"$defs": {
"iso_date_or_null": {
"description": "An ISO 8601 date (YYYY-MM-DD) or null.",
"oneOf": [
{
"type": "null"
},
{
"type": "string",
"format": "date"
}
]
}
}
}