Python for Medical Adherence

Computing medical adherence is mostly based on medical claims data, hold by the medical insurers or management services. Patients with a certain disease (e.g. Type2 diabetes) are identified based on their diagnosis claims (ICD codes). Looking at related prescription claims, the adherence to a specific drug or drug-class can be calculated through the proportion of days covered (pdc).
 We generated a python based programming solution, computing pdc medical adherence on a patient basis, per drug and per year. The data is plotted using the python library bokeh – also allowing for the generation of interactive displays (bokeh server). Some outputs are shown below.

Medical adherence visualising drug supply of Type2-diabetes within a year, for a patient


Further, python bokeh is employed for producing a web-based interactive map output, illustrating aggregated medical adherence data (pdc) per drug-class on a census unit level: The application below enables the user to select a specific drug-class,  and setting the year of analysis with the time-slider.

Mean of medical adherence (pdc) per census unit (web map based on bokeh server)


Zoom into the feature map is possible, and census units reveal feature information when hovering over.

Zooming and hovering over census unit polygons reveals more information

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.