项目作者: gtdelong

项目描述 :
teamwork is a Python library designed to aid in the study of medical care team collaboration.
高级语言: Jupyter Notebook
项目地址: git://github.com/gtdelong/teamwork.git
创建时间: 2021-01-10T13:41:24Z
项目社区:https://github.com/gtdelong/teamwork

开源协议:MIT License

下载


Teamwork

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

Specifically, the library takes electronic health record encounter-level data (both discharges and notes) as inputs and does the following:
1) Identifies the members of medical care teams for unique patient visits based on medical note meta-data
2) Builds a network graph for each care team based on their common patients in the previous 90 days. The nodes of the graph are note authors, and the edge weights are the number of days where the authors have both written a note on common patient

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.

  1. pip install teamwork

Usage

  1. import pandas as pd
  2. from teamwork import teamwork as tw
  3. # read medical notes (3 columns) into pandas DataFrame
  4. test_df = pd.read_csv('../data/sample_notes.csv')
  5. # enforce date columns
  6. test_df['date'] = pd.to_datetime(test_df['date'])
  7. test_df['arrive_date'] = pd.to_datetime(test_df['arrive_date'])
  8. # set a 90 day window to find collaboration among care teams
  9. WINDOW = 90
  10. # identify care teams within 2 day increments
  11. STEP = 2
  12. corpus = tw.TeamworkCorpus(test_df)
  13. # now you can do something with the care team network graph
  14. for visit_id, item in corpus.team_experience_dict.items():
  15. print(item['graph'])

Contributors

Contributor Role
Henry Philofsky Concept, SME
Grant DeLong Developer, Architect

License

MIT