previsedx-esopredict-pdf-file-utils


Nameprevisedx-esopredict-pdf-file-utils JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/sundaram-previsedx/previsedx-eospredict-pdf-file-utils
SummaryCollection of Python modules for processing PreviseDx Esopredict PDF final report files.
upload_time2025-02-15 14:03:02
maintainerNone
docs_urlNone
authorJaideep Sundaram
requires_python>=3.10
licenseNone
keywords previsedx_esopredict_pdf_file_utils
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===================================
PreviseDx Esopredict PDF File Utils
===================================

Collection of Python modules for processing PreviseDx Esopredict PDF files


Usage
-----

.. code-block:: python

    # 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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sundaram-previsedx/previsedx-eospredict-pdf-file-utils",
    "name": "previsedx-esopredict-pdf-file-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "previsedx_esopredict_pdf_file_utils",
    "author": "Jaideep Sundaram",
    "author_email": "sundaram.previse@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/39/dc/91b0871e96d05dc0257915e627c654854c0d73b4bcb2228623ab379adff4/previsedx_esopredict_pdf_file_utils-0.1.1.tar.gz",
    "platform": null,
    "description": "===================================\nPreviseDx Esopredict PDF File Utils\n===================================\n\nCollection of Python modules for processing PreviseDx Esopredict PDF files\n\n\nUsage\n-----\n\n.. code-block:: python\n\n    # from pdfrw import PdfReader, PdfWriter\n    from previsedx_esopredict_pdf_file_utils import EsopredictPDFWriter as Writer\n    from previsedx_esopredict_pdf_file_utils import constants\n    import yaml\n    import os\n\n    config_file = constants.DEFAULT_CONFIG_FILE\n\n    # Load configuration file into dictionary.\n    config = yaml.safe_load(open(config_file))\n\n    outdir = os.path.join(\n        constants.DEFAULT_OUTDIR_BASE,\n        os.path.basename(__file__),\n        constants.DEFAULT_TIMESTAMP,\n    )\n\n    # Create the output directory if it does not exist\n    os.makedirs(outdir, exist_ok=True)\n\n    # Output path for the populated PDF\n    outfile = os.path.join(outdir, \"populated_output.pdf\")\n\n    writer = Writer(\n        config=config,\n        config_file=config_file,\n        outdir=outdir,\n        outfile=outfile,\n        verbose=True,\n    )\n\n    lookup = {\n        \"patient_name\": \"John Doe\",\n        \"date_of_birth\": \"2024-01-02\",\n        \"provider_name\": \"Dr. Jack Tripper\",\n        \"gender\": \"Male\",\n        \"medical_record_id\": \"12345\",\n        \"previse_lab_id\": \"11112\",\n        \"specimen_id\": \"7890\",\n        \"collection_date\": \"2024-01-02\",\n        \"date_received\": \"2024-02-02\",\n        \"date_reported\": \"2024-03-02\",\n        \"clinic\": \"Johns Hopkins Medical Center\",\n        \"address\": \"123 Main St\",\n        \"city_state_zip\": \"Baltmore, MD 12345\",\n        \"treating_provider\": \"Dr. Smith\",\n        \"barretts_diagnosis\": \"Something, Yes\",\n        \"segment_length\": \"1.2\",\n        \"risk_level\": \"High\",\n        \"range_score\": \"8\",\n        \"five_year_probability_of_progression\": \"14%\",\n        \"notes\": \"Some notes from provider\",\n    }\n\n    writer.write_file(**lookup)\n\n\n=======\nHistory\n=======\n\n0.1.0 (2024-09-08)\n------------------\n\n* First release on PyPI.\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Collection of Python modules for processing PreviseDx Esopredict PDF final report files.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/sundaram-previsedx/previsedx-eospredict-pdf-file-utils"
    },
    "split_keywords": [
        "previsedx_esopredict_pdf_file_utils"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a1a58de768621cd5f9be2faaaec4c78f6cb7171f1d2b0a4358a4f9b36afb3237",
                "md5": "45afe85cc12f3dc3f1f6baefdbf57761",
                "sha256": "fc89f34b6d1ba8354013bbf85548c613ed57e7b361210324fe76b55c41a85ca7"
            },
            "downloads": -1,
            "filename": "previsedx_esopredict_pdf_file_utils-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "45afe85cc12f3dc3f1f6baefdbf57761",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 12182,
            "upload_time": "2025-02-15T14:03:00",
            "upload_time_iso_8601": "2025-02-15T14:03:00.507196Z",
            "url": "https://files.pythonhosted.org/packages/a1/a5/8de768621cd5f9be2faaaec4c78f6cb7171f1d2b0a4358a4f9b36afb3237/previsedx_esopredict_pdf_file_utils-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "39dc91b0871e96d05dc0257915e627c654854c0d73b4bcb2228623ab379adff4",
                "md5": "7824b326019a1ada354d509e0e3841f8",
                "sha256": "249812af35d7f278a74c811c06ded40407b7699beb2c633f15cf4b40c642e774"
            },
            "downloads": -1,
            "filename": "previsedx_esopredict_pdf_file_utils-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7824b326019a1ada354d509e0e3841f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 16144,
            "upload_time": "2025-02-15T14:03:02",
            "upload_time_iso_8601": "2025-02-15T14:03:02.274211Z",
            "url": "https://files.pythonhosted.org/packages/39/dc/91b0871e96d05dc0257915e627c654854c0d73b4bcb2228623ab379adff4/previsedx_esopredict_pdf_file_utils-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-15 14:03:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sundaram-previsedx",
    "github_project": "previsedx-eospredict-pdf-file-utils",
    "github_not_found": true,
    "lcname": "previsedx-esopredict-pdf-file-utils"
}
        
Elapsed time: 1.87764s