Skip to content

Extracting structured data from unstructured natural language in medical transcriptions using the OpenAI API

Notifications You must be signed in to change notification settings

P-AlaKara/genAI-data-organization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Organizing Medical Transcriptions with the OpenAI API

This project is part of Datacamp's Associate AI Enginner for Developer's course. It aims to extract structured patient details from medical transcriptions and map recommended treatments to ICD-10 / ICD-10-PCS codes using the OpenAI API.

Files

Quick overview

  • The notebook loads data/transcriptions.csv into a pandas DataFrame (df) and calls the OpenAI chat completion API to:
    1. Extract patient age and recommended treatment from medical transcripts.
    2. Map the recommended treatment to an ICD-10 or ICD-10-PCS code.
    3. NOTE: We use the openAI API and specifically the function calling ability to extract details and consequently map the ICD code.
  • Results are combined into a single final dataframe.

Requirements

  • Python 3.8+
  • pip packages: pandas, openai
  • An OpenAI API key set in the environment.

Install example

pip install pandas openai

About

Extracting structured data from unstructured natural language in medical transcriptions using the OpenAI API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published