Skip to content
Open
1 change: 1 addition & 0 deletions docs/api/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ Available Datasets
datasets/pyhealth.datasets.SleepEDFDataset
datasets/pyhealth.datasets.EHRShotDataset
datasets/pyhealth.datasets.Support2Dataset
datasets/pyhealth.datasets.EOLMistrustDataset
datasets/pyhealth.datasets.BMDHSDataset
datasets/pyhealth.datasets.COVID19CXRDataset
datasets/pyhealth.datasets.ChestXray14Dataset
Expand Down
18 changes: 18 additions & 0 deletions docs/api/datasets/pyhealth.datasets.EOLMistrustDataset.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pyhealth.datasets.EOLMistrustDataset
======================================

MIMIC-III dataset wrapper used to replicate Boag et al. 2018,
*"Racial Disparities and Mistrust in End-of-Life Care"*
(`paper <https://proceedings.mlr.press/v85/boag18a.html>`_). It loads the
admissions, ICU stays, and (optionally) note events tables, and exposes
the proxy-mistrust and end-of-life cohort definitions used by the three
downstream tasks in :doc:`../tasks/pyhealth.tasks.eol_mistrust`.

Supports both a corrected ``"default"`` pipeline and a notebook-faithful
``"paper_like"`` reproduction mode via the ``dataset_prepare_mode``
parameter.

.. autoclass:: pyhealth.datasets.EOLMistrustDataset
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/api/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,5 @@ API Reference
models/pyhealth.models.VisionEmbeddingModel
models/pyhealth.models.TextEmbedding
models/pyhealth.models.BIOT
models/pyhealth.models.EOLMistrustClassifier
models/pyhealth.models.unified_multimodal_embedding_docs
23 changes: 23 additions & 0 deletions docs/api/models/pyhealth.models.EOLMistrustClassifier.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pyhealth.models.EOLMistrustClassifier
=======================================

Multimodal classifier for the end-of-life prediction targets from
Boag et al. 2018, *"Racial Disparities and Mistrust in End-of-Life Care"*
(`paper <https://proceedings.mlr.press/v85/boag18a.html>`_).

The model handles three modality types from the
:class:`~pyhealth.datasets.EOLMistrustDataset`:

- **Coded EHR sequences** (diagnoses, procedures, drugs) — learned
embeddings with mean pooling.
- **Scalar numeric features** (age, length of stay) — linear projections.
- **Text / categorical fields** (demographics, clinical notes) — stable
hash-based token embeddings with mean pooling.

It predicts a binary target such as Left-AMA, code-status change, or
in-hospital mortality.

.. autoclass:: pyhealth.models.EOLMistrustClassifier
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/api/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ Available Tasks
Mutation Pathogenicity (COSMIC) <tasks/pyhealth.tasks.MutationPathogenicityPrediction>
Cancer Survival Prediction (TCGA) <tasks/pyhealth.tasks.CancerSurvivalPrediction>
Cancer Mutation Burden (TCGA) <tasks/pyhealth.tasks.CancerMutationBurden>
EOL Mistrust (MIMIC-III) <tasks/pyhealth.tasks.eol_mistrust>
36 changes: 36 additions & 0 deletions docs/api/tasks/pyhealth.tasks.eol_mistrust.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
pyhealth.tasks.eol_mistrust
==============================

End-of-life cohort tasks from Boag et al. 2018, *"Racial Disparities and
Mistrust in End-of-Life Care"*
(`paper <https://proceedings.mlr.press/v85/boag18a.html>`_). Three binary
prediction targets are defined on top of the
:class:`~pyhealth.datasets.EOLMistrustDataset`:
Left-AMA, code-status change (DNR/DNI/CMO), and in-hospital mortality.
All three share the same input schema (demographics, diagnoses, procedures,
medications, and optionally clinical notes) and differ only in the
extracted label.

Supports both a corrected ``"default"`` and a notebook-faithful
``"paper_like"`` label-extraction strategy via the
``dataset_prepare_mode`` parameter.

.. autoclass:: pyhealth.tasks.EOLMistrustDownstreamMIMIC3
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: pyhealth.tasks.EOLMistrustLeftAMAPredictionMIMIC3
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: pyhealth.tasks.EOLMistrustCodeStatusPredictionMIMIC3
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: pyhealth.tasks.EOLMistrustMortalityPredictionMIMIC3
:members:
:undoc-members:
:show-inheritance:
Loading