Skip to main content

Complete Data Dictionary

Data Dictionary

Comprehensive reference for every field in the TransparentMedz API.

Drug

20 fields

Represents a pharmaceutical product in the Canadian market. Each record corresponds to a unique Drug Identification Number (DIN) assigned by Health Canada.

FieldTypeDescriptionExample
id
string
Unique internal identifier"drug_12345"
din
string
Health Canada Drug Identification Number"02248573"
name
string
Brand or marketed name of the drug"Lipitor"
generic_name
string
International Non-proprietary Name (INN)"atorvastatin calcium"
manufacturer
string
Marketing authorization holder"Pfizer Canada ULC"
dosage_form
string
Physical form of the drug product"Tablet"
strength
string
Active ingredient concentration"20mg"
route
string
Route of administration"Oral"
atc_code
string
Anatomical Therapeutic Chemical (ATC) classification code"C10AA05"
schedule
enum
Drug scheduling category: PRESCRIPTION, OTC, BEHIND_COUNTER"PRESCRIPTION"
class
string
Therapeutic class description"HMG-CoA reductase inhibitors"
active_ingredients
string[]
List of active ingredients["atorvastatin calcium trihydrate"]
inactive_ingredients
string[]
List of non-medicinal ingredients["calcium carbonate", "microcrystalline cellulose"]
is_generic
boolean
Whether this is a generic formulationfalse
brand_drug_id
string | null
If generic, the ID of the reference brand drugnull
ndc
string | null
National Drug Code (for cross-border reference)null
market_status
enum
Current market status: ACTIVE, DISCONTINUED, RECALLED"ACTIVE"
approval_date
string
Date of Health Canada marketing authorization (ISO 8601)"1997-02-14"
created_at
string
Record creation timestamp (ISO 8601)"2025-01-15T10:00:00Z"
updated_at
string
Last update timestamp (ISO 8601)"2026-04-05T08:30:00Z"

Pharmacy

15 fields

Represents a licensed retail pharmacy location in Canada. Includes chain pharmacies, independent pharmacies, and hospital outpatient pharmacies.

FieldTypeDescriptionExample
id
string
Unique internal identifier"pharm_67890"
name
string
Pharmacy business name"Shoppers Drug Mart #1234"
chain
string | null
Parent chain name, null for independents"Shoppers Drug Mart"
licence_number
string
Provincial pharmacy licence number"ON-PHM-0012345"
address
Address
Full structured address (see Address sub-object){ "street": "100 Queen St W", ... }
city
string
City name"Toronto"
province
string
Two-letter ISO 3166-2:CA province code"ON"
postal_code
string
Canadian postal code (A1A 1A1 format)"M5H 2N2"
phone
string
Phone number in E.164 format"+14165551234"
latitude
number
Geographic latitude (WGS84)43.6532
longitude
number
Geographic longitude (WGS84)-79.3832
hours
OperatingHours[]
Weekly operating hours array[{ "day": "monday", "open": "09:00", "close": "21:00" }]
services
string[]
Available pharmacy services["flu_vaccination", "delivery", "compounding"]
rating
number | null
Average user rating (1.0 - 5.0)4.6
updated_at
string
Last update timestamp (ISO 8601)"2026-04-01T12:00:00Z"

Price

12 fields

Represents the price of a specific drug at a specific pharmacy at a point in time. Prices are updated daily and include the base drug cost and dispensing fee separately.

FieldTypeDescriptionExample
id
string
Unique internal identifier"price_abc123"
drug_id
string
Foreign key to the Drug entity"drug_12345"
pharmacy_id
string
Foreign key to the Pharmacy entity"pharm_67890"
base_price
number
Drug cost excluding dispensing fee (CAD)8.99
dispensing_fee
number
Pharmacy dispensing fee (CAD)4.11
total_price
number
Total cost: base_price + dispensing_fee (CAD)13.10
currency
string
ISO 4217 currency code (always CAD)"CAD"
quantity
number
Number of units (tablets, capsules, mL)100
unit
string
Unit of measure"tablet"
price_per_unit
number
Calculated price per single unit0.131
source
enum
Data source: PHARMACY_REPORTED, SCRAPED, GOVERNMENT"PHARMACY_REPORTED"
effective_date
string
Date this price became effective (ISO 8601)"2026-04-01"

Province

8 fields

Represents a Canadian province or territory. Used for filtering drug prices, pharmacy locations, and formulary coverage data.

FieldTypeDescriptionExample
code
string
ISO 3166-2:CA two-letter subdivision code"ON"
name
string
Full province or territory name (English)"Ontario"
name_fr
string
Full province or territory name (French)"Ontario"
pharmacy_count
number
Total number of pharmacies in the database for this province4521
drug_count
number
Total number of drugs with price data in this province12840
formulary_url
string
URL to the province's official formulary website"https://www.formulary.health.gov.on.ca/"
max_dispensing_fee
number | null
Provincial maximum regulated dispensing fee (CAD), null if unregulated12.14
updated_at
string
Last update timestamp (ISO 8601)"2026-03-01T00:00:00Z"

Entity Relationships

How the core entities relate to each other in the TransparentMedz data model.


  ┌──────────────────┐         ┌──────────────────┐
  │     Province     │         │       Drug       │
  │──────────────────│         │──────────────────│
  │ code        (PK) │         │ id          (PK) │
  │ name             │    ┌───►│ din              │
  │ name_fr          │    │    │ name             │
  │ pharmacy_count   │    │    │ generic_name     │
  │ drug_count       │    │    │ manufacturer     │
  │ formulary_url    │    │    │ is_generic       │
  │ max_dispensing_  │    │    │ brand_drug_id ───┤──── self-reference
  │   fee            │    │    │ ...              │     (generic → brand)
  └────────┬─────────┘    │    └────────┬─────────┘
           │              │             │
           │ 1:M          │             │ 1:M
           │              │             │
  ┌────────▼─────────┐    │    ┌────────▼─────────┐
  │     Pharmacy     │    │    │      Price       │
  │──────────────────│    │    │──────────────────│
  │ id          (PK) │    │    │ id          (PK) │
  │ name             │    │    │ drug_id     (FK) ├────── Drug.id
  │ chain            │    │    │ pharmacy_id (FK) ├────── Pharmacy.id
  │ province    (FK) ├────┘    │ base_price       │
  │ city             │         │ dispensing_fee    │
  │ latitude         │         │ total_price      │
  │ longitude        │         │ quantity          │
  │ ...              │         │ effective_date   │
  └──────────────────┘         └──────────────────┘

  Relationships:
  ─────────────
  Province  1 ──── M  Pharmacy    (a province has many pharmacies)
  Drug      1 ──── M  Price       (a drug has many price records)
  Pharmacy  1 ──── M  Price       (a pharmacy has many price records)
  Drug      1 ──── M  Drug        (a brand drug has many generics, self-ref)
One-to-Many
A single Drug can have Price records at many Pharmacies. A Province contains many Pharmacies.
Self-Referencing
Generic drugs reference their brand counterpart via brand_drug_id. Query a brand drug's generics field for all alternatives.
Junction via Price
The Price entity serves as a junction between Drug and Pharmacy, holding the specific cost at a specific location.

Start Querying

Now that you understand the data model, explore the API reference or try queries in the GraphQL Playground.