IndicPy4Health
IndicPy4Health is a Lightweight, Fast, and Intuitive Indicator Calculations Python Library from Health data.
Example
import pandas as pd
from indicpy4health import RuleEngine, MatchAnyWhere, run_indicators
hosp_dataframe = pd.DataFrame({
"episode_id": [1, 2, 3],
"age": [45, 60, 32],
"diagnosis1": ["F10.10", "I20", "I60"],
"diagnosis2": ["E11", "J45", "I25"],
"diagnosis3": ["I60", "K35", "F10.120"],
"present_on_admission_d1": [False, False, False],
"present_on_admission_d2": [False, True, False],
"present_on_admission_d3": [False, True, True],
})
reng = RuleEngine(hosp_dataframe, "episode_id")
target_columns = ["diagnosis2", "diagnosis3"]
definition_codes = ["F10.10", "F10.11", "F10.120", "F10.121"]
filter_columns = ["present_on_admission_d2", "present_on_admission_d3"]
lookup_values = ["true"]
alcohol_indicator_poa = MatchAnyWhere(
reng,
"alcohol_i_poa",
target_columns,
definition_codes,
filter_columns,
lookup_values
)
alcohol_i_regex_poa = MatchAnyWhere(
reng,
"alcohol_i_regex_poa",
target_columns,
["F10"],
filter_columns,
lookup_values,
regex_prefix_search=True
)
# Include the indicators in a list and apply them
indicators_list = [alcohol_indicator_poa, alcohol_i_regex_poa]
run_indicators(self.reng,
indicators_list,
append_results=False,
csv_path="./results.csv"
)
IndicatorBuilder
Effortlessly generate indicator calculation script templates using 'IndicatorBuilder'. This web tool reads a CSV file, where each column represents an indicator by including its respective definition codes, and outputs a script template ready to be copied and used in R or Python. You can streamline your data analysis workflow with 'IndicatorBuilder'.
The use of 'IndicatorBuilder' complements the Python library IndicPy4Health and the R package IndicR, providing an easy-to-use tool scripting the definition of any indicator within your preferred programming environment.
📜 Disclaimer
This software is provided "as is," without any warranties of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement.
In no event shall the authors, contributors, or maintainers be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to loss of use, data, or profits), regardless of the cause and under any liability theory, whether in contract, strict liability, or tort (including negligence or any other cause), arising in any way from the use of this software, even if advised of the possibility of such damages.
The user assumes full responsibility for the use of this library, including evaluating its suitability and safety in the context of their application.
Metadata
Release files for indicpy4health 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| indicpy4health-0.1.2.tar.gz | 17.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| indicpy4health-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.4 kB
Release files / indicpy4health-0.1.2.tar.gz
| Download URL | indicpy4health-0.1.2.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58a91397b2b758fda806ab7cd990f76e044f0363284a08a4fb4c1e1927011d45
|
|
BLAKE2b-256 checksum How to use checksums |
c456f31225ebd07b05a5d1ad3bd7b7d8881ab5e7a3c84cfacd039eee69560835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.0 Linux/6.11.0-1012-azure
|
Release files / indicpy4health-0.1.2-py3-none-any.whl
| Download URL | indicpy4health-0.1.2-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48b52319b96e3d5d26ca68c47e88d8953f120d9b6f73f7aae4b3fcca70e51bee
|
|
BLAKE2b-256 checksum How to use checksums |
b0b3736b102539a8d3cf6da5d6487949dc63005f170b44ef35d9902412273945
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.0 Linux/6.11.0-1012-azure
|