{ "info": { "author": "Yubin Park", "author_email": "yubin.park@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# hcuppy \n\nA Python package for [H-CUP Tools and Software](https://www.hcup-us.ahrq.gov/tools_software.jsp).\nThe modules implemented in this package are as follows:\n- \"[CCS (Clinical Classification Software)](https://www.hcup-us.ahrq.gov/toolssoftware/ccs10/ccs10.jsp)\" converts ICD-10 diagnosis and procedure codes to clinically meaningful groups\n- \"[CCI (Chronic Condition Indicator)](https://www.hcup-us.ahrq.gov/toolssoftware/chronic_icd10/chronic_icd10.jsp)\" identifies chronic conditions from ICD-10 diagnosis codes\n- \"[Elixhauser Comordibity Index](https://www.hcup-us.ahrq.gov/toolssoftware/comorbidityicd10/comorbidity_icd10.jsp)\" calculates both readmission and mortality risks using a set of ICD-10 diagnosis codes\n- \"[Procedure Classes](https://www.hcup-us.ahrq.gov/toolssoftware/procedureicd10/procedure_icd10.jsp)\" identify if a given ICD-10 procedure code is Minor/Major Diagnosis/Therapeutic\n- \"[Utilization Flags](https://www.hcup-us.ahrq.gov/toolssoftware/utilflagsicd10/utilflag_icd10.jsp)\" identify if a combination of UB40 revenue codes and ICD-10 procedure codes indicates (or implies) a certain resource utilization e.g. Intensive Care Unit, Ultrasound, X-Ray, etc.\n- \"[Surgery Flags](https://www.hcup-us.ahrq.gov/toolssoftware/surgflags/surgeryflags.jsp)\" identify if a CPT code is a surgery related or not. *NOTE that, to use this module, users must agree to an additional license agreement with the AMA for using CPT codes [here](https://www.hcup-us.ahrq.gov/toolssoftware/surgflags/surgeryflags_license.jsp)*.\n\nNOTE that this package does not support for ICD-9.\n\n## Installing\n\nInstalling from the source:\n```\n$ git clone git@github.com:yubin-park/hcuppy.git\n$ cd hcuppy\n$ python setup.py develop\n```\n\nOr, simply using `pip`:\n```\n$ pip install hcuppy\n```\n\n## File Structure\n- `hcuppy/`: The package source code is located here.\n - `data/`: The raw data files downloaded from the H-CUP website.\n - `ccs.py`: a module for CCS\n - `cci.py`: a module for CCI\n - `elixhauser.py`: a module for Elixhauser Comorbidity Index\n - `prcls.py`: a module for Procedure Class\n - `uflag.py`: a module for Utilization Flags\n - `sflag.py`: a module for Surgery Flags\n - `utils.py`: utility functions for reading data files.\n- `tests/`: test scripts to check the validity of the outputs.\n- `LICENSE.txt`: Apache 2.0.\n- `README.md`: This README file.\n- `setup.py`: a set-up script.\n\n## Code Examples\n`hcuppy` is really simple to use. \nPlease see some examples below.\nNOTE that all functions used below have docstrings. \nIf you want to see the input parameter specifications,\nplease type `print(..__doc__)`.\n\n### Using CCS\n```python\n>>> import json\n>>> from hcuppy.ccs import CCSEngine\n>>> ce = CCSEngine(mode=\"dx\")\n>>> out = ce.get_ccs([\"E119\", \"I10\"])\n>>> print(json.dumps(out, indent=2))\n[\n {\n \"ccs\": \"49\",\n \"ccs_desc\": \"Diabetes mellitus without complication\",\n \"ccs_lv1\": \"3\",\n \"ccs_lv1_desc\": \"Endocrine; nutritional; and metabolic diseases and immunity disorders\",\n \"ccs_lv2\": \"3.2\",\n \"ccs_lv2_desc\": \"Diabetes mellitus without complication [49.]\"\n },\n {\n \"ccs\": \"98\",\n \"ccs_desc\": \"Essential hypertension\",\n \"ccs_lv1\": \"7\",\n \"ccs_lv1_desc\": \"Diseases of the circulatory system\",\n \"ccs_lv2\": \"7.1\",\n \"ccs_lv2_desc\": \"Hypertension\"\n }\n]\n>>>\n```\n\n### Using CCI\n```python\n>>> from hcuppy.cci import CCIEngine\n>>> ce = CCIEngine()\n>>> out = ce.get_cci([\"E119\"])\n>>> print(json.dumps(out, indent=2))\n[\n {\n \"is_chronic\": true,\n \"body_system\": \"3\",\n \"body_system_desc\": \"Endocrine, nutritional, and metabolic diseases and immunity disorders\"\n }\n]\n```\n\n### Using Elixhauser Comorbidity Index\n```python\n>>> from hcuppy.elixhauser import ElixhauserEngine\n>>> ee = ElixhauserEngine()\n>>> out = ee.get_elixhauser([\"E119\", \"E108\", \"I10\", \"I110\", \"Z944\"])\n>>> print(json.dumps(out, indent=2))\n{\n \"cmrbdt_lst\": [\n \"LIVER\",\n \"DMCX\",\n \"HTNCX\",\n \"CHF\"\n ],\n \"rdmsn_scr\": 31,\n \"mrtlt_scr\": 9\n}\n>>>\n```\n\n### Using Procedure Class\n```python\n>>> from hcuppy.prcls import PrClsEngine\n>>> pce = PrClsEngine()\n>>> out = pce.get_prcls([\"B231Y0Z\"])\n>>> print(json.dumps(out, indent=2))\n[\n {\n \"class\": \"1\",\n \"desc\": \"Minor Diagnostic\"\n }\n]\n>>>\n```\n\n### Using Utilization Flag\n```python\n>>> from hcuppy.uflag import UFlagEngine\n>>> ufe = UFlagEngine()\n>>> out = ufe.get_uflag(rev_lst=[\"0380\"], pr_lst=[\"BB0DZZZ\"])\n>>> print(json.dumps(out, indent=2))\n[\n \"Blood\",\n \"Chest X-Ray\"\n]\n>>>\n```\n\nPlease refer to the test scripts under the `tests/` folder if you want to see other example use cases.\n\n## License\nApache 2.0\n\n## Authors\nYubin Park, PhD\n\n## References\n- https://www.hcup-us.ahrq.gov/\n- https://www.hcup-us.ahrq.gov/tools_software.jsp\n- https://cran.r-project.org/web/packages/comorbidity/vignettes/comorbidityscores.html\n- https://github.com/modusdatascience/ccs\n\n\n\n\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yubin-park/hcuppy", "keywords": "", "license": "Apaceh 2.0", "maintainer": "", "maintainer_email": "", "name": "hcuppy", "package_url": "https://pypi.org/project/hcuppy/", "platform": "", "project_url": "https://pypi.org/project/hcuppy/", "project_urls": { "Homepage": "https://github.com/yubin-park/hcuppy" }, "release_url": "https://pypi.org/project/hcuppy/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "hcuppy is a Python implementation of HCUP Tools and Software", "version": "0.0.7" }, "last_serial": 5624530, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "158373398257b8c27c762db2dff8029f", "sha256": "9c9abf721603d6b8e0fa86226b1a90a3cca6d62fe4639f38c5f08cc25ae711bc" }, "downloads": -1, "filename": "hcuppy-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "158373398257b8c27c762db2dff8029f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13912, "upload_time": "2019-04-27T03:12:33", "url": "https://files.pythonhosted.org/packages/09/44/e7f8f6432b4d4d180309ecafcbc6aed6aac93719cc506c33df2aaea51660/hcuppy-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e423ca20a6219da0d08f27fd6b831b9c", "sha256": "b87f35abd424378c8087770b4aea72fceb769b14d5b820fb59c4a4b25d4dcbb6" }, "downloads": -1, "filename": "hcuppy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e423ca20a6219da0d08f27fd6b831b9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7838, "upload_time": "2019-04-27T03:12:39", "url": "https://files.pythonhosted.org/packages/f4/d2/380c9d928ea85120fb9304804944012a0c0db40a1fcf18d9175ffffe4466/hcuppy-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "405da708b616e6d577e681ef64838b3b", "sha256": "f861b71ede1aa20fa7ad24ff253c4fc62298db7375f4e6822517dff61704c0b8" }, "downloads": -1, "filename": "hcuppy-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "405da708b616e6d577e681ef64838b3b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2441071, "upload_time": "2019-04-27T03:21:38", "url": "https://files.pythonhosted.org/packages/19/2f/a85887f48807cca8ce3220aa5612d6d14181132e7ed3e2622ba2cbbf987d/hcuppy-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb7073f2756f2cb52833960e2cde9aa9", "sha256": "9d9d7c2552830295e63f65312b4a807fca365293dc598039fba5a553648ae4c2" }, "downloads": -1, "filename": "hcuppy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "eb7073f2756f2cb52833960e2cde9aa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7947, "upload_time": "2019-04-27T03:21:40", "url": "https://files.pythonhosted.org/packages/9c/38/8137955bb76549c8347789bbc7c0d33ea3c28a8bd821ea495ee7ee10f436/hcuppy-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "f2cf62b5f8976c6092b83f3cda33ffca", "sha256": "004f8f801c9754d26078601d76c881d02bd49b1c3ee607de4c4bee26d12f15e6" }, "downloads": -1, "filename": "hcuppy-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f2cf62b5f8976c6092b83f3cda33ffca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2441080, "upload_time": "2019-07-10T19:28:43", "url": "https://files.pythonhosted.org/packages/38/48/917c288ee6b3f94ca2ce781a444f93a248997367935b90806cbce4e0c934/hcuppy-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07d6ef05320cd3df48078582b1e413db", "sha256": "8d5ef9cb0fda36184e4eddacfb64050f0208320cc254101e1412a2b1a884563f" }, "downloads": -1, "filename": "hcuppy-0.0.3.tar.gz", "has_sig": false, "md5_digest": "07d6ef05320cd3df48078582b1e413db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7976, "upload_time": "2019-07-10T19:28:47", "url": "https://files.pythonhosted.org/packages/37/1e/85f4f2f9e8147419eaa78b17291935c31df6ff5cbcfe44159a3adb65f7ef/hcuppy-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "f4946df8d8eb5e5603e4027ec4916b31", "sha256": "416d0c0829c8953b35a7c290142286c0ca5e568b0a52c4b7b54b4503b030ba2e" }, "downloads": -1, "filename": "hcuppy-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f4946df8d8eb5e5603e4027ec4916b31", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2441086, "upload_time": "2019-07-10T19:35:13", "url": "https://files.pythonhosted.org/packages/aa/c2/9e489ee43a155976ec2f8f7cff42dbca99d52935f6ca346e09f8c79bad1c/hcuppy-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6fd4528adfb5868acb60a2dc8d9d9dde", "sha256": "ff723c33e997f6f184b195e9e15f29f9b97823a120f3cf2fc5e2eff810d98195" }, "downloads": -1, "filename": "hcuppy-0.0.4.tar.gz", "has_sig": false, "md5_digest": "6fd4528adfb5868acb60a2dc8d9d9dde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7974, "upload_time": "2019-07-10T19:35:17", "url": "https://files.pythonhosted.org/packages/b0/c2/2adc486e04acfce012500098f997fa113ff797a285bd42ced47b4a203ab7/hcuppy-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "8eb09f44eb8865dbe51f5ae6e2b97d83", "sha256": "4aadbaf84aba079021b535a8dae8dc7d5ac011fdaa55ee757e3851dbd9d89dcb" }, "downloads": -1, "filename": "hcuppy-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "8eb09f44eb8865dbe51f5ae6e2b97d83", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2443422, "upload_time": "2019-08-01T19:16:42", "url": "https://files.pythonhosted.org/packages/f9/74/22ae022d957d8ab916bc5260cc642717be32eff87780324a51bb4fcc4d32/hcuppy-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "285d570e15838efc3a494fefc5df1768", "sha256": "57c7038813b507828eaad83ee0bdded00851492918b9c74b1566195371e5d043" }, "downloads": -1, "filename": "hcuppy-0.0.5.tar.gz", "has_sig": false, "md5_digest": "285d570e15838efc3a494fefc5df1768", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9514, "upload_time": "2019-08-01T19:16:46", "url": "https://files.pythonhosted.org/packages/60/e6/a6b963215b84f327cd4f1c05a34d95ab3bba03ad17441140544340701148/hcuppy-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "470b96af759bd874e452c7a6633d23a7", "sha256": "10915e4fc27a7b358b054c9db5bb31758364f9d02c1c41370d7be0f317118988" }, "downloads": -1, "filename": "hcuppy-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "470b96af759bd874e452c7a6633d23a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2443528, "upload_time": "2019-08-02T13:08:44", "url": "https://files.pythonhosted.org/packages/88/66/df995cf780b5bb0559c82282b9a7cc2edafd86eb99e7ee666e7952067df3/hcuppy-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "131b8f2e4df25253eb8f7d02711c0037", "sha256": "dc6ccbbd16c68cc3a528a21d4511c767d67a23115a246f6d0aacf36407626e4c" }, "downloads": -1, "filename": "hcuppy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "131b8f2e4df25253eb8f7d02711c0037", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9551, "upload_time": "2019-08-02T13:08:49", "url": "https://files.pythonhosted.org/packages/f0/5a/67ffa7d0c012fcf1f25920d80d08d274382b99283a63525be0b0c763aad5/hcuppy-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "4b0270a99ca1f7044b73aef069884fd8", "sha256": "fd05e9fe2836c561c0f1e10a36503e628f2d0570bc43637a0af7e79c47eb8046" }, "downloads": -1, "filename": "hcuppy-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "4b0270a99ca1f7044b73aef069884fd8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2444823, "upload_time": "2019-08-02T14:36:14", "url": "https://files.pythonhosted.org/packages/da/50/90a7a6b85202281ad4c63fbf03022dedbed8f45ceddfde7c2edb22e3d33d/hcuppy-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1eb2fa0a60dec31a6a6f0aeef7110704", "sha256": "d88d70769681dcd0fb4ae82222adfadf515b92cde83c57f8592bdf65d137dd13" }, "downloads": -1, "filename": "hcuppy-0.0.7.tar.gz", "has_sig": false, "md5_digest": "1eb2fa0a60dec31a6a6f0aeef7110704", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9656, "upload_time": "2019-08-02T14:36:20", "url": "https://files.pythonhosted.org/packages/ab/ed/760869dfe841b90991d6a463394d02fd8962976e8b2760849348f01e2957/hcuppy-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4b0270a99ca1f7044b73aef069884fd8", "sha256": "fd05e9fe2836c561c0f1e10a36503e628f2d0570bc43637a0af7e79c47eb8046" }, "downloads": -1, "filename": "hcuppy-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "4b0270a99ca1f7044b73aef069884fd8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2444823, "upload_time": "2019-08-02T14:36:14", "url": "https://files.pythonhosted.org/packages/da/50/90a7a6b85202281ad4c63fbf03022dedbed8f45ceddfde7c2edb22e3d33d/hcuppy-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1eb2fa0a60dec31a6a6f0aeef7110704", "sha256": "d88d70769681dcd0fb4ae82222adfadf515b92cde83c57f8592bdf65d137dd13" }, "downloads": -1, "filename": "hcuppy-0.0.7.tar.gz", "has_sig": false, "md5_digest": "1eb2fa0a60dec31a6a6f0aeef7110704", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9656, "upload_time": "2019-08-02T14:36:20", "url": "https://files.pythonhosted.org/packages/ab/ed/760869dfe841b90991d6a463394d02fd8962976e8b2760849348f01e2957/hcuppy-0.0.7.tar.gz" } ] }