Case Management Data Specifications

Case Management Data Specifications

Shared Entity References

This module references the following shared entities defined in their owning modules. Case Management does not redefine these tables — it uses foreign-key references only.

Shared Entity Owning Module Table(s) FK Used Here
Patients ehr-patient-mgmt patients, patient_demographics, patient_identifiers patients.patient_id
Providers ehr-patient-mgmt providers, provider_credentials providers.provider_id
Encounters scheduling encounters, encounter_details encounters.encounter_id
Users & Auth ehr-patient-mgmt users, roles, permissions users.user_id
Facilities ehr-patient-mgmt facilities, departments, locations facilities.facility_id, departments.department_id
Payers policy-contract-mgmt payers, insurance_plans, contracts payers.payer_id, insurance_plans.plan_id
Prior Auth patient-access prior_authorizations prior_authorizations.auth_id

Entity Relationship Diagram

erDiagram patients ||--o{ case_reviews : "has" encounters ||--o{ case_reviews : "for" users ||--o{ case_reviews : "managed by" departments ||--o{ case_reviews : "service line" facilities ||--o{ case_reviews : "at" case_reviews ||--o{ utilization_reviews : "has" case_reviews ||--o{ discharge_plans : "has" case_reviews ||--o{ care_coordination_notes : "has" case_reviews ||--o{ continued_stay_authorizations : "has" utilization_reviews ||--o{ um_criteria_evaluations : "details" discharge_plans ||--o{ discharge_plan_tasks : "includes" patients ||--o{ readmission_risk_assessments : "scored in" encounters ||--o{ readmission_risk_assessments : "for" users ||--o{ care_coordination_notes : "authored by" users ||--o{ discharge_plan_tasks : "assigned to" payers ||--o{ continued_stay_authorizations : "from" insurance_plans ||--o{ continued_stay_authorizations : "under" prior_authorizations ||--o{ continued_stay_authorizations : "linked to" users ||--o{ case_management_assignments : "has rules" departments ||--o{ case_management_assignments : "for dept" case_reviews { bigint case_id PK bigint patient_id FK bigint encounter_id FK bigint case_manager_id FK bigint department_id FK bigint facility_id FK } utilization_reviews { bigint review_id PK bigint case_id FK bigint reviewer_id FK bigint related_csa_id FK } um_criteria_evaluations { bigint eval_id PK bigint review_id FK } discharge_plans { bigint plan_id PK bigint case_id FK bigint patient_id FK bigint encounter_id FK bigint created_by FK bigint updated_by FK } discharge_plan_tasks { bigint task_id PK bigint plan_id FK bigint assigned_to FK } care_coordination_notes { bigint note_id PK bigint case_id FK bigint patient_id FK bigint coordinator_id FK } continued_stay_authorizations { bigint csa_id PK bigint case_id FK bigint payer_id FK bigint plan_id FK bigint prior_auth_id FK } readmission_risk_assessments { bigint assessment_id PK bigint patient_id FK bigint encounter_id FK bigint assessed_by FK } case_management_assignments { bigint assignment_id PK bigint case_manager_id FK bigint department_id FK }

Table Definitions

1. case_reviews

Purpose: Case management header per inpatient encounter. Tracks assignment, status, LOS expectations, discharge disposition, and readmission risk. Drives worklists (SCR-CSM-001) and KPIs (ALOS, caseload, readmission rate).

Field Specifications

Field Type Nullable Default Constraint Description
case_id BIGINT NO IDENTITY PK Unique case record
patient_id BIGINT NO FK → patients.patient_id Patient under review
encounter_id BIGINT NO FK → encounters.encounter_id Admission encounter
case_manager_id BIGINT YES FK → users.user_id Assigned case manager/UM nurse
department_id BIGINT YES FK → departments.department_id Clinical department owning case
facility_id BIGINT YES FK → facilities.facility_id Facility of admission
case_status VARCHAR(20) NO 'open' IN ('open','on_hold','closed','cancelled') Lifecycle state
case_type VARCHAR(30) NO 'inpatient_um' IN ('inpatient_um','observation_um','ed_case','care_coordination') Case category
priority VARCHAR(20) NO 'routine' IN ('low','routine','high','critical') Worklist priority
assigned_datetime TIMESTAMP NO CURRENT_TIMESTAMP When case assigned/created
expected_discharge_date DATE YES Current expected discharge
actual_discharge_date DATE YES ≥ admission date (via encounter) Actual discharge date
discharge_disposition_code VARCHAR(10) YES FK → master discharge disposition HL7 0112 / UAE-specific code
readmission_risk_score NUMERIC(5,2) YES 0–100 Latest risk score
is_readmission_within_30d BOOLEAN NO FALSE Flag if readmitted within 30 days
closed_datetime TIMESTAMP YES When case closed
created_by BIGINT NO FK → users.user_id User/system creating case
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
updated_by BIGINT YES FK → users.user_id Last updater
updated_datetime TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Audit update time

SQL DDL

SQL
CREATE TABLE case_reviews (
    case_id                  BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id               BIGINT NOT NULL,
    encounter_id             BIGINT NOT NULL,
    case_manager_id          BIGINT,
    department_id            BIGINT,
    facility_id              BIGINT,
    case_status              VARCHAR(20) NOT NULL DEFAULT 'open',
    case_type                VARCHAR(30) NOT NULL DEFAULT 'inpatient_um',
    priority                 VARCHAR(20) NOT NULL DEFAULT 'routine',
    assigned_datetime        TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    expected_discharge_date  DATE,
    actual_discharge_date    DATE,
    discharge_disposition_code VARCHAR(10),
    readmission_risk_score   NUMERIC(5,2),
    is_readmission_within_30d BOOLEAN NOT NULL DEFAULT FALSE,
    closed_datetime          TIMESTAMP,
    created_by               BIGINT NOT NULL,
    created_datetime         TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_by               BIGINT,
    updated_datetime         TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT fk_case_reviews_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_case_reviews_encounter
        FOREIGN KEY (encounter_id) REFERENCES encounters(encounter_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_case_reviews_case_manager
        FOREIGN KEY (case_manager_id) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_case_reviews_department
        FOREIGN KEY (department_id) REFERENCES departments(department_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_case_reviews_facility
        FOREIGN KEY (facility_id) REFERENCES facilities(facility_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_case_reviews_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_case_reviews_updated_by
        FOREIGN KEY (updated_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT chk_case_reviews_status
        CHECK (case_status IN ('open','on_hold','closed','cancelled')),
    CONSTRAINT chk_case_reviews_type
        CHECK (case_type IN ('inpatient_um','observation_um','ed_case','care_coordination')),
    CONSTRAINT chk_case_reviews_priority
        CHECK (priority IN ('low','routine','high','critical')),
    CONSTRAINT chk_case_reviews_risk_score
        CHECK (readmission_risk_score IS NULL OR (readmission_risk_score >= 0 AND readmission_risk_score <= 100))
);

CREATE INDEX idx_case_reviews_patient ON case_reviews(patient_id);
CREATE INDEX idx_case_reviews_encounter ON case_reviews(encounter_id);
CREATE INDEX idx_case_reviews_manager_status ON case_reviews(case_manager_id, case_status);
CREATE INDEX idx_case_reviews_expected_discharge ON case_reviews(expected_discharge_date)
    WHERE case_status = 'open';
CREATE INDEX idx_case_reviews_priority ON case_reviews(priority)
    WHERE case_status = 'open';

Terminology Bindings

Field Terminology Example Value
discharge_disposition_code HL7 v2 Table 0112 + UAE extensions 01 (Discharged to home), UAH-TRF (Transfer to UAE rehab facility)
case_type Local value set (UM case types) inpatient_um
priority Local value set (worklist priority) high

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
case_id EpisodeOfCare EpisodeOfCare.id
patient_id EpisodeOfCare EpisodeOfCare.patient.reference
encounter_id EpisodeOfCare EpisodeOfCare.account (or extension referencing Encounter)
case_status EpisodeOfCare EpisodeOfCare.status (mapped to active, finished, cancelled)
case_type EpisodeOfCare EpisodeOfCare.type.coding.code
priority EpisodeOfCare EpisodeOfCare.priority.coding.code
assigned_datetime EpisodeOfCare EpisodeOfCare.period.start
closed_datetime EpisodeOfCare EpisodeOfCare.period.end
expected_discharge_date CarePlan CarePlan.period.end
actual_discharge_date Encounter Encounter.period.end (from scheduling module)
discharge_disposition_code Encounter Encounter.hospitalization.dischargeDisposition.coding.code
readmission_risk_score Observation Observation.valueQuantity.value (profiled as readmission risk)
is_readmission_within_30d Condition/Encounter Extension on Encounter or EpisodeOfCare

2. utilization_reviews

Purpose: Stores each UM review event (admission, concurrent, retrospective). Used for UM timeliness, avoidable day rate, and continued-stay authorization workflows (WF-CSM-001, WF-CSM-002).

Field Specifications

Field Type Nullable Default Constraint Description
review_id BIGINT NO IDENTITY PK Unique review record
case_id BIGINT NO FK → case_reviews.case_id Parent case
review_type VARCHAR(20) NO IN ('admission','continued_stay','retrospective','discharge') Review category
review_date DATE NO CURRENT_DATE Date of review
reviewer_id BIGINT NO FK → users.user_id UM nurse/case manager
criteria_tool VARCHAR(50) NO e.g. InterQual, Local-UM Criteria set used
criteria_version VARCHAR(20) YES Version of criteria
criteria_met BOOLEAN NO FALSE Whether criteria met
clinical_justification TEXT NO Narrative justification
level_of_care VARCHAR(30) NO FK → master level-of-care Inpatient, observation, etc.
recommended_action VARCHAR(30) NO IN ('continue_inpatient','downgrade_observation','discharge_plan','transfer_higher_level') UM recommendation
next_review_date DATE YES Scheduled next review
payer_notification_required BOOLEAN NO FALSE Whether payer must be notified
payer_notified BOOLEAN NO FALSE Whether notification completed
related_csa_id BIGINT YES FK → continued_stay_authorizations.csa_id Linked CSA record
avoidable_days INT YES ≥ 0 Avoidable days identified
notes TEXT YES Additional comments
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
created_by BIGINT NO FK → users.user_id Creator
updated_datetime TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Audit update time
updated_by BIGINT YES FK → users.user_id Last updater

SQL DDL

SQL
CREATE TABLE utilization_reviews (
    review_id                 BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    case_id                   BIGINT NOT NULL,
    review_type               VARCHAR(20) NOT NULL,
    review_date               DATE NOT NULL DEFAULT CURRENT_DATE,
    reviewer_id               BIGINT NOT NULL,
    criteria_tool             VARCHAR(50) NOT NULL,
    criteria_version          VARCHAR(20),
    criteria_met              BOOLEAN NOT NULL DEFAULT FALSE,
    clinical_justification    TEXT NOT NULL,
    level_of_care             VARCHAR(30) NOT NULL,
    recommended_action        VARCHAR(30) NOT NULL,
    next_review_date          DATE,
    payer_notification_required BOOLEAN NOT NULL DEFAULT FALSE,
    payer_notified            BOOLEAN NOT NULL DEFAULT FALSE,
    related_csa_id            BIGINT,
    avoidable_days            INT,
    notes                     TEXT,
    created_datetime          TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    created_by                BIGINT NOT NULL,
    updated_datetime          TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_by                BIGINT,

    CONSTRAINT fk_ur_case
        FOREIGN KEY (case_id) REFERENCES case_reviews(case_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    CONSTRAINT fk_ur_reviewer
        FOREIGN KEY (reviewer_id) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_ur_csa
        FOREIGN KEY (related_csa_id) REFERENCES continued_stay_authorizations(csa_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_ur_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_ur_updated_by
        FOREIGN KEY (updated_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT chk_ur_type
        CHECK (review_type IN ('admission','continued_stay','retrospective','discharge')),
    CONSTRAINT chk_ur_recommended_action
        CHECK (recommended_action IN ('continue_inpatient','downgrade_observation','discharge_plan','transfer_higher_level')),
    CONSTRAINT chk_ur_avoidable_days
        CHECK (avoidable_days IS NULL OR avoidable_days >= 0)
);

CREATE INDEX idx_ur_case ON utilization_reviews(case_id);
CREATE INDEX idx_ur_type_date ON utilization_reviews(review_type, review_date);
CREATE INDEX idx_ur_reviewer_date ON utilization_reviews(reviewer_id, review_date);
CREATE INDEX idx_ur_next_review ON utilization_reviews(next_review_date)
    WHERE payer_notification_required = TRUE;

Terminology Bindings

Field Terminology Example Value
level_of_care Local Level-of-Care Definitions inpatient_medical, observation
review_type Local UM review type set continued_stay
recommended_action Local UM action set continue_inpatient

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
review_id CarePlan / Task Task.id (UM review task)
case_id EpisodeOfCare Task.focus.reference (EpisodeOfCare)
review_type Task Task.code.coding.code
review_date Task Task.executionPeriod.start
reviewer_id Practitioner (via users→providers) Task.owner.reference
criteria_tool DocumentReference DocumentReference.type.text (UM criteria)
criteria_met Observation Observation.valueBoolean (UM criteria result)
clinical_justification Task / Observation Task.note.text or Observation.note.text
level_of_care Encounter Encounter.class or extension
recommended_action ServiceRequest ServiceRequest.reasonCode or Task outcomeCodeableConcept
next_review_date Task Task.restriction.period.end
payer_notification_required Task Extension flag
related_csa_id CoverageEligibilityRequest/Response Reference via identifier

3. um_criteria_evaluations

Purpose: Fine-grained checklist of UM criteria applied during a review (e.g., InterQual line items). Supports auditability and physician advisor peer review.

Field Specifications

Field Type Nullable Default Constraint Description
eval_id BIGINT NO IDENTITY PK Unique evaluation row
review_id BIGINT NO FK → utilization_reviews.review_id Parent review
criteria_category VARCHAR(50) NO e.g., Respiratory, Cardiac
criteria_item_code VARCHAR(100) NO Code from UM Clinical Criteria master
criteria_item_text TEXT NO Human-readable criterion
met BOOLEAN NO FALSE Whether criterion met
evidence TEXT YES Supporting clinical evidence
notes TEXT YES Reviewer comments
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
created_by BIGINT NO FK → users.user_id Creator

SQL DDL

SQL
CREATE TABLE um_criteria_evaluations (
    eval_id             BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    review_id           BIGINT NOT NULL,
    criteria_category   VARCHAR(50) NOT NULL,
    criteria_item_code  VARCHAR(100) NOT NULL,
    criteria_item_text  TEXT NOT NULL,
    met                 BOOLEAN NOT NULL DEFAULT FALSE,
    evidence            TEXT,
    notes               TEXT,
    created_datetime    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    created_by          BIGINT NOT NULL,

    CONSTRAINT fk_um_eval_review
        FOREIGN KEY (review_id) REFERENCES utilization_reviews(review_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    CONSTRAINT fk_um_eval_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT
);

CREATE INDEX idx_um_eval_review ON um_criteria_evaluations(review_id);
CREATE INDEX idx_um_eval_item ON um_criteria_evaluations(criteria_item_code);

Terminology Bindings

Field Terminology Example Value
criteria_item_code UM Clinical Criteria master INTQ-RESP-001

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
eval_id Observation Observation.id
review_id Observation Observation.basedOn (Task/ServiceRequest for UM review)
criteria_category Observation Observation.category.text
criteria_item_code Observation Observation.code.coding.code
criteria_item_text Observation Observation.code.text
met Observation Observation.valueBoolean
evidence Observation Observation.note.text

4. discharge_plans

Purpose: Discharge planning record per case/encounter. Captures planned disposition, barriers, services needed, and patient/family agreement. Drives Discharge Planning screen (SCR-CSM-003) and portal summary (INT-CSM-006).

Field Specifications

Field Type Nullable Default Constraint Description
plan_id BIGINT NO IDENTITY PK Unique discharge plan
case_id BIGINT NO FK → case_reviews.case_id Parent case
patient_id BIGINT NO FK → patients.patient_id Patient
encounter_id BIGINT NO FK → encounters.encounter_id Encounter
planned_disposition_code VARCHAR(10) NO FK → master discharge disposition Planned disposition
barriers_identified TEXT YES Social/clinical/financial barriers
services_needed TEXT YES Post-acute services (home health, rehab, etc.)
target_discharge_date DATE YES Target discharge date
plan_status VARCHAR(20) NO 'draft' IN ('draft','in_progress','ready','completed','cancelled') Plan status
patient_family_agreed BOOLEAN NO FALSE Agreement documented
education_provided BOOLEAN NO FALSE Discharge education completed
created_by BIGINT NO FK → users.user_id Creator (discharge planner)
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
updated_by BIGINT YES FK → users.user_id Last updater
updated_datetime TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Audit update time

SQL DDL

SQL
CREATE TABLE discharge_plans (
    plan_id                 BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    case_id                 BIGINT NOT NULL,
    patient_id              BIGINT NOT NULL,
    encounter_id            BIGINT NOT NULL,
    planned_disposition_code VARCHAR(10) NOT NULL,
    barriers_identified     TEXT,
    services_needed         TEXT,
    target_discharge_date   DATE,
    plan_status             VARCHAR(20) NOT NULL DEFAULT 'draft',
    patient_family_agreed   BOOLEAN NOT NULL DEFAULT FALSE,
    education_provided      BOOLEAN NOT NULL DEFAULT FALSE,
    created_by              BIGINT NOT NULL,
    created_datetime        TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_by              BIGINT,
    updated_datetime        TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT fk_dp_case
        FOREIGN KEY (case_id) REFERENCES case_reviews(case_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    CONSTRAINT fk_dp_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_dp_encounter
        FOREIGN KEY (encounter_id) REFERENCES encounters(encounter_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_dp_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_dp_updated_by
        FOREIGN KEY (updated_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT chk_dp_status
        CHECK (plan_status IN ('draft','in_progress','ready','completed','cancelled'))
);

CREATE INDEX idx_dp_case ON discharge_plans(case_id);
CREATE INDEX idx_dp_patient ON discharge_plans(patient_id);
CREATE INDEX idx_dp_status ON discharge_plans(plan_status);
CREATE INDEX idx_dp_target_date ON discharge_plans(target_discharge_date)
    WHERE plan_status IN ('in_progress','ready');

Terminology Bindings

Field Terminology Example Value
planned_disposition_code HL7 v2 Table 0112 + UAE extensions 01 (Home), 04 (Skilled nursing facility), DXB-HH (Dubai home health)
plan_status Local discharge plan status set in_progress

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
plan_id CarePlan CarePlan.id
case_id CarePlan CarePlan.encounter (via EpisodeOfCare)
patient_id CarePlan CarePlan.subject.reference
planned_disposition_code CarePlan CarePlan.activity.detail.code or Encounter dischargeDisposition
barriers_identified CarePlan CarePlan.description / CarePlan.note.text
services_needed CarePlan CarePlan.activity.detail.description
target_discharge_date CarePlan CarePlan.period.end
plan_status CarePlan CarePlan.status (mapped)
patient_family_agreed CarePlan Extension flag
education_provided CarePlan CarePlan.activity (education activity)

5. discharge_plan_tasks

Purpose: Task-level tracking for discharge plan execution (referrals, equipment, education). Drives checklist UI and completion KPIs.

Field Specifications

Field Type Nullable Default Constraint Description
task_id BIGINT NO IDENTITY PK Unique task
plan_id BIGINT NO FK → discharge_plans.plan_id Parent plan
task_description VARCHAR(200) NO Description of task
task_type VARCHAR(50) YES Local value set e.g., referral, equipment, education
assigned_to BIGINT YES FK → users.user_id Responsible user
due_date DATE YES Due date
status VARCHAR(20) NO 'pending' IN ('pending','in_progress','completed','cancelled') Task status
completed_datetime TIMESTAMP YES Completion time
notes TEXT YES Comments/outcomes
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
created_by BIGINT NO FK → users.user_id Creator

SQL DDL

SQL
CREATE TABLE discharge_plan_tasks (
    task_id             BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    plan_id             BIGINT NOT NULL,
    task_description    VARCHAR(200) NOT NULL,
    task_type           VARCHAR(50),
    assigned_to         BIGINT,
    due_date            DATE,
    status              VARCHAR(20) NOT NULL DEFAULT 'pending',
    completed_datetime  TIMESTAMP,
    notes               TEXT,
    created_datetime    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    created_by          BIGINT NOT NULL,

    CONSTRAINT fk_dpt_plan
        FOREIGN KEY (plan_id) REFERENCES discharge_plans(plan_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    CONSTRAINT fk_dpt_assigned_to
        FOREIGN KEY (assigned_to) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_dpt_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT chk_dpt_status
        CHECK (status IN ('pending','in_progress','completed','cancelled'))
);

CREATE INDEX idx_dpt_plan ON discharge_plan_tasks(plan_id);
CREATE INDEX idx_dpt_assigned_status ON discharge_plan_tasks(assigned_to, status);
CREATE INDEX idx_dpt_due_date ON discharge_plan_tasks(due_date)
    WHERE status IN ('pending','in_progress');

Terminology Bindings

Field Terminology Example Value
task_type Local discharge task type set home_health_referral, followup_appointment
status Local task status set completed

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
task_id Task Task.id
plan_id Task Task.basedOn.reference (CarePlan)
task_description Task Task.description
task_type Task Task.code.coding.code
assigned_to Task Task.owner.reference
due_date Task Task.restriction.period.end
status Task Task.status
completed_datetime Task Task.executionPeriod.end

6. care_coordination_notes

Purpose: Documentation of care coordination activities (calls, portal messages, community referrals) across the continuum. Supports Care Coordination Dashboard (SCR-CSM-004) and readmission prevention workflows.

Field Specifications

Field Type Nullable Default Constraint Description
note_id BIGINT NO IDENTITY PK Unique note
case_id BIGINT NO FK → case_reviews.case_id Related case
patient_id BIGINT NO FK → patients.patient_id Patient
coordinator_id BIGINT NO FK → users.user_id Care coordinator/case manager
activity_type VARCHAR(30) NO Local value set e.g., phone_call, portal_message, clinic_visit
description TEXT NO Narrative description
contact_made_with VARCHAR(50) YES Patient, family, provider, community org
outcome VARCHAR(50) YES e.g., completed, left_voicemail, no_show
note_datetime TIMESTAMP NO CURRENT_TIMESTAMP When activity occurred
patient_visible BOOLEAN NO FALSE Whether note is visible in patient portal
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
created_by BIGINT NO FK → users.user_id Creator

SQL DDL

SQL
CREATE TABLE care_coordination_notes (
    note_id           BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    case_id           BIGINT NOT NULL,
    patient_id        BIGINT NOT NULL,
    coordinator_id    BIGINT NOT NULL,
    activity_type     VARCHAR(30) NOT NULL,
    description       TEXT NOT NULL,
    contact_made_with VARCHAR(50),
    outcome           VARCHAR(50),
    note_datetime     TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    patient_visible   BOOLEAN NOT NULL DEFAULT FALSE,
    created_datetime  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    created_by        BIGINT NOT NULL,

    CONSTRAINT fk_ccn_case
        FOREIGN KEY (case_id) REFERENCES case_reviews(case_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    CONSTRAINT fk_ccn_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_ccn_coordinator
        FOREIGN KEY (coordinator_id) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_ccn_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT
);

CREATE INDEX idx_ccn_case_datetime ON care_coordination_notes(case_id, note_datetime);
CREATE INDEX idx_ccn_patient_datetime ON care_coordination_notes(patient_id, note_datetime);
CREATE INDEX idx_ccn_coordinator ON care_coordination_notes(coordinator_id, note_datetime);

Terminology Bindings

Field Terminology Example Value
activity_type Local care coordination activity types phone_call, home_visit
outcome Local outcome codes completed, no_answer

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
note_id Communication / Encounter Communication.id
patient_id Communication Communication.subject.reference
coordinator_id Practitioner Communication.sender.reference
activity_type Communication Communication.category.coding.code
description Communication Communication.payload.contentString
note_datetime Communication Communication.sent
patient_visible Communication Extension controlling portal visibility

7. continued_stay_authorizations

Purpose: Tracks payer authorizations for continued inpatient stay, including requested/approved days, denial reasons, and appeal status. Feeds Billing & Claims (INT-CSM-004) and Payer Communication workflow (WF-CSM-006).

Field Specifications

Field Type Nullable Default Constraint Description
csa_id BIGINT NO IDENTITY PK Unique CSA record
case_id BIGINT NO FK → case_reviews.case_id Related case
payer_id BIGINT NO FK → payers.payer_id Payer
plan_id BIGINT YES FK → insurance_plans.plan_id Insurance plan
prior_auth_id BIGINT YES FK → prior_authorizations.auth_id Initial auth record
auth_number VARCHAR(50) YES Payer authorization number
requested_days INT NO > 0 Days requested
approved_days INT YES ≥ 0 Days approved
request_date DATE NO CURRENT_DATE Date submitted
response_date DATE YES ≥ request_date Date of payer response
status VARCHAR(20) NO 'pending' IN ('pending','approved','partially_approved','denied','expired') CSA status
denial_reason_code VARCHAR(50) YES Local denial reason codes e.g., medical_necessity, auth_expired
appeal_status VARCHAR(20) YES IN ('none','planned','submitted','upheld','overturned') Appeal status
auth_start_date DATE YES Start of authorized period
auth_end_date DATE YES ≥ auth_start_date End of authorized period
notes TEXT YES Free-text notes
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
created_by BIGINT NO FK → users.user_id Creator
updated_datetime TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Audit update time
updated_by BIGINT YES FK → users.user_id Last updater

SQL DDL

SQL
CREATE TABLE continued_stay_authorizations (
    csa_id              BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    case_id             BIGINT NOT NULL,
    payer_id            BIGINT NOT NULL,
    plan_id             BIGINT,
    prior_auth_id       BIGINT,
    auth_number         VARCHAR(50),
    requested_days      INT NOT NULL,
    approved_days       INT,
    request_date        DATE NOT NULL DEFAULT CURRENT_DATE,
    response_date       DATE,
    status              VARCHAR(20) NOT NULL DEFAULT 'pending',
    denial_reason_code  VARCHAR(50),
    appeal_status       VARCHAR(20),
    auth_start_date     DATE,
    auth_end_date       DATE,
    notes               TEXT,
    created_datetime    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    created_by          BIGINT NOT NULL,
    updated_datetime    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_by          BIGINT,

    CONSTRAINT fk_csa_case
        FOREIGN KEY (case_id) REFERENCES case_reviews(case_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    CONSTRAINT fk_csa_payer
        FOREIGN KEY (payer_id) REFERENCES payers(payer_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_csa_plan
        FOREIGN KEY (plan_id) REFERENCES insurance_plans(plan_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_csa_prior_auth
        FOREIGN KEY (prior_auth_id) REFERENCES prior_authorizations(auth_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_csa_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_csa_updated_by
        FOREIGN KEY (updated_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT chk_csa_status
        CHECK (status IN ('pending','approved','partially_approved','denied','expired')),
    CONSTRAINT chk_csa_appeal_status
        CHECK (appeal_status IS NULL OR appeal_status IN ('none','planned','submitted','upheld','overturned')),
    CONSTRAINT chk_csa_requested_days
        CHECK (requested_days > 0),
    CONSTRAINT chk_csa_approved_days
        CHECK (approved_days IS NULL OR approved_days >= 0),
    CONSTRAINT chk_csa_response_date
        CHECK (response_date IS NULL OR response_date >= request_date),
    CONSTRAINT chk_csa_auth_dates
        CHECK (auth_end_date IS NULL OR auth_start_date IS NULL OR auth_end_date >= auth_start_date)
);

CREATE INDEX idx_csa_case ON continued_stay_authorizations(case_id);
CREATE INDEX idx_csa_payer_status ON continued_stay_authorizations(payer_id, status);
CREATE INDEX idx_csa_auth_period ON continued_stay_authorizations(auth_end_date)
    WHERE status IN ('approved','partially_approved');

Terminology Bindings

Field Terminology Example Value
denial_reason_code Local denial reason codes aligned with DHA/DOH eClaims medical_necessity, auth_expired, level_of_care
status Local CSA status set approved
appeal_status Local appeal status set submitted

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
csa_id CoverageEligibilityResponse / Authorization extension CoverageEligibilityResponse.id
case_id CoverageEligibilityResponse Extension referencing EpisodeOfCare
payer_id Organization CoverageEligibilityResponse.insurer
plan_id Coverage Coverage.plan
auth_number CoverageEligibilityResponse CoverageEligibilityResponse.identifier.value
requested_days ServiceRequest Extension for requested LOS
approved_days CoverageEligibilityResponse Extension for approved LOS
auth_start_date CoverageEligibilityResponse CoverageEligibilityResponse.servicedPeriod.start
auth_end_date CoverageEligibilityResponse CoverageEligibilityResponse.servicedPeriod.end
status CoverageEligibilityResponse CoverageEligibilityResponse.outcome (mapped)
denial_reason_code CoverageEligibilityResponse CoverageEligibilityResponse.error.code

8. readmission_risk_assessments

Purpose: Stores readmission risk scores (e.g., LACE index) for patients approaching discharge or at ED presentation. Supports Readmission Risk Dashboard (SCR-CSM-006) and WF-CSM-005.

Field Specifications

Field Type Nullable Default Constraint Description
assessment_id BIGINT NO IDENTITY PK Unique assessment
patient_id BIGINT NO FK → patients.patient_id Patient
encounter_id BIGINT NO FK → encounters.encounter_id Encounter context
assessment_datetime TIMESTAMP NO CURRENT_TIMESTAMP When assessment performed
risk_score NUMERIC(5,2) NO ≥ 0 Numeric risk score
risk_level VARCHAR(20) NO IN ('low','medium','high','very_high') Stratification band
score_components_json JSONB NO Valid JSON Components (LOS, ED visits, comorbidities)
interventions_planned TEXT YES Planned interventions
assessed_by BIGINT NO FK → users.user_id User or system account
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time

SQL DDL

SQL
CREATE TABLE readmission_risk_assessments (
    assessment_id         BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id            BIGINT NOT NULL,
    encounter_id          BIGINT NOT NULL,
    assessment_datetime   TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    risk_score            NUMERIC(5,2) NOT NULL,
    risk_level            VARCHAR(20) NOT NULL,
    score_components_json JSONB NOT NULL,
    interventions_planned TEXT,
    assessed_by           BIGINT NOT NULL,
    created_datetime      TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT fk_rra_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_rra_encounter
        FOREIGN KEY (encounter_id) REFERENCES encounters(encounter_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_rra_assessed_by
        FOREIGN KEY (assessed_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT chk_rra_risk_score
        CHECK (risk_score >= 0),
    CONSTRAINT chk_rra_risk_level
        CHECK (risk_level IN ('low','medium','high','very_high'))
);

CREATE INDEX idx_rra_patient_datetime ON readmission_risk_assessments(patient_id, assessment_datetime);
CREATE INDEX idx_rra_encounter ON readmission_risk_assessments(encounter_id);
CREATE INDEX idx_rra_risk_level ON readmission_risk_assessments(risk_level);

Terminology Bindings

Field Terminology Example Value
risk_level Local readmission risk bands high

score_components_json example:

JSON
{
  "los_days": 7,
  "ed_visits_6m": 3,
  "comorbidity_score": 5,
  "acuity": "emergent"
}

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
assessment_id Observation Observation.id
patient_id Observation Observation.subject.reference
encounter_id Observation Observation.encounter.reference
assessment_datetime Observation Observation.effectiveDateTime
risk_score Observation Observation.valueQuantity.value
risk_level Observation Observation.interpretation.coding.code
score_components_json Observation Observation.component (mapped per key)
interventions_planned CarePlan CarePlan.description or CarePlan.note.text

9. case_management_assignments

Purpose: Configuration and runtime tracking of case manager assignment rules and current caseload by department/service line. Supports automated assignment in WF-CSM-001 and caseload KPI.

Field Specifications

Field Type Nullable Default Constraint Description
assignment_id BIGINT NO IDENTITY PK Unique assignment rule
case_manager_id BIGINT NO FK → users.user_id Case manager/UM nurse
department_id BIGINT YES FK → departments.department_id Department this rule applies to
service_line VARCHAR(50) YES e.g., cardiology, oncology
assignment_type VARCHAR(20) NO 'primary' IN ('primary','backup') Role of assignment
max_caseload INT NO 20 > 0 Maximum concurrent cases
current_caseload INT NO 0 ≥ 0 System-maintained count
is_active BOOLEAN NO TRUE Whether rule is active
created_datetime TIMESTAMP NO CURRENT_TIMESTAMP Audit create time
created_by BIGINT NO FK → users.user_id Creator
updated_datetime TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Audit update time
updated_by BIGINT YES FK → users.user_id Last updater

SQL DDL

SQL
CREATE TABLE case_management_assignments (
    assignment_id      BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    case_manager_id    BIGINT NOT NULL,
    department_id      BIGINT,
    service_line       VARCHAR(50),
    assignment_type    VARCHAR(20) NOT NULL DEFAULT 'primary',
    max_caseload       INT NOT NULL DEFAULT 20,
    current_caseload   INT NOT NULL DEFAULT 0,
    is_active          BOOLEAN NOT NULL DEFAULT TRUE,
    created_datetime   TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    created_by         BIGINT NOT NULL,
    updated_datetime   TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_by         BIGINT,

    CONSTRAINT fk_cma_case_manager
        FOREIGN KEY (case_manager_id) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_cma_department
        FOREIGN KEY (department_id) REFERENCES departments(department_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT fk_cma_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    CONSTRAINT fk_cma_updated_by
        FOREIGN KEY (updated_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    CONSTRAINT chk_cma_assignment_type
        CHECK (assignment_type IN ('primary','backup')),
    CONSTRAINT chk_cma_max_caseload
        CHECK (max_caseload > 0),
    CONSTRAINT chk_cma_current_caseload
        CHECK (current_caseload >= 0)
);

CREATE INDEX idx_cma_manager_active ON case_management_assignments(case_manager_id)
    WHERE is_active = TRUE;
CREATE INDEX idx_cma_dept_service ON case_management_assignments(department_id, service_line)
    WHERE is_active = TRUE;

Terminology Bindings

Field Terminology Example Value
service_line Local service line master cardiology, general_medicine
assignment_type Local assignment type set primary

FHIR Resource Mapping

Table Field FHIR Resource FHIR Path
assignment_id PractitionerRole PractitionerRole.id
case_manager_id PractitionerRole PractitionerRole.practitioner.reference
department_id PractitionerRole PractitionerRole.organization / PractitionerRole.specialty
service_line PractitionerRole PractitionerRole.specialty.coding.code
is_active PractitionerRole PractitionerRole.active

Data Volume Estimates

Estimates assume a 300-bed UAE hospital, mixed medical/surgical, with moderate case management program.

Table Estimated Rows / Year 5-Year Volume Notes
case_reviews ~15,000 ~75,000 One per inpatient/observation encounter; includes some ED-only cases
utilization_reviews ~45,000 ~225,000 Avg 3 reviews per case (admission + 2 continued stay)
um_criteria_evaluations ~900,000 ~4.5M ~20 criteria items per review
discharge_plans ~14,000 ~70,000 Most inpatient cases have a plan; some cancelled
discharge_plan_tasks ~140,000 ~700,000 Avg 10 tasks per plan
care_coordination_notes ~120,000 ~600,000 Multiple activities per high-risk patient
continued_stay_authorizations ~20,000 ~100,000 Many cases require multiple CSAs
readmission_risk_assessments ~30,000 ~150,000 At least one per inpatient; some repeated
case_management_assignments ~500 ~1,500 Configuration-level; low growth

Indexes and storage sizing should account for 10-year retention in line with UAE practices, plus overhead for JSONB fields and text.


Data Retention Policy

Retention must comply with UAE regulations (MOH, DOH, DHA) and UAE PDPL, which generally require long-term retention of clinical and billing-related records (often 10+ years) and strong protection of personal data.

Table Recommended Retention Rationale & Notes
case_reviews Minimum 10 years from discharge; longer if required by MOH/DOH/DHA or medico-legal policy Core clinical-utilization record influencing level of care and billing; may be needed for audits and legal defense. Archive (read-only) after 5 years of inactivity.
utilization_reviews Minimum 10 years from review date Supports payer audits, denial appeals, and quality reporting. Often requested in retrospective reviews.
um_criteria_evaluations Minimum 10 years from associated review Detailed justification for medical necessity decisions; required for payer disputes and regulatory inspections.
discharge_plans Minimum 10 years from discharge Part of clinical record; supports continuity of care and medico-legal documentation. Shared summaries to NABIDH/Malaffi where applicable.
discharge_plan_tasks Minimum 10 years from discharge Evidence of completed arrangements and patient education; supports adverse event investigations.
care_coordination_notes Minimum 10 years from last activity Longitudinal care coordination record; may span multiple encounters. Consider archiving older notes while maintaining access controls per UAE PDPL.
continued_stay_authorizations Minimum 10 years from claim finalization Directly tied to reimbursement and denial management; must be retained for payer and regulator audits (DHA eClaimLink, DOH eClaims).
readmission_risk_assessments Minimum 10 years from assessment Used in quality analytics and may be referenced in adverse event reviews; can be aggregated for analytics but raw records should be retained.
case_management_assignments 10 years from deactivation of rule Operational configuration; keep history for audit of assignment logic and workload decisions.

Additional UAE-specific considerations:

  • UAE PDPL:
  • Implement role-based access and data minimization for all tables (especially narrative fields like clinical_justification, notes, barriers_identified).
  • Support data subject rights (access, restriction) via higher-level services; physical deletion is generally avoided for clinical records, but logical flags and access controls can be used.
  • NABIDH / Malaffi:
  • Discharge plans and care coordination summaries may be shared with HIEs; retention in HIS must still follow local policy even if data is also stored in HIE.
  • Backups & Archiving:
  • Archived data must remain searchable for audits while stored in encrypted, access-controlled environments aligned with ADHICS/DHA security standards.
content/rcm/case-management/03-data-specifications.md Generated 2026-02-20 22:54