A set of utilities for use with hospital and retail pharmacy data to deal with common pharmacy operations problems.
Project description
pharmacy
A hospital and retail pharmacy-focused Python package by Danny Limoges, PharmD.
This project is in the alpha/planning stage.
Installation
Available on PyPI as an installable package: https://pypi.org/project/pharmacy/
pip install pharmacy
What is it?
This is a collection of modular utilities that aid in processing pharmacy data. Users must perform their own data validation to ensure that results generated by pharmacy are accurate and that the correct data was inputted.
What is it not?
pharmacy is not a pharmacy management system and does not replace Epic, Meditech, Pioneer or any other pharmacy software.
Syntax
find_best_matches
Get a fuzzy match between two DataFrames and combine them where matched.
Output: pandas DataFrame. All rows from df_orig are kept and their corresponding matches are tacked onto the end if they meet the match threshold.
import pharmacy as rx
import pandas as pd
df_out = rx.find_best_matches(
df_orig # Original pandas DataFrame
, df2 # DataFrame to match against
, match_col # Which column to examine in original DataFrame
, match_col_comparator = None # The column name to compare
, threshold=80 # Only accept matches above this fuzzy match threshold.
, scorer=fuzz.token_set_ratio # Which type of fuzzy match?
# options: ratio, partial_ratio, token_sort_ratio, token_set_ratio
)
For more information on fuzzy match types, check out this article:
Example
>>> import pandas as pd
>>> import pharmacy as rx
>>> df = pd.DataFrame(
... [('10000-1000-10','Acetaminophen 325mg',),
... ('20000-2000-30','Lisinopril 10mg','7'),
... ('30000-3000-30','Tylenol #3','c5'),
... ], columns = ['ndc','description','schedule'])
Potential Future Goals
Tools to work on data from...
- Drug data
- Use fuzzy and exact-matching to align different drug data files.
- Pricing
- Generic Equivalents
- Usage
- Shortages and availability
- Patient profiles
- Demographics
- Geolocation
- Prescription data
- Fills
- Claims
- Loss analysis
- Opportunity analysis
- Modeling
- Integrate pharmacy data with TensorFlow
- Generate large-scale insights
- Predict the outcomes of new clinical services based on current data
- Integration
- Incorporate data from ordering sites, etc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pharmacy-0.4.9.tar.gz
.
File metadata
- Download URL: pharmacy-0.4.9.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c47723cafb11f706ed598c10daecb86bddc0dcaf2f535b074484052ed360e32 |
|
MD5 | 0a632db4bef887122130414221a29429 |
|
BLAKE2b-256 | 8467a19554bfe73121832a70cb66ccba4a98c6a09c99b17fd7d961d14bdf1b49 |
File details
Details for the file pharmacy-0.4.9-py3-none-any.whl
.
File metadata
- Download URL: pharmacy-0.4.9-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ca0c86499404617d66623abd660652ccfdb398ada0978c317f88b7eb7875b4e |
|
MD5 | de2b1df1bf8267296ec0dcc74df17190 |
|
BLAKE2b-256 | fbf07ca47737e59bbdcf84cecf1afc5956844434f407e853fff11afc7fee73de |