Automates the creation of demand letters based on medical PDF records.
Project description
Injury Summary Generator
This project automates the process of creating a demand letter for a client based on medical records in PDF format. It extracts relevant information from medical records and generates a "Summary of Injuries" section in a table format.
Data Source
The ICD-10 codes used in this project are sourced from the Centers for Medicare & Medicaid Services (CMS) website. You can find the official ICD-10 code lists at:
https://www.cms.gov/medicare/coordination-benefits-recovery/overview/icd-code-lists
This authoritative source ensures that our project uses up-to-date and accurate ICD-10 codes for classifying diagnoses.
Features
- PDF Processing: Reads multiple PDF files containing medical records and extracts text.
- Information Extraction: Extracts key information such as visit dates, diagnoses, and page numbers.
- ICD-10 Code Determination: Determines appropriate ICD-10 codes for extracted diagnoses.
- PDF Generation: Creates a summary PDF with a formatted table of extracted information.
Installation
-
Clone the repository:
git clone https://github.com/izgorodin/injury-summary-generator.git cd injury-summary-generator
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
Usage
Run the main script with the following command:
python src/generate_summary_of_injuries.py <input_folder> <output_folder>
Where:
<input_folder>
is the path to the folder containing the medical record PDF files.<output_folder>
is the path where the output summary PDF will be saved.
Project Structure
src/
: Contains the source code for the project.generate_summary_of_injuries.py
: Main script that orchestrates the entire process.pdf_reader.py
: Handles reading PDF files and extracting text.date_extractor.py
: Extracts dates from PDF text.diagnosis_extractor.py
: Extracts diagnoses from PDF text.icd_code_determiner.py
: Determines ICD-10 codes based on diagnoses.pdf_creator.py
: Creates the final summary PDF.
tests/
: Contains unit tests for the project.test_icd_code_determiner.py
: Tests for ICD code determination.test_generate_summary_of_injuries.py
: Tests for the main summary generation.test_pdf_reader.py
: Tests for PDF reading functionality.test_pdf_creator.py
: Tests for PDF creation functionality.
requirements.txt
: Lists all Python dependencies for the project.README.md
: Provides information about the project and how to use it..gitignore
: Specifies files and directories to be ignored by Git.
Contributing
Contributions to this project are welcome. Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Make your changes and commit them (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Create a new Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Hashes for generate_summary_of_injuries-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da4ee5a4befe88f723b45650687f0e9e1403c838b47182b2b465e0feae78203 |
|
MD5 | ce97a499f41536ce293e14dcf850567f |
|
BLAKE2b-256 | 45d732ef2e4aa33807e5eed877bb898f8ac07b3e0d781ffa3dc8ba739141af5e |
Hashes for generate_summary_of_injuries-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99df4eda12c10923b644f31de1e52479906d88edda0b96b74088091c39b62998 |
|
MD5 | 01c908d1b3af32107ecdea5962e55c4e |
|
BLAKE2b-256 | cdf15a614d4e6e85166aef7f114208f7cf4440d64d72ec973af7bca2ce741588 |