Collection of Python modules for processing PreviseDx Esopredict PDF final report files.
Project description
PreviseDx Esopredict PDF File Utils
Collection of Python modules for processing PreviseDx Esopredict PDF files
Usage
# from pdfrw import PdfReader, PdfWriter
from previsedx_esopredict_pdf_file_utils import EsopredictPDFWriter as Writer
from previsedx_esopredict_pdf_file_utils import constants
import yaml
import os
config_file = constants.DEFAULT_CONFIG_FILE
# Load configuration file into dictionary.
config = yaml.safe_load(open(config_file))
outdir = os.path.join(
constants.DEFAULT_OUTDIR_BASE,
os.path.basename(__file__),
constants.DEFAULT_TIMESTAMP,
)
# Create the output directory if it does not exist
os.makedirs(outdir, exist_ok=True)
# Output path for the populated PDF
outfile = os.path.join(outdir, "populated_output.pdf")
writer = Writer(
config=config,
config_file=config_file,
outdir=outdir,
outfile=outfile,
verbose=True,
)
lookup = {
"patient_name": "John Doe",
"date_of_birth": "2024-01-02",
"provider_name": "Dr. Jack Tripper",
"gender": "Male",
"medical_record_id": "12345",
"previse_lab_id": "11112",
"specimen_id": "7890",
"collection_date": "2024-01-02",
"date_received": "2024-02-02",
"date_reported": "2024-03-02",
"clinic": "Johns Hopkins Medical Center",
"address": "123 Main St",
"city_state_zip": "Baltmore, MD 12345",
"treating_provider": "Dr. Smith",
"barretts_diagnosis": "Something, Yes",
"segment_length": "1.2",
"risk_level": "High",
"range_score": "8",
"five_year_probability_of_progression": "14%",
"notes": "Some notes from provider",
}
writer.write_file(**lookup)
History
0.1.0 (2024-09-08)
First release on PyPI.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file previsedx_esopredict_pdf_file_utils-0.1.1.tar.gz.
File metadata
- Download URL: previsedx_esopredict_pdf_file_utils-0.1.1.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
249812af35d7f278a74c811c06ded40407b7699beb2c633f15cf4b40c642e774
|
|
| MD5 |
7824b326019a1ada354d509e0e3841f8
|
|
| BLAKE2b-256 |
39dc91b0871e96d05dc0257915e627c654854c0d73b4bcb2228623ab379adff4
|
File details
Details for the file previsedx_esopredict_pdf_file_utils-0.1.1-py3-none-any.whl.
File metadata
- Download URL: previsedx_esopredict_pdf_file_utils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc89f34b6d1ba8354013bbf85548c613ed57e7b361210324fe76b55c41a85ca7
|
|
| MD5 |
45afe85cc12f3dc3f1f6baefdbf57761
|
|
| BLAKE2b-256 |
a1a58de768621cd5f9be2faaaec4c78f6cb7171f1d2b0a4358a4f9b36afb3237
|