Data · 2024

Dissolution Testing Data and Equivalence Analysis Tool

A desktop app that turns HPLC peak areas into dissolution profiles and keeps them on a shared server for comparison

A Windows program that calculates dissolution rates from instrument export files, stores them on a server together with the test conditions used, and later overlays profiles from different runs to judge equivalence with the f2 similarity factor.

Client
Confidential client
Category
Data
Processing tab showing dissolution rates calculated from an instrument export file

Overview

A dissolution test measures how much of a tablet or capsule dissolves over time in a defined medium. At each scheduled time point an aliquot is drawn from every vessel and analysed by HPLC or UPLC, which produces a spreadsheet of peak areas per compound. Turning those areas into dissolution percentages, comparing samples against one another, and keeping a record of both is what this program does.

It reads the instrument export, calculates the dissolution rate at each time point, and stores the result on an in-house MySQL server together with the test conditions it was calculated from. Stored results can be loaded again at any time to overlay dissolution curves, judge equivalence between a reference and a test product, and export a report in the lab's certificate format.

Processing tab showing dissolution rates calculated from an instrument export
Processing tab

System architecture

  • UI: wxPython, split into three tabs: Processing for calculation, Browsing for review and comparison, and a reference tab.
  • Calculation: pandas DataFrames, folded compound by compound, then sample, vessel and time point. Calibration curves are fitted with SciPy's linregress.
  • Plotting: a matplotlib canvas embedded in a wx panel, with the navigation toolbar kept so zooming and image export work as they normally do.
  • Storage: MySQL, split between tables for projects and methods and tables for a result's conditions, values and calibration. Deleting a result removes everything hanging off it.
  • Connection details: the server address and account are held in a Fernet-encrypted file. If the file is missing or the connection fails, a connection dialog opens first.
  • Reports: openpyxl draws the certificate layout cell by cell, with the dissolution plot and the equivalence decision chart embedded as images.

Data flow

  • The instrument export is read, its format identified, and split into standards and samples per compound.
  • The conditions from the selected method and the active content entered by the user are collected.
  • A concentration factor is derived from the standards: a ratio of mean concentration to mean area for a single point, or a slope and intercept for a calibration curve.
  • Uncorrected rates are calculated in time order, and the sampling correction derived from the previous point is accumulated into the corrected rate.
  • The result is stored on the server as conditions, values and calibration.
  • Stored results are loaded again for plots, statistics, equivalence analysis and Excel reports.

Result

Because conditions are registered as methods and stored with the results, opening a stored result is enough to see which volumes, dilution factor and standard approach produced it. Uncorrected values and per-point corrections are all retained, so the calculation can be followed backwards.

Results from different days, calculated with different methods, go onto the same plot for comparison. Older results do not have to be recalculated to be compared.

Equivalence analysis follows the branches of the rule set and records a yes or no for each sub-criterion. The table shows not just an f2 value but the route taken to the verdict.

The certificate-format Excel report and the dissolution plot come straight out of the program.

Technology

  • Python
  • wxPython
  • pandas
  • NumPy
  • SciPy
  • matplotlib
  • MySQL
  • openpyxl

Screens

Have a project in mind?

Tell me about the problem and where things stand, and we can work out the right approach together.

Discuss a project