drchrono


Namedrchrono JSON
Version 0.0.11 PyPI version JSON
download
home_pagehttps://github.com/hantswilliams/drchrono-wrapper
SummaryA wrapper for the drchrono API
upload_time2022-12-13 13:18:38
maintainer
docs_urlNone
authorHants Williams
requires_python
licenseMIT
keywords drchrono api wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # drchrono-wrapper

## Requirements 
- checkout the requirements.txt file 
- min. python version: 3.10 because of switch statement utilization that is only available starting with python 3.10

## API token requirement
- please visit for more information on how to generate: https://app.drchrono.com/api-docs/#section/Authorization 
- first load in the package and set the API token: 
    - `from drchrono.drc import drc` 
    - load in API token from .env: 
        - `drc_client = drc(api_key=os.getenv('DRCHRONO_API_TOKEN'))`
    - type in API token manually (not recommended):
        - `drc_client = drc(api_key=123321asddsa321123)`

## Endpoints currently covered: 
- *Fake data generation*:
    - Admin: 
        - Users 
        - Doctors 
    - Clinical: 
        - Patients 
        - Appointments 

- *Real data pulls*: 
    - Admin: 
        - Users 
        - Doctors 
    - Clinical: 
        - Patients 
        - Appointments 
        - Medications 
        - Documents

## Basic examples: 

### Getting real data: 
- Get all patients: 
    - `patient_all = drc_client.patients().patientlist`
    - If you want additional metadata, like custom demographics, add on verbose_true=True
        - `patient_all = drc_client.patients().patientlist(verbose_true=True)`
- Get a single patient: 
    - `patient_single = drc_client.patients().patient_single(patient_id='200110461')`
- Get a list of all doctors: 
    - `doctor_list = drc_client.doctors().doctorlist`
- Get a list of all appointments (requires a specific start date):
    - `appointments = drc_client.appointments().appointment_list(appointment_startdate='2019-01-01')`
- Pushing a existing pdf into a patient record as a document: 
    - Load the file: `files = {'document': open('src/new_test_myfile.pdf', 'rb')}`
    - Send the data over: `drc_client.documents().create_document(date='2017-01-01', description='testdocumentnov21_ANOTHER ONE' doctor=os.getenv('DRCHRONO_DOCTOR_ID'), patient=os.getenv('DRCHRONO_PATIENT_ID'), metatags='["fake-pdf", "document"]', document=files)`

### Generating fake dataset: 
- Fake dataset with linked patients and appointments; fake users and doctors; 
    - `f_users, f_doctors, f_patients, f_appointments = drc.faker().generate(20, 40, 150, 500)`

## Package admin: 
- Note to self, to create new version: 
    - update setup.py version number 
    - re-run `python setup.py sdist` to create new distribution 
    - upload to pypi with `twine upload dist/*` 


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hantswilliams/drchrono-wrapper",
    "name": "drchrono",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "drchrono api wrapper",
    "author": "Hants Williams",
    "author_email": "hantsawilliams@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/06/72/7d555d86e4454f30db534c1b0c2412a6dfc9f463b550d4b6f9eed51400ad/drchrono-0.0.11.tar.gz",
    "platform": null,
    "description": "# drchrono-wrapper\n\n## Requirements \n- checkout the requirements.txt file \n- min. python version: 3.10 because of switch statement utilization that is only available starting with python 3.10\n\n## API token requirement\n- please visit for more information on how to generate: https://app.drchrono.com/api-docs/#section/Authorization \n- first load in the package and set the API token: \n    - `from drchrono.drc import drc` \n    - load in API token from .env: \n        - `drc_client = drc(api_key=os.getenv('DRCHRONO_API_TOKEN'))`\n    - type in API token manually (not recommended):\n        - `drc_client = drc(api_key=123321asddsa321123)`\n\n## Endpoints currently covered: \n- *Fake data generation*:\n    - Admin: \n        - Users \n        - Doctors \n    - Clinical: \n        - Patients \n        - Appointments \n\n- *Real data pulls*: \n    - Admin: \n        - Users \n        - Doctors \n    - Clinical: \n        - Patients \n        - Appointments \n        - Medications \n        - Documents\n\n## Basic examples: \n\n### Getting real data: \n- Get all patients: \n    - `patient_all = drc_client.patients().patientlist`\n    - If you want additional metadata, like custom demographics, add on verbose_true=True\n        - `patient_all = drc_client.patients().patientlist(verbose_true=True)`\n- Get a single patient: \n    - `patient_single = drc_client.patients().patient_single(patient_id='200110461')`\n- Get a list of all doctors: \n    - `doctor_list = drc_client.doctors().doctorlist`\n- Get a list of all appointments (requires a specific start date):\n    - `appointments = drc_client.appointments().appointment_list(appointment_startdate='2019-01-01')`\n- Pushing a existing pdf into a patient record as a document: \n    - Load the file: `files = {'document': open('src/new_test_myfile.pdf', 'rb')}`\n    - Send the data over: `drc_client.documents().create_document(date='2017-01-01', description='testdocumentnov21_ANOTHER ONE' doctor=os.getenv('DRCHRONO_DOCTOR_ID'), patient=os.getenv('DRCHRONO_PATIENT_ID'), metatags='[\"fake-pdf\", \"document\"]', document=files)`\n\n### Generating fake dataset: \n- Fake dataset with linked patients and appointments; fake users and doctors; \n    - `f_users, f_doctors, f_patients, f_appointments = drc.faker().generate(20, 40, 150, 500)`\n\n## Package admin: \n- Note to self, to create new version: \n    - update setup.py version number \n    - re-run `python setup.py sdist` to create new distribution \n    - upload to pypi with `twine upload dist/*` \n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A wrapper for the drchrono API",
    "version": "0.0.11",
    "split_keywords": [
        "drchrono",
        "api",
        "wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "816d6048792aae7e3e2ad28330536e51",
                "sha256": "b39d52e1cb458f9d4c13cd3c3a17e7093f54cd1f736c3bdaa947fe3524b5221e"
            },
            "downloads": -1,
            "filename": "drchrono-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "816d6048792aae7e3e2ad28330536e51",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16194,
            "upload_time": "2022-12-13T13:18:38",
            "upload_time_iso_8601": "2022-12-13T13:18:38.122651Z",
            "url": "https://files.pythonhosted.org/packages/06/72/7d555d86e4454f30db534c1b0c2412a6dfc9f463b550d4b6f9eed51400ad/drchrono-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-13 13:18:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hantswilliams",
    "github_project": "drchrono-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "drchrono"
}
        
Elapsed time: 0.01988s