Skip to main content

A Python library for building a network graph of providers in care teams from EHR data

Project description

teamwork

teamwork is a Python library designed to aid in the study of medical care team collaboration.

Specifically, the library takes EHR data as input and does the following:

  1. identifies the members of medical care teams per patient visit
  2. builds a network graph for each care team based on their common patients in the previous 90 days

The resulting care team network graphs can be used to compute the cumulative collaborative experience of care teams and other metrics.

Installation

Use the package manager pip to install teamwork.

pip install -i https://test.pypi.org/simple/ teamwork

Usage

import teamwork
import pandas as pd

# read medical notes (3 columns) into pandas DataFrame
notes_df = pd.read_csv("notes_file.csv", parse_dates=[2])
# enforce column names
notes_df.columns = ['discharge_id', 'dr', 'date']
# set a 90 day window to find collaboration among care teams
WINDOW = 90
# identify care teams within 2 day increments 
STEP = 2

# the study runner is a generator
get_care_dates = teamwork.TeamworkStudyRunner(notes_df, WINDOW, STEP)

# gather care teams into a list
care_team_list = [care_team for care_date in get_care_dates for care_team in care_date]

# do something with the care team network graph
for care_team in care_team_list:
    do_something(care_team.G)

A sample study can be found here

Contributors

Contributor Role
Henry Philofsky Concept, SME
Grant DeLong Developer

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teamwork-0.1.4.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file teamwork-0.1.4.tar.gz.

File metadata

  • Download URL: teamwork-0.1.4.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0

File hashes

Hashes for teamwork-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e73063e9241eacd63611c6e5c63b9e4e652893cf607c4601dd2eab66c9719d55
MD5 22b5aa1d4b18e60e1f56ade1f8a2a4a2
BLAKE2b-256 3badd8f28aa4b5d79273026eaa8142d3f7cbe74d25232e5b0837ea106bdb8025

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page