{
  "format": "dataset-manifest/1",
  "slug": "medicine-formulary",
  "version": 1,
  "seed": "medicine-formulary:1",
  "spec": {
    "format": "dataset/1",
    "slug": "medicine-formulary",
    "name": "Medicine Formulary",
    "tagline": "Reference formulary of active ingredients, medicines, strengths, forms, and pack sizes for pharmacy.",
    "description": "Pharmacies require reliable reference materials to ensure safe and effective medication dispensing. This synthetic dataset models a medicine formulary consisting of three tables: active ingredients, medicines, and strengths. Each row represents a unique entry, linking active ingredients to their corresponding medicines, including details such as forms and pack sizes. The active ingredients table includes the chemical compounds found in various medications, while the medicines table details the specific products available for dispensing. The strengths table clarifies the potency of each medicine and its available forms, such as tablets, capsules, or liquids. Together, these tables offer a structured view of medicines, which can aid in the development of pharmacy management systems, educational tools, and API mockups for testing applications. This dataset serves as an excellent resource for teaching pharmacy students about medication formulations and their components, as well as for developers looking to build systems in the pharmacy domain.",
    "domain": "pharmacy",
    "shape": "lookup-catalog",
    "useCases": [
      "api-mocking",
      "teaching"
    ],
    "keywords": [
      "medicine",
      "formulary",
      "pharmacy",
      "active ingredients",
      "strengths",
      "dosage forms",
      "pack sizes"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "active_ingredients": {
        "description": "This table contains unique active ingredients used in various medicines. Each row represents a distinct chemical compound.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "The unique identifier for the active ingredient."
          },
          "name": {
            "kind": "fullName",
            "description": "The name of the active ingredient, e.g., 'Ibuprofen'."
          },
          "chemical_formula": {
            "kind": "words",
            "description": "The chemical formula of the active ingredient, e.g., 'C13H18O2'."
          }
        }
      },
      "medicines": {
        "description": "This table lists medicines that contain active ingredients. Each row represents a specific medicine product.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "The unique identifier for the medicine."
          },
          "name": {
            "kind": "fullName",
            "description": "The name of the medicine, e.g., 'Advil'."
          },
          "active_ingredient_id": {
            "kind": "fk",
            "ref": "active_ingredients.id",
            "description": "The foreign key linking to the active ingredient used in the medicine."
          },
          "form": {
            "kind": "enum",
            "values": [
              "tablet",
              "capsule",
              "liquid",
              "suspension"
            ],
            "description": "The form in which the medicine is available."
          },
          "pack_size": {
            "kind": "int",
            "min": 1,
            "max": 100,
            "description": "The number of units in the pack, e.g., 10, 30, or 100.",
            "nullable": true,
            "when": {
              "column": "form",
              "in": [
                "tablet",
                "capsule"
              ]
            }
          }
        }
      },
      "strengths": {
        "description": "This table specifies the strengths associated with each medicine. Each row links a medicine to its strength.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "The unique identifier for the strength entry."
          },
          "medicine_id": {
            "kind": "fk",
            "ref": "medicines.id",
            "description": "The foreign key linking to the medicine."
          },
          "strength": {
            "kind": "decimal",
            "min": 0.1,
            "max": 1000,
            "scale": 1,
            "description": "The strength of the medicine in milligrams."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "high-cardinality",
      "nullable"
    ],
    "analysisQuestions": [
      "What are the most common active ingredients across different medicines?",
      "How many different forms of medicines are available for each active ingredient?",
      "What is the distribution of pack sizes for medicines in the formulary?",
      "How does the strength of a medicine vary across different forms?"
    ],
    "suggestedQueries": [
      {
        "title": "List all medicines with their active ingredients",
        "sql": "SELECT m.name AS medicine_name, ai.name AS active_ingredient FROM medicines m JOIN active_ingredients ai ON m.active_ingredient_id = ai.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count the number of medicines per active ingredient",
        "sql": "SELECT ai.name AS active_ingredient, COUNT(m.id) AS medicine_count FROM active_ingredients ai LEFT JOIN medicines m ON ai.id = m.active_ingredient_id GROUP BY ai.name;",
        "dialect": "postgres"
      },
      {
        "title": "Find strengths of a specific medicine",
        "sql": "SELECT m.name AS medicine_name, s.strength FROM medicines m JOIN strengths s ON m.id = s.medicine_id WHERE m.name = 'Advil';",
        "dialect": "postgres"
      },
      {
        "title": "Get all pack sizes for each medicine",
        "sql": "SELECT m.name AS medicine_name, m.pack_size FROM medicines m ORDER BY m.name;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Pharmacy Management System Development",
        "body": "Developers working on pharmacy management systems can use this dataset to create a robust reference for medications, ensuring that their applications can accurately reflect available medicines, active ingredients, and their corresponding strengths."
      },
      {
        "title": "Educational Tool for Pharmacy Students",
        "body": "Instructors can utilize this dataset as a teaching tool for pharmacy students, helping them understand the relationships between active ingredients, medicines, and their strengths, as well as the different forms in which medicines are available."
      },
      {
        "title": "API Mocking for Pharmacy Applications",
        "body": "Developers creating mock APIs for pharmacy-related applications can leverage this dataset to simulate responses that include details on medicines, active ingredients, and dosage forms, enabling testing and validation of their software."
      }
    ]
  },
  "counts": {
    "active_ingredients": 50,
    "medicines": 200,
    "strengths": 200
  },
  "stats": {
    "active_ingredients": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "name": {
          "nulls": 0,
          "distinct": 50,
          "min": "Amir Silva",
          "max": "Yara Kaya"
        },
        "chemical_formula": {
          "nulls": 0,
          "distinct": 50
        }
      }
    },
    "medicines": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "name": {
          "nulls": 0,
          "distinct": 196,
          "min": "Alice Almeida",
          "max": "Zoe Lopez"
        },
        "active_ingredient_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "form": {
          "nulls": 0,
          "distinct": 4,
          "min": "capsule",
          "max": "tablet"
        },
        "pack_size": {
          "nulls": 87,
          "distinct": 68,
          "min": 2,
          "max": 97
        }
      }
    },
    "strengths": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "medicine_id": {
          "nulls": 0,
          "distinct": 124,
          "min": 2,
          "max": 200
        },
        "strength": {
          "nulls": 0,
          "distinct": 198,
          "min": 4.6,
          "max": 999.6
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/active_ingredients.csv",
      "format": "csv",
      "table": "active_ingredients",
      "key": "datasets/medicine-formulary/v1/csv/active_ingredients.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/csv/active_ingredients.csv",
      "bytes": 2158,
      "sha256": "38651c4d2d66a7cf64b3683a1319c194749965d523db1ae7bc1f3f08376e11c0",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/medicines.csv",
      "format": "csv",
      "table": "medicines",
      "key": "datasets/medicine-formulary/v1/csv/medicines.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/csv/medicines.csv",
      "bytes": 5952,
      "sha256": "a103d6f6ebd65c05e0e47030d3dfdc6398faadc23ebcc086d083fc1b3bd24b8c",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/strengths.csv",
      "format": "csv",
      "table": "strengths",
      "key": "datasets/medicine-formulary/v1/csv/strengths.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/csv/strengths.csv",
      "bytes": 2788,
      "sha256": "540fc673aa53430c4d2357531de3cfec9cb96ebf2084aff4c5cfc5b027969d20",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "medicine-formulary.json",
      "format": "json",
      "table": null,
      "key": "datasets/medicine-formulary/v1/medicine-formulary.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/medicine-formulary.json",
      "bytes": 49475,
      "sha256": "03b762f04efc351510ac33eaf005a11989e32b7df718d86941eee9a6970a4fc1",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/medicine-formulary/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/sql/postgres.sql",
      "bytes": 17827,
      "sha256": "b89cef700934d038f6d2302d6a72de20de8fc167250435f69cb2911714265fb5",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/medicine-formulary/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/sql/mysql.sql",
      "bytes": 17476,
      "sha256": "9a6d989f98ffc7db1960257c4c9bb8c13dcbbdb901644587e5cf876dd82a253a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/medicine-formulary/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/sql/mssql.sql",
      "bytes": 18187,
      "sha256": "bf5eea3691d448ea622fdb38ec2c72b20e80ed851c3780c0121619e519e3deec",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/medicine-formulary/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/sql/sqlite.sql",
      "bytes": 17355,
      "sha256": "72b6fc045576d3f10910a8b67043c56910e5a0dee6d14977c4d484bded521cb6",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/medicine-formulary/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/prisma/seed.ts",
      "bytes": 38548,
      "sha256": "b881b411df5b6f2c9cba05ed8716e6be209c01a158594b9a7797ba9c3a8521c2",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/medicine-formulary/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/medicine-formulary/v1/django/fixtures.json",
      "bytes": 69303,
      "sha256": "cafab91d184218848ac86bb3e201a9b814c3b05818d7d01b7121e3144a4efd08",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767316791,
  "updatedAt": 1788767316791
}
