# 01-problem.md

## Business Context

Hospitals and clinical teams need a more consistent, evidence-based way to evaluate patients presenting with COVID symptoms and decide when inpatient admission is appropriate and when discharge is appropriate after recovery. This matters because unnecessary admission can consume scarce beds, staff time, and hospital resources, while delayed admission can increase patient risk and worsen outcomes. Similarly, discharging a patient too early can increase the risk of deterioration and readmission, while keeping a patient too long can reduce capacity and increase costs. The primary stakeholders are **doctors**, who need clinically useful decision support at the point of care, and **hospital administrators**, who need safe, efficient use of hospital capacity.

This analysis will inform two operational decisions:

1. Whether a patient presenting with COVID-like symptoms should be admitted to the hospital.
2. Whether an admitted patient with COVID-like symptoms has recovered sufficiently to be safely discharged.

## Analytical Questions

### Question 1

* **Statement:** Given information available at the time of presentation or initial evaluation, can we predict whether a patient with COVID-like symptoms is likely to require hospital admission?
* **Type:** Predictive
* **Required data:**

  * Patient encounter records for individuals presenting with COVID-like symptoms
  * Admission outcome labels
  * Demographics
  * Presenting symptoms
  * Vital signs at presentation
  * Relevant laboratory and imaging summaries available at the decision point
  * Comorbidity and medical history variables available at or before presentation
  * Encounter timestamps
* **Success criteria:**

  * A model can be trained using only data available at the time of decision
  * Performance is meaningfully better than a naive baseline
  * Model outputs can be interpreted and reviewed by stakeholders
  * The prediction target is consistently defined across the dataset
* **Failure criteria:**

  * Admission labels are inconsistent, missing, or operationally ambiguous
  * Key predictors are unavailable or only recorded after the admission decision
  * Severe label leakage is unavoidable
  * Data quality or sample size is too poor to support reliable modeling

### Question 2

* **Statement:** For an already admitted patient with COVID-like symptoms, can we predict whether the patient is appropriate for discharge within a defined near-term decision window using only information available up to that time?
* **Type:** Predictive
* **Required data:**

  * Inpatient stay records for admitted patients with COVID-like symptoms
  * Discharge timestamps and disposition labels
  * In-hospital vital signs and clinical observations over time
  * Laboratory results and treatment summaries timestamped during admission
  * Indicators of deterioration, ICU transfer, readmission, or adverse post-discharge outcomes where available
  * Daily or interval-based patient state snapshots that align to possible discharge decision points
* **Success criteria:**

  * The discharge target is clearly defined for a specific time horizon or decision window
  * A model can be built using only information available up to each discharge decision point
  * Performance is meaningfully better than a naive or majority-class baseline
  * Stakeholders judge the result to be clinically interpretable and operationally relevant
* **Failure criteria:**

  * “Appropriate discharge” cannot be operationalized from available data
  * Time-indexed inpatient data is missing, sparse, or not trustworthy
  * Important outcomes needed to validate discharge safety are unavailable
  * Leakage from future events cannot be eliminated

### Question 3

* **Statement:** What clinical, demographic, and operational patterns are associated with admission decisions and discharge timing for patients with COVID-like symptoms?
* **Type:** Exploratory
* **Required data:**

  * All data listed for Questions 1 and 2
  * Additional metadata about encounter type, care setting, and length of stay where available
* **Success criteria:**

  * Patterns are reproducible, clearly documented, and stratified where appropriate
  * Results identify candidate predictors, data quality issues, and subgroup differences for later modeling
* **Failure criteria:**

  * Data is too incomplete or inconsistent to support trustworthy summaries
  * Important fields required for stratification or interpretation are missing

## Scope

### In Scope

* Defining a precise prediction problem for admission among patients presenting with COVID-like symptoms
* Defining a precise prediction problem for discharge readiness among admitted patients with COVID-like symptoms
* Identifying the decision points and prediction targets for both admission and discharge
* Performing exploratory analysis to validate assumptions and understand data quality
* Building machine-learning models that estimate admission likelihood and discharge readiness
* Evaluating model performance using holdout data and clinically meaningful metrics
* Documenting feature eligibility rules to prevent leakage

### Out of Scope

* Replacing physician judgment or automating final clinical decisions
* Recommending medications, treatment protocols, or individualized care plans
* Inferring causal effects of treatments or interventions unless explicitly re-scoped later
* Building a real-time production deployment in this phase
* Generalizing beyond the available hospital system and study population without validation
* Diagnosing COVID or other illnesses from raw imaging, notes, or sensor streams unless explicitly added later

### Time Range

* Initial assumption: the analysis will cover the period for which reliable encounter, admission, inpatient, and discharge data are available for COVID-like symptom presentations.
* Exact start and end dates will be confirmed during Phase 2 after data inventory and quality review.

### Population

* **Units of analysis:** patient encounters for the admission question and inpatient decision-time snapshots or hospital stays for the discharge question.
* **Population:** patients presenting to the hospital or health system with COVID-like symptoms during the study period.

## Assumptions

* Patients with COVID-like symptoms can be identified consistently from the available data.
* Admission decisions are recorded clearly enough to create a reliable target label.
* Discharge decisions and timestamps are recorded clearly enough to define discharge readiness or near-term discharge outcomes.
* Timestamped data is accurate enough to separate what was known at decision time from what happened later.
* Sufficient pre-admission features exist to support an admission model.
* Sufficient longitudinal inpatient features exist to support a discharge model.
* The available sample size is large enough to support modeling and evaluation.
* Data quality is adequate across key variables such as vitals, labs, demographics, and outcomes.
* Stakeholders can agree on operational definitions of “appropriate admission” and “appropriate discharge.”
* Readmission, deterioration, ICU transfer, or other proxies for unsafe discharge are available or can be reasonably approximated.
* Historical clinical decisions are suitable as labels for an initial modeling phase, even if they are imperfect proxies for ideal decisions.
* Variation in hospital policy, staffing, or pandemic phase does not make the data unusably inconsistent across time, or such variation can be modeled or segmented.
* Ethical and regulatory review will permit use of the required healthcare data for this analysis.

## Constraints

* **Regulatory:** Must comply with healthcare privacy, security, and institutional data governance requirements. Use of protected health information must follow applicable approval and access controls.
* **Ethical:** The project must avoid creating unsafe or biased recommendations, especially across clinically important subgroups. Outputs must be framed as decision support, not autonomous decision-making.
* **Timeline:** Scope may need to prioritize a baseline model and a small number of well-defined targets before broader analysis.
* **Data access:** Access to EHR-derived data, admission/discharge events, and longitudinal inpatient data may be limited, delayed, or partially incomplete.
* **Team:** The project depends on input from both technical contributors and clinical or operational stakeholders to validate definitions, scope, and interpretation.

## Acceptance Criteria

* [ ] At least one question is classified and precise
* [ ] Success criteria are defined for each question
* [ ] Stakeholders have reviewed and agreed on scope
* [ ] Assumptions are documented and testable

## Phase Gate

This spec must be reviewed before proceeding to Phase 2 (Data).

