Patient Access Data Specifications

Patient Access Data Specifications

Shared Entity References

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

Shared Entity Owning Module Table(s) FK Used in Patient Access
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
Appointments scheduling appointments appointments.appointment_id
Users & Auth ehr-patient-mgmt users, roles, permissions users.user_id
Facilities ehr-patient-mgmt facilities, departments, locations facilities.facility_id
Payers policy-contract-mgmt payers payers.payer_id
Insurance Plans policy-contract-mgmt insurance_plans insurance_plans.plan_id
Coverage Rules policy-contract-mgmt coverage_rules coverage_rules.rule_id

Entity Relationship Diagram

erDiagram patients ||--o{ eligibility_checks : "has" patients ||--o{ prior_authorizations : "has" patients ||--o{ referrals : "has" patients ||--o{ cost_estimates : "has" patients ||--o{ financial_counseling_records : "has" patients ||--o{ pre_registration_records : "has" payers ||--o{ eligibility_checks : "for" payers ||--o{ prior_authorizations : "for" payers ||--o{ referrals : "for" payers ||--o{ cost_estimates : "for" insurance_plans ||--o{ eligibility_checks : "plan" insurance_plans ||--o{ cost_estimates : "plan" encounters ||--o{ prior_authorizations : "during" encounters ||--o{ cost_estimates : "for" appointments ||--o{ pre_registration_records : "for" providers ||--o{ prior_authorizations : "requesting" providers ||--o{ referrals : "referring" providers ||--o{ referrals : "specialist" users ||--o{ eligibility_checks : "created by" users ||--o{ prior_authorizations : "created by" users ||--o{ prior_auth_requests : "submitted by" users ||--o{ referrals : "created by" users ||--o{ cost_estimates : "created by" users ||--o{ financial_counseling_records : "counselor user" users ||--o{ pre_registration_records : "created by" facilities ||--o{ eligibility_checks : "at" facilities ||--o{ prior_authorizations : "at" facilities ||--o{ referrals : "at" facilities ||--o{ cost_estimates : "at" facilities ||--o{ financial_counseling_records : "at" facilities ||--o{ pre_registration_records : "at" eligibility_checks ||--o{ eligibility_responses : "has" prior_authorizations ||--o{ prior_auth_requests : "has" cost_estimates ||--o{ financial_counseling_records : "may reference" cost_estimates ||--o{ prior_authorizations : "may reference (by codes)" referrals ||--o{ encounters : "used in (via FK on encounters elsewhere)" eligibility_checks { bigint check_id PK bigint patient_id FK bigint payer_id FK bigint plan_id FK bigint encounter_id FK bigint appointment_id FK bigint facility_id FK bigint created_by FK } eligibility_responses { bigint response_id PK bigint check_id FK } prior_authorizations { bigint auth_id PK bigint patient_id FK bigint encounter_id FK bigint payer_id FK bigint requesting_provider_id FK bigint facility_id FK } prior_auth_requests { bigint request_id PK bigint auth_id FK bigint submitted_by FK } referrals { bigint referral_id PK bigint patient_id FK bigint referring_provider_id FK bigint specialist_provider_id FK bigint payer_id FK bigint facility_id FK bigint created_by FK } cost_estimates { bigint estimate_id PK bigint patient_id FK bigint encounter_id FK bigint payer_id FK bigint plan_id FK bigint facility_id FK bigint created_by FK } financial_counseling_records { bigint record_id PK bigint patient_id FK bigint counselor_id FK bigint counselor_user_id FK bigint facility_id FK } pre_registration_records { bigint prereg_id PK bigint patient_id FK bigint appointment_id FK bigint facility_id FK bigint created_by FK }

Table Definitions

1. eligibility_checks

Purpose: Tracks all insurance eligibility verification requests initiated by Patient Access, including real-time checks via DHA eClaimLink, DOH eClaims (Shafafiya), and direct payer APIs. Supports auditability for financial clearance KPIs and UAE PDPL accountability.

Field Specifications

Field Type Nullable Default Constraint Description
check_id BIGINT NO IDENTITY PK Unique eligibility check record
patient_id BIGINT NO FK → patients.patient_id Patient whose coverage is being verified
payer_id BIGINT NO FK → payers.payer_id Payer queried (Daman, THIQA, etc.)
plan_id BIGINT YES FK → insurance_plans.plan_id Specific insurance plan if known
encounter_id BIGINT YES FK → encounters.encounter_id Encounter context (if already created)
appointment_id BIGINT YES FK → appointments.appointment_id Appointment for pre-registration checks
facility_id BIGINT NO FK → facilities.facility_id Facility where service will be rendered (Dubai/Abu Dhabi, etc.)
check_datetime TIMESTAMP NO CURRENT_TIMESTAMP When the check was initiated
check_type VARCHAR(30) NO 'real_time' CHECK in ('real_time','batch','pre_service','day_of_service') Type of eligibility check
request_source VARCHAR(30) NO 'registration' CHECK in ('registration','scheduling','billing','portal','batch_job') Originating workflow
member_id VARCHAR(50) YES Payer member/insurance ID used in query
group_id VARCHAR(50) YES Employer/group number if applicable
emirate_code VARCHAR(20) YES CHECK in ('AD','DXB','SHJ','AJM','UAQ','RAK','FUJ') Emirate of coverage/service
status VARCHAR(20) NO 'pending' CHECK in ('pending','success','failed','no_response') Technical status of the check
is_batch BOOLEAN NO FALSE Flag for batch eligibility runs
correlation_id VARCHAR(100) YES Correlation ID with external API (eClaimLink/eClaims)
raw_request JSONB YES Raw request payload sent to payer (minimised per PDPL)
error_message VARCHAR(500) YES Error details if status in ('failed','no_response')
created_by BIGINT YES FK → users.user_id User initiating the check (or system user)
created_at TIMESTAMP NO CURRENT_TIMESTAMP Record creation timestamp
updated_at TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Last update timestamp

SQL DDL

SQL
CREATE TABLE eligibility_checks (
    check_id           BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id         BIGINT NOT NULL,
    payer_id           BIGINT NOT NULL,
    plan_id            BIGINT NULL,
    encounter_id       BIGINT NULL,
    appointment_id     BIGINT NULL,
    facility_id        BIGINT NOT NULL,
    check_datetime     TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    check_type         VARCHAR(30) NOT NULL DEFAULT 'real_time',
    request_source     VARCHAR(30) NOT NULL DEFAULT 'registration',
    member_id          VARCHAR(50),
    group_id           VARCHAR(50),
    emirate_code       VARCHAR(20),
    status             VARCHAR(20) NOT NULL DEFAULT 'pending',
    is_batch           BOOLEAN NOT NULL DEFAULT FALSE,
    correlation_id     VARCHAR(100),
    raw_request        JSONB,
    error_message      VARCHAR(500),
    created_by         BIGINT,
    created_at         TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at         TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT chk_eligibility_check_type
        CHECK (check_type IN ('real_time','batch','pre_service','day_of_service')),
    CONSTRAINT chk_eligibility_request_source
        CHECK (request_source IN ('registration','scheduling','billing','portal','batch_job')),
    CONSTRAINT chk_eligibility_status
        CHECK (status IN ('pending','success','failed','no_response')),
    CONSTRAINT chk_eligibility_emirate
        CHECK (emirate_code IS NULL OR emirate_code IN ('AD','DXB','SHJ','AJM','UAQ','RAK','FUJ'))
);

COMMENT ON TABLE eligibility_checks IS 'Tracks insurance eligibility verification requests (DHA eClaimLink, DOH eClaims, direct payer APIs) for Patient Access module.';
COMMENT ON COLUMN eligibility_checks.emirate_code IS 'Two/three-letter code for UAE emirate where service is rendered or coverage applies.';

ALTER TABLE eligibility_checks
    ADD CONSTRAINT fk_elig_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_elig_payer
        FOREIGN KEY (payer_id) REFERENCES payers(payer_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_elig_plan
        FOREIGN KEY (plan_id) REFERENCES insurance_plans(plan_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_elig_encounter
        FOREIGN KEY (encounter_id) REFERENCES encounters(encounter_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_elig_appointment
        FOREIGN KEY (appointment_id) REFERENCES appointments(appointment_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_elig_facility
        FOREIGN KEY (facility_id) REFERENCES facilities(facility_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_elig_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL;

CREATE INDEX idx_elig_checks_patient ON eligibility_checks(patient_id);
CREATE INDEX idx_elig_checks_payer ON eligibility_checks(payer_id, plan_id);
CREATE INDEX idx_elig_checks_datetime ON eligibility_checks(check_datetime);
CREATE INDEX idx_elig_checks_status ON eligibility_checks(status);
CREATE INDEX idx_elig_checks_encounter ON eligibility_checks(encounter_id);
CREATE INDEX idx_elig_checks_appointment ON eligibility_checks(appointment_id);
CREATE INDEX idx_elig_checks_batch ON eligibility_checks(is_batch) WHERE is_batch = TRUE;

Terminology Bindings

Field Terminology Example Value
emirate_code Local UAE emirate code set DXB (Dubai), AD (Abu Dhabi)
check_type Local value set real_time
request_source Local value set registration
status Local value set success

FHIR Resource Mapping

Eligibility checks map primarily to CoverageEligibilityRequest and CoverageEligibilityResponse (FHIR R4).

Table Field FHIR Resource FHIR Path
check_id CoverageEligibilityRequest CoverageEligibilityRequest.id
patient_id CoverageEligibilityRequest CoverageEligibilityRequest.patient.reference
payer_id CoverageEligibilityRequest CoverageEligibilityRequest.insurer.reference
plan_id CoverageEligibilityRequest CoverageEligibilityRequest.insurance.coverage (reference to Coverage)
encounter_id CoverageEligibilityRequest CoverageEligibilityRequest.encounter.reference
check_datetime CoverageEligibilityRequest CoverageEligibilityRequest.created
check_type CoverageEligibilityRequest CoverageEligibilityRequest.purpose (mapped to benefits / validation)
member_id CoverageEligibilityRequest CoverageEligibilityRequest.insurance.coverage.identifier
emirate_code CoverageEligibilityRequest Extension (e.g., extension[emirate])
status CoverageEligibilityRequest CoverageEligibilityRequest.status
correlation_id CoverageEligibilityRequest CoverageEligibilityRequest.identifier

2. eligibility_responses

Purpose: Stores parsed benefit and coverage details returned from eligibility checks, including co-pay, deductible, coinsurance, and annual maximums, as required for cost estimation and financial clearance.

Field Specifications

Field Type Nullable Default Constraint Description
response_id BIGINT NO IDENTITY PK Unique eligibility response record
check_id BIGINT NO FK → eligibility_checks.check_id Parent eligibility check
is_eligible BOOLEAN NO FALSE Indicates active coverage at time of check
effective_date DATE YES Coverage effective date
termination_date DATE YES Coverage termination date if known
copay_amount NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Fixed co-pay amount per visit/service
copay_percentage NUMERIC(5,2) YES 0.00 CHECK between 0 and 100 Co-pay percentage if applicable
deductible_total NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Annual deductible amount
deductible_met NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Deductible already met YTD
coinsurance NUMERIC(5,2) YES 0.00 CHECK between 0 and 100 Coinsurance percentage patient pays
annual_max NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Annual benefit maximum
annual_max_remaining NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Remaining annual benefit
payer_response_code VARCHAR(50) YES Payer-specific response/status code
response_raw JSONB YES Raw response payload from payer (minimised per PDPL)
response_datetime TIMESTAMP NO CURRENT_TIMESTAMP When response was received
network_status VARCHAR(20) YES CHECK in ('in_network','out_of_network','unknown') Network status of facility/provider
plan_name VARCHAR(200) YES Human-readable plan name from response
coverage_summary VARCHAR(500) YES Short text summary for UI display

SQL DDL

SQL
CREATE TABLE eligibility_responses (
    response_id           BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    check_id              BIGINT NOT NULL,
    is_eligible           BOOLEAN NOT NULL DEFAULT FALSE,
    effective_date        DATE,
    termination_date      DATE,
    copay_amount          NUMERIC(12,2) DEFAULT 0.00,
    copay_percentage      NUMERIC(5,2)  DEFAULT 0.00,
    deductible_total      NUMERIC(12,2) DEFAULT 0.00,
    deductible_met        NUMERIC(12,2) DEFAULT 0.00,
    coinsurance           NUMERIC(5,2)  DEFAULT 0.00,
    annual_max            NUMERIC(12,2) DEFAULT 0.00,
    annual_max_remaining  NUMERIC(12,2) DEFAULT 0.00,
    payer_response_code   VARCHAR(50),
    response_raw          JSONB,
    response_datetime     TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    network_status        VARCHAR(20),
    plan_name             VARCHAR(200),
    coverage_summary      VARCHAR(500),

    CONSTRAINT fk_elig_response_check
        FOREIGN KEY (check_id) REFERENCES eligibility_checks(check_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    CONSTRAINT chk_elig_resp_copay_amt
        CHECK (copay_amount >= 0),
    CONSTRAINT chk_elig_resp_deductible
        CHECK (deductible_total >= 0 AND deductible_met >= 0),
    CONSTRAINT chk_elig_resp_coinsurance
        CHECK (coinsurance >= 0 AND coinsurance <= 100),
    CONSTRAINT chk_elig_resp_annual_max
        CHECK (annual_max >= 0 AND annual_max_remaining >= 0),
    CONSTRAINT chk_elig_resp_network
        CHECK (network_status IS NULL OR network_status IN ('in_network','out_of_network','unknown'))
);

CREATE INDEX idx_elig_responses_check ON eligibility_responses(check_id);
CREATE INDEX idx_elig_responses_eligible ON eligibility_responses(is_eligible);
CREATE INDEX idx_elig_responses_datetime ON eligibility_responses(response_datetime);

Terminology Bindings

Field Terminology Example Value
network_status Local value set in_network
payer_response_code Payer-specific code sets (DHA eClaimLink, DOH eClaims) ELG-000

FHIR Resource Mapping

Maps to CoverageEligibilityResponse.

Table Field FHIR Resource FHIR Path
response_id CoverageEligibilityResponse CoverageEligibilityResponse.id
check_id CoverageEligibilityResponse CoverageEligibilityResponse.request.reference
is_eligible CoverageEligibilityResponse CoverageEligibilityResponse.outcome (complete/error) and insurance.inforce
effective_date CoverageEligibilityResponse CoverageEligibilityResponse.servicedPeriod.start
termination_date CoverageEligibilityResponse CoverageEligibilityResponse.servicedPeriod.end
copay_amount CoverageEligibilityResponse insurance.benefitBalance.financial.allowedMoney (with type copay)
copay_percentage CoverageEligibilityResponse insurance.benefitBalance.financial.allowedUnsignedInt or extension
deductible_total / deductible_met CoverageEligibilityResponse insurance.benefitBalance.financial (type deductible)
coinsurance CoverageEligibilityResponse insurance.benefitBalance.financial (type coinsurance)
annual_max / annual_max_remaining CoverageEligibilityResponse insurance.benefitBalance.financial (type benefit)
network_status CoverageEligibilityResponse insurance.network
plan_name CoverageEligibilityResponse insurance.coverage.display

3. prior_authorizations

Purpose: Stores prior authorization records for services requiring payer approval under UAE payer rules (DHA eClaimLink, DOH eClaims, private payers). Used for preventing authorization-related denials and linking auth numbers to claims.

Field Specifications

Field Type Nullable Default Constraint Description
auth_id BIGINT NO IDENTITY PK Unique prior authorization record
patient_id BIGINT NO FK → patients.patient_id Patient for whom auth is requested
encounter_id BIGINT YES FK → encounters.encounter_id Encounter context (if available)
payer_id BIGINT NO FK → payers.payer_id Payer requiring authorization
requesting_provider_id BIGINT NO FK → providers.provider_id Ordering/referring provider
facility_id BIGINT NO FK → facilities.facility_id Facility where service will be rendered
auth_number VARCHAR(50) YES UNIQUE NULLS NOT DISTINCT Payer-issued authorization number
service_codes TEXT NO Comma-separated CPT/HCPCS codes requested (normalized elsewhere)
icd10_codes TEXT NO Comma-separated ICD-10-AM diagnosis codes
auth_status VARCHAR(30) NO 'pending' CHECK in ('draft','pending','under_review','approved','partially_approved','denied','cancelled','expired') Current status
requested_date TIMESTAMP NO CURRENT_TIMESTAMP When auth was first requested
approved_date TIMESTAMP YES When auth was approved
denied_date TIMESTAMP YES When auth was denied
valid_from DATE YES Start date of authorization validity
valid_to DATE YES End date of authorization validity
approved_units INTEGER YES CHECK ≥ 0 Number of units/visits approved
used_units INTEGER YES 0 CHECK ≥ 0 Units/visits already used
is_urgent BOOLEAN NO FALSE Indicates urgent/expedited auth
denial_reason TEXT YES Payer denial reason text
notes TEXT YES Internal notes (appeals, peer review)
last_status_update TIMESTAMP NO CURRENT_TIMESTAMP Last time status changed
created_by BIGINT YES FK → users.user_id User who created record
updated_by BIGINT YES FK → users.user_id User who last updated
created_at TIMESTAMP NO CURRENT_TIMESTAMP Record creation timestamp
updated_at TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Last update timestamp

SQL DDL

SQL
CREATE TABLE prior_authorizations (
    auth_id               BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id            BIGINT NOT NULL,
    encounter_id          BIGINT NULL,
    payer_id              BIGINT NOT NULL,
    requesting_provider_id BIGINT NOT NULL,
    facility_id           BIGINT NOT NULL,
    auth_number           VARCHAR(50),
    service_codes         TEXT NOT NULL,
    icd10_codes           TEXT NOT NULL,
    auth_status           VARCHAR(30) NOT NULL DEFAULT 'pending',
    requested_date        TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    approved_date         TIMESTAMP NULL,
    denied_date           TIMESTAMP NULL,
    valid_from            DATE NULL,
    valid_to              DATE NULL,
    approved_units        INTEGER NULL,
    used_units            INTEGER DEFAULT 0,
    is_urgent             BOOLEAN NOT NULL DEFAULT FALSE,
    denial_reason         TEXT,
    notes                 TEXT,
    last_status_update    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    created_by            BIGINT,
    updated_by            BIGINT,
    created_at            TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at            TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT uq_auth_number UNIQUE (auth_number),
    CONSTRAINT chk_auth_status
        CHECK (auth_status IN ('draft','pending','under_review','approved','partially_approved','denied','cancelled','expired')),
    CONSTRAINT chk_auth_units
        CHECK ((approved_units IS NULL OR approved_units >= 0) AND used_units >= 0),
    CONSTRAINT chk_auth_dates
        CHECK (valid_to IS NULL OR valid_from IS NULL OR valid_to >= valid_from)
);

ALTER TABLE prior_authorizations
    ADD CONSTRAINT fk_auth_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_auth_encounter
        FOREIGN KEY (encounter_id) REFERENCES encounters(encounter_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_auth_payer
        FOREIGN KEY (payer_id) REFERENCES payers(payer_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_auth_provider
        FOREIGN KEY (requesting_provider_id) REFERENCES providers(provider_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_auth_facility
        FOREIGN KEY (facility_id) REFERENCES facilities(facility_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_auth_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_auth_updated_by
        FOREIGN KEY (updated_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL;

CREATE INDEX idx_auth_patient ON prior_authorizations(patient_id);
CREATE INDEX idx_auth_payer_status ON prior_authorizations(payer_id, auth_status);
CREATE INDEX idx_auth_encounter ON prior_authorizations(encounter_id);
CREATE INDEX idx_auth_number ON prior_authorizations(auth_number);
CREATE INDEX idx_auth_validity ON prior_authorizations(valid_from, valid_to);
CREATE INDEX idx_auth_status ON prior_authorizations(auth_status);

Terminology Bindings

Field Terminology Example Value
service_codes CPT 29881, 29877
icd10_codes ICD-10-AM M17.11
auth_status Local value set approved

FHIR Resource Mapping

Maps to PriorAuthorization pattern using CoverageEligibilityRequest/CoverageEligibilityResponse plus Task or Authorization (if local profile), and for claims to Claim.preAuthRef.

Table Field FHIR Resource FHIR Path
auth_id Task (auth request) Task.id
patient_id Task Task.for.reference
requesting_provider_id Task Task.requester.reference
payer_id Task Task.owner.reference (payer org)
auth_number Claim / ClaimResponse Claim.preAuthRef / ClaimResponse.preAuthRef
service_codes ServiceRequest / Claim ServiceRequest.code.coding (CPT)
icd10_codes Condition / Claim Condition.code.coding or Claim.diagnosis
auth_status Task Task.status / Task.statusReason
requested_date Task Task.authoredOn
approved_date Task Task.lastModified with status completed
valid_from / valid_to Coverage Coverage.period.start / .end (auth coverage period)
approved_units / used_units Coverage Coverage.extension[approvedUnits] / [usedUnits] (local extensions)

4. prior_auth_requests

Purpose: Captures each submission or interaction with the payer related to a prior authorization (initial request, resubmission, appeal, peer-to-peer review). Provides a detailed audit trail for DOH/DHA audits and PDPL accountability.

Field Specifications

Field Type Nullable Default Constraint Description
request_id BIGINT NO IDENTITY PK Unique auth request record
auth_id BIGINT NO FK → prior_authorizations.auth_id Parent authorization
submission_datetime TIMESTAMP NO CURRENT_TIMESTAMP When request was submitted
submission_channel VARCHAR(30) NO 'eClaimLink' CHECK in ('eClaimLink','DOH_eClaims','portal','phone','fax','email') Channel used
clinical_documentation TEXT YES Summary of clinical justification sent
payer_response TEXT YES Free-text response from payer
response_datetime TIMESTAMP YES When response was received
reviewer_name VARCHAR(200) YES Payer reviewer/medical director name
peer_review_scheduled BOOLEAN NO FALSE Whether peer-to-peer review scheduled
peer_review_datetime TIMESTAMP YES Scheduled peer review time
peer_review_reference VARCHAR(50) YES Payer reference for peer review
attachments_metadata TEXT YES Metadata of attached documents (not PHI content)
submitted_by BIGINT YES FK → users.user_id User submitting request
created_at TIMESTAMP NO CURRENT_TIMESTAMP Record creation timestamp

SQL DDL

SQL
CREATE TABLE prior_auth_requests (
    request_id            BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    auth_id               BIGINT NOT NULL,
    submission_datetime   TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    submission_channel    VARCHAR(30) NOT NULL DEFAULT 'eClaimLink',
    clinical_documentation TEXT,
    payer_response        TEXT,
    response_datetime     TIMESTAMP NULL,
    reviewer_name         VARCHAR(200),
    peer_review_scheduled BOOLEAN NOT NULL DEFAULT FALSE,
    peer_review_datetime  TIMESTAMP NULL,
    peer_review_reference VARCHAR(50),
    attachments_metadata  TEXT,
    submitted_by          BIGINT,
    created_at            TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT chk_auth_request_channel
        CHECK (submission_channel IN ('eClaimLink','DOH_eClaims','portal','phone','fax','email')),
    CONSTRAINT chk_peer_review
        CHECK (peer_review_scheduled = FALSE OR peer_review_datetime IS NOT NULL)
);

ALTER TABLE prior_auth_requests
    ADD CONSTRAINT fk_auth_req_auth
        FOREIGN KEY (auth_id) REFERENCES prior_authorizations(auth_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    ADD CONSTRAINT fk_auth_req_user
        FOREIGN KEY (submitted_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL;

CREATE INDEX idx_auth_requests_auth ON prior_auth_requests(auth_id);
CREATE INDEX idx_auth_requests_channel ON prior_auth_requests(submission_channel);
CREATE INDEX idx_auth_requests_submitted ON prior_auth_requests(submission_datetime);

Terminology Bindings

Field Terminology Example Value
submission_channel Local value set eClaimLink

FHIR Resource Mapping

Maps to Task history and Communication resources.

Table Field FHIR Resource FHIR Path
request_id Task Task.id (or Task.identifier)
auth_id Task Task.basedOn.reference
submission_datetime Task Task.authoredOn
submission_channel Task Task.channelType (extension)
clinical_documentation Communication Communication.payload.contentString
payer_response Communication Communication.payload.contentString (response)
reviewer_name Practitioner Practitioner.name (if modeled)
peer_review_datetime Appointment Appointment.start (peer review call)

5. referrals

Purpose: Tracks referrals between providers (internal and external) including payer-required referrals for specialist visits. Supports visit counting, expiry alerts, and linkage to payer referral numbers.

Field Specifications

Field Type Nullable Default Constraint Description
referral_id BIGINT NO IDENTITY PK Unique referral record
patient_id BIGINT NO FK → patients.patient_id Patient being referred
referring_provider_id BIGINT NO FK → providers.provider_id Provider initiating referral
specialist_provider_id BIGINT YES FK → providers.provider_id Target specialist (if known)
payer_id BIGINT YES FK → payers.payer_id Payer requiring referral
facility_id BIGINT NO FK → facilities.facility_id Facility managing referral
referral_number VARCHAR(50) YES Payer-issued referral number
service_type VARCHAR(50) NO Referral type (e.g., cardiology, physiotherapy)
authorized_visits INTEGER YES CHECK ≥ 0 Number of visits authorized
used_visits INTEGER YES 0 CHECK ≥ 0 Visits already used
valid_from DATE YES Referral validity start date
valid_to DATE YES Referral validity end date
status VARCHAR(30) NO 'active' CHECK in ('draft','pending_payer','active','expired','closed','cancelled') Referral status
icd10_code VARCHAR(10) YES Primary ICD-10-AM diagnosis for referral
notes TEXT YES Additional notes
created_by BIGINT YES FK → users.user_id User creating referral
created_at TIMESTAMP NO CURRENT_TIMESTAMP Creation timestamp
updated_at TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Last update timestamp

SQL DDL

SQL
CREATE TABLE referrals (
    referral_id            BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id             BIGINT NOT NULL,
    referring_provider_id  BIGINT NOT NULL,
    specialist_provider_id BIGINT NULL,
    payer_id               BIGINT NULL,
    facility_id            BIGINT NOT NULL,
    referral_number        VARCHAR(50),
    service_type           VARCHAR(50) NOT NULL,
    authorized_visits      INTEGER NULL,
    used_visits            INTEGER DEFAULT 0,
    valid_from             DATE NULL,
    valid_to               DATE NULL,
    status                 VARCHAR(30) NOT NULL DEFAULT 'active',
    icd10_code             VARCHAR(10),
    notes                  TEXT,
    created_by             BIGINT,
    created_at             TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at             TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT chk_referral_visits
        CHECK ((authorized_visits IS NULL OR authorized_visits >= 0) AND used_visits >= 0),
    CONSTRAINT chk_referral_dates
        CHECK (valid_to IS NULL OR valid_from IS NULL OR valid_to >= valid_from),
    CONSTRAINT chk_referral_status
        CHECK (status IN ('draft','pending_payer','active','expired','closed','cancelled'))
);

ALTER TABLE referrals
    ADD CONSTRAINT fk_referral_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_referral_ref_provider
        FOREIGN KEY (referring_provider_id) REFERENCES providers(provider_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_referral_spec_provider
        FOREIGN KEY (specialist_provider_id) REFERENCES providers(provider_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_referral_payer
        FOREIGN KEY (payer_id) REFERENCES payers(payer_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_referral_facility
        FOREIGN KEY (facility_id) REFERENCES facilities(facility_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_referral_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL;

CREATE INDEX idx_referrals_patient ON referrals(patient_id);
CREATE INDEX idx_referrals_provider ON referrals(referring_provider_id);
CREATE INDEX idx_referrals_specialist ON referrals(specialist_provider_id);
CREATE INDEX idx_referrals_status ON referrals(status);
CREATE INDEX idx_referrals_validity ON referrals(valid_from, valid_to);

Terminology Bindings

Field Terminology Example Value
icd10_code ICD-10-AM I10
service_type Local referral type code set (may align with SNOMED CT specialties) cardiology

FHIR Resource Mapping

Maps to ServiceRequest and ReferralRequest pattern.

Table Field FHIR Resource FHIR Path
referral_id ServiceRequest ServiceRequest.id
patient_id ServiceRequest ServiceRequest.subject.reference
referring_provider_id ServiceRequest ServiceRequest.requester.reference
specialist_provider_id ServiceRequest ServiceRequest.performer.reference
service_type ServiceRequest ServiceRequest.category / ServiceRequest.code
icd10_code Condition Condition.code.coding (linked via ServiceRequest.reasonReference)
authorized_visits ServiceRequest ServiceRequest.occurrence[x] or extension authorizedVisits
valid_from / valid_to ServiceRequest ServiceRequest.authoredOn / ServiceRequest.occurrencePeriod
status ServiceRequest ServiceRequest.status

6. cost_estimates

Purpose: Stores patient cost estimates for planned services, including estimated charges, payer payment, and patient responsibility. Used for financial counseling, pre-service collections, and PDPL-compliant communication via Patient Portal.

Field Specifications

Field Type Nullable Default Constraint Description
estimate_id BIGINT NO IDENTITY PK Unique cost estimate record
patient_id BIGINT NO FK → patients.patient_id Patient receiving services
encounter_id BIGINT YES FK → encounters.encounter_id Planned encounter (if created)
payer_id BIGINT YES FK → payers.payer_id Payer used for estimate
plan_id BIGINT YES FK → insurance_plans.plan_id Plan used for estimate
facility_id BIGINT NO FK → facilities.facility_id Facility where services will occur
planned_cpt_codes TEXT NO Comma-separated CPT codes for planned services
estimated_charges NUMERIC(12,2) NO 0.00 CHECK ≥ 0 Total gross charges for planned services
estimated_payer_payment NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Expected payer payment
estimated_patient_responsibility NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Expected patient share (OOP)
deductible_applied NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Portion applied to deductible
copay_applied NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Co-pay amount included
coinsurance_applied NUMERIC(12,2) YES 0.00 CHECK ≥ 0 Coinsurance amount included
estimate_datetime TIMESTAMP NO CURRENT_TIMESTAMP When estimate was generated
acknowledged_by_patient BOOLEAN NO FALSE Whether patient acknowledged estimate
acknowledged_datetime TIMESTAMP YES When patient acknowledged
valid_until DATE YES Date until which estimate is valid
status VARCHAR(30) NO 'draft' CHECK in ('draft','final','superseded','cancelled') Estimate status
created_by BIGINT YES FK → users.user_id User who created estimate
updated_by BIGINT YES FK → users.user_id User who last updated
created_at TIMESTAMP NO CURRENT_TIMESTAMP Creation timestamp
updated_at TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Last update timestamp

SQL DDL

SQL
CREATE TABLE cost_estimates (
    estimate_id                    BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id                     BIGINT NOT NULL,
    encounter_id                   BIGINT NULL,
    payer_id                       BIGINT NULL,
    plan_id                        BIGINT NULL,
    facility_id                    BIGINT NOT NULL,
    planned_cpt_codes              TEXT NOT NULL,
    estimated_charges              NUMERIC(12,2) NOT NULL DEFAULT 0.00,
    estimated_payer_payment        NUMERIC(12,2) DEFAULT 0.00,
    estimated_patient_responsibility NUMERIC(12,2) DEFAULT 0.00,
    deductible_applied             NUMERIC(12,2) DEFAULT 0.00,
    copay_applied                  NUMERIC(12,2) DEFAULT 0.00,
    coinsurance_applied            NUMERIC(12,2) DEFAULT 0.00,
    estimate_datetime              TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    acknowledged_by_patient        BOOLEAN NOT NULL DEFAULT FALSE,
    acknowledged_datetime          TIMESTAMP NULL,
    valid_until                    DATE NULL,
    status                         VARCHAR(30) NOT NULL DEFAULT 'draft',
    created_by                     BIGINT,
    updated_by                     BIGINT,
    created_at                     TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at                     TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT chk_estimate_amounts
        CHECK (estimated_charges >= 0
           AND estimated_payer_payment >= 0
           AND estimated_patient_responsibility >= 0
           AND deductible_applied >= 0
           AND copay_applied >= 0
           AND coinsurance_applied >= 0),
    CONSTRAINT chk_estimate_status
        CHECK (status IN ('draft','final','superseded','cancelled'))
);

ALTER TABLE cost_estimates
    ADD CONSTRAINT fk_estimate_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_estimate_encounter
        FOREIGN KEY (encounter_id) REFERENCES encounters(encounter_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_estimate_payer
        FOREIGN KEY (payer_id) REFERENCES payers(payer_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_estimate_plan
        FOREIGN KEY (plan_id) REFERENCES insurance_plans(plan_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_estimate_facility
        FOREIGN KEY (facility_id) REFERENCES facilities(facility_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_estimate_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_estimate_updated_by
        FOREIGN KEY (updated_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL;

CREATE INDEX idx_estimates_patient ON cost_estimates(patient_id);
CREATE INDEX idx_estimates_encounter ON cost_estimates(encounter_id);
CREATE INDEX idx_estimates_status ON cost_estimates(status);
CREATE INDEX idx_estimates_datetime ON cost_estimates(estimate_datetime);

Terminology Bindings

Field Terminology Example Value
planned_cpt_codes CPT 70450, 99213

FHIR Resource Mapping

Maps to ChargeItem and Coverage/ExplanationOfBenefit for estimate-style use.

Table Field FHIR Resource FHIR Path
estimate_id ChargeItem ChargeItem.id
patient_id ChargeItem ChargeItem.subject.reference
encounter_id ChargeItem ChargeItem.context.reference
planned_cpt_codes ChargeItem ChargeItem.code.coding (CPT)
estimated_charges ChargeItem ChargeItem.priceOverride
estimated_patient_responsibility ExplanationOfBenefit ExplanationOfBenefit.total (category patient-pay)
acknowledged_by_patient Communication Communication.status / extension acknowledged
valid_until ChargeItem ChargeItem.occurrencePeriod.end

7. financial_counseling_records

Purpose: Documents financial counseling sessions, including assessment of patient financial situation, options presented (payment plans, charity care, government assistance), and decisions. Supports PDPL accountability and DOH/DHA audit trails.

Field Specifications

Field Type Nullable Default Constraint Description
record_id BIGINT NO IDENTITY PK Unique counseling record
patient_id BIGINT NO FK → patients.patient_id Patient counseled
counselor_id BIGINT YES FK → providers.provider_id (or staff provider record) Counselor (if modeled as provider)
counselor_user_id BIGINT YES FK → users.user_id HIS user performing counseling
facility_id BIGINT NO FK → facilities.facility_id Facility responsible
session_datetime TIMESTAMP NO CURRENT_TIMESTAMP When counseling occurred
counseling_type VARCHAR(30) NO 'general' CHECK in ('general','payment_plan','charity_care','government_assistance','follow_up') Type of counseling
patient_situation TEXT YES Summary of patient financial situation
options_presented TEXT YES Options discussed with patient
patient_decision TEXT YES Patient’s decision/selection
payment_plan_id BIGINT YES Reference to payment plan (in billing module)
charity_application_id BIGINT YES Reference to charity application (in billing/finance)
notes TEXT YES Additional notes (minimal PHI per PDPL)
follow_up_required BOOLEAN NO FALSE Whether follow-up is needed
follow_up_due_date TIMESTAMP YES When follow-up is due
outcome_status VARCHAR(30) YES CHECK in ('open','in_progress','completed','declined') Outcome status
created_at TIMESTAMP NO CURRENT_TIMESTAMP Creation timestamp
updated_at TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Last update timestamp

SQL DDL

SQL
CREATE TABLE financial_counseling_records (
    record_id            BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id           BIGINT NOT NULL,
    counselor_id         BIGINT NULL,
    counselor_user_id    BIGINT NULL,
    facility_id          BIGINT NOT NULL,
    session_datetime     TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    counseling_type      VARCHAR(30) NOT NULL DEFAULT 'general',
    patient_situation    TEXT,
    options_presented    TEXT,
    patient_decision     TEXT,
    payment_plan_id      BIGINT,
    charity_application_id BIGINT,
    notes                TEXT,
    follow_up_required   BOOLEAN NOT NULL DEFAULT FALSE,
    follow_up_due_date   TIMESTAMP NULL,
    outcome_status       VARCHAR(30),

    created_at           TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at           TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT chk_counseling_type
        CHECK (counseling_type IN ('general','payment_plan','charity_care','government_assistance','follow_up')),
    CONSTRAINT chk_counseling_outcome
        CHECK (outcome_status IS NULL OR outcome_status IN ('open','in_progress','completed','declined')),
    CONSTRAINT chk_follow_up
        CHECK (follow_up_required = FALSE OR follow_up_due_date IS NOT NULL)
);

ALTER TABLE financial_counseling_records
    ADD CONSTRAINT fk_counseling_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_counseling_counselor
        FOREIGN KEY (counselor_id) REFERENCES providers(provider_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_counseling_user
        FOREIGN KEY (counselor_user_id) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL,
    ADD CONSTRAINT fk_counseling_facility
        FOREIGN KEY (facility_id) REFERENCES facilities(facility_id)
        ON UPDATE CASCADE ON DELETE RESTRICT;

CREATE INDEX idx_counseling_patient ON financial_counseling_records(patient_id);
CREATE INDEX idx_counseling_facility ON financial_counseling_records(facility_id);
CREATE INDEX idx_counseling_session ON financial_counseling_records(session_datetime);
CREATE INDEX idx_counseling_outcome ON financial_counseling_records(outcome_status);

Terminology Bindings

Field Terminology Example Value
counseling_type Local value set payment_plan
outcome_status Local value set completed

FHIR Resource Mapping

Maps to Communication and Consent (for financial agreements) and possibly Task.

Table Field FHIR Resource FHIR Path
record_id Communication Communication.id
patient_id Communication Communication.subject.reference
session_datetime Communication Communication.sent
counseling_type Communication Communication.category
patient_situation Communication Communication.note.text
options_presented Communication Communication.payload.contentString
patient_decision Consent Consent.provision.type / Consent.policyRule (for payment plan acceptance)
follow_up_required Task Task.status / extension followUpRequired

8. pre_registration_records

Purpose: Tracks pre-registration activities for upcoming appointments, including portal-based completion of demographics, insurance, and consent. Supports automation of eligibility checks and identification of missing prior auth/referrals.

Field Specifications

Field Type Nullable Default Constraint Description
prereg_id BIGINT NO IDENTITY PK Unique pre-registration record
patient_id BIGINT NO FK → patients.patient_id Patient pre-registering
appointment_id BIGINT NO FK → appointments.appointment_id Appointment being prepared
facility_id BIGINT NO FK → facilities.facility_id Facility of appointment
invitation_sent_datetime TIMESTAMP YES When pre-reg invitation sent (SMS/email/portal)
completed_datetime TIMESTAMP YES When patient/clerk completed pre-reg
demographics_complete BOOLEAN NO FALSE Demographics section completed
insurance_verified BOOLEAN NO FALSE Insurance verified (eligibility success)
auth_verified BOOLEAN NO FALSE Required prior auth/referral verified
consent_obtained BOOLEAN NO FALSE Required consents obtained (per PDPL and facility policy)
status VARCHAR(30) NO 'pending' CHECK in ('pending','in_progress','completed','cancelled') Overall pre-reg status
channel VARCHAR(30) YES CHECK in ('portal','phone','onsite','kiosk') Channel used to complete pre-reg
incomplete_items TEXT YES Human-readable list of outstanding items
created_by BIGINT YES FK → users.user_id User who initiated pre-reg (if not portal)
created_at TIMESTAMP NO CURRENT_TIMESTAMP Creation timestamp
updated_at TIMESTAMP NO CURRENT_TIMESTAMP ON UPDATE Last update timestamp

SQL DDL

SQL
CREATE TABLE pre_registration_records (
    prereg_id                BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    patient_id               BIGINT NOT NULL,
    appointment_id           BIGINT NOT NULL,
    facility_id              BIGINT NOT NULL,
    invitation_sent_datetime TIMESTAMP NULL,
    completed_datetime       TIMESTAMP NULL,
    demographics_complete    BOOLEAN NOT NULL DEFAULT FALSE,
    insurance_verified       BOOLEAN NOT NULL DEFAULT FALSE,
    auth_verified            BOOLEAN NOT NULL DEFAULT FALSE,
    consent_obtained         BOOLEAN NOT NULL DEFAULT FALSE,
    status                   VARCHAR(30) NOT NULL DEFAULT 'pending',
    channel                  VARCHAR(30),
    incomplete_items         TEXT,
    created_by               BIGINT,
    created_at               TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at               TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT chk_prereg_status
        CHECK (status IN ('pending','in_progress','completed','cancelled')),
    CONSTRAINT chk_prereg_channel
        CHECK (channel IS NULL OR channel IN ('portal','phone','onsite','kiosk'))
);

ALTER TABLE pre_registration_records
    ADD CONSTRAINT fk_prereg_patient
        FOREIGN KEY (patient_id) REFERENCES patients(patient_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_prereg_appointment
        FOREIGN KEY (appointment_id) REFERENCES appointments(appointment_id)
        ON UPDATE CASCADE ON DELETE CASCADE,
    ADD CONSTRAINT fk_prereg_facility
        FOREIGN KEY (facility_id) REFERENCES facilities(facility_id)
        ON UPDATE CASCADE ON DELETE RESTRICT,
    ADD CONSTRAINT fk_prereg_created_by
        FOREIGN KEY (created_by) REFERENCES users(user_id)
        ON UPDATE CASCADE ON DELETE SET NULL;

CREATE INDEX idx_prereg_patient ON pre_registration_records(patient_id);
CREATE INDEX idx_prereg_appointment ON pre_registration_records(appointment_id);
CREATE INDEX idx_prereg_status ON pre_registration_records(status);
CREATE INDEX idx_prereg_facility ON pre_registration_records(facility_id);

Terminology Bindings

Field Terminology Example Value
status Local value set completed
channel Local value set portal

FHIR Resource Mapping

Maps to QuestionnaireResponse, Task, and Consent.

Table Field FHIR Resource FHIR Path
prereg_id Task Task.id
patient_id QuestionnaireResponse QuestionnaireResponse.subject.reference
appointment_id Appointment Appointment.id (link via Task.focus)
invitation_sent_datetime Task Task.authoredOn
completed_datetime QuestionnaireResponse QuestionnaireResponse.authored
demographics_complete Task Task.status / extension demographicsComplete
insurance_verified CoverageEligibilityResponse CoverageEligibilityResponse.insurance.inforce
auth_verified Task extension authVerified
consent_obtained Consent Consent.status = active
status Task Task.status
channel Task Task.channelType (extension)

Data Volume Estimates

Estimated for a 300-bed UAE hospital with high outpatient throughput.

Table Initial Rows (Year 1) Annual Growth Notes
eligibility_checks ~500,000 +20% per year Multiple checks per encounter; includes batch re-verification
eligibility_responses ~480,000 +20% per year Typically 1 response per successful check; some retries
prior_authorizations ~40,000 +15% per year High-cost imaging, procedures, therapies
prior_auth_requests ~80,000 +15% per year Average 2 submissions per authorization (initial + follow-up)
referrals ~60,000 +10% per year Internal + external specialist referrals
cost_estimates ~120,000 +15% per year Pre-service estimates and patient requests
financial_counseling_records ~25,000 +10% per year Self-pay, high OOP, charity cases
pre_registration_records ~300,000 +15% per year Most scheduled appointments

Indexes and partitioning (by year or by facility) should be considered for eligibility_checks, eligibility_responses, pre_registration_records, and cost_estimates in large multi-facility deployments.


Data Retention Policy

Retention must comply with UAE federal and emirate-level regulations (MOH, DOH, DHA) and UAE PDPL (Federal Decree-Law No. 45/2021). The following are recommended minimums; facility policy may extend retention.

Table Recommended Retention Rationale Disposal Notes
eligibility_checks 10 years from date of service / encounter Supports audit of financial clearance, payer disputes, and DOH/DHA inspections; aligned with typical medical record retention in UAE After retention, anonymise or delete raw_request, member_id, group_id while keeping minimal aggregated stats if needed
eligibility_responses 10 years from date of service / encounter Evidence of coverage and benefits at time of service; supports denial management After retention, delete or anonymise response_raw and any patient-identifiable benefit details
prior_authorizations 10 years from last related claim closure Required for payer audits, appeals, and medico-legal defense After retention, delete record or strip identifiers, keeping only de-identified metrics if needed
prior_auth_requests 10 years from last activity on prior_authorizations Detailed audit trail of interactions with payers After retention, delete full record; if needed, retain aggregated counts only
referrals 10 years from last referral-related encounter Clinical and financial relevance; supports referral completion KPIs After retention, delete or anonymise patient identifiers; keep de-identified counts for analytics
cost_estimates 7 years from estimate date or 3 years after final payment (whichever is later) Supports patient disputes about expected vs actual charges and PDPL transparency obligations After retention, delete or anonymise; retain only de-identified variance metrics
financial_counseling_records 7 years from last counseling session Supports financial hardship documentation and charity care audits After retention, delete narrative fields (patient_situation, notes) or fully delete records
pre_registration_records 3 years from appointment date Operational and audit value is short- to medium-term; PDPL encourages data minimisation After retention, delete entire record; pre-reg data that became part of the legal medical record remains in EHR modules

All deletions/anonymisations must be logged in accordance with UAE PDPL accountability requirements and internal information governance policies.

content/rcm/patient-access/03-data-specifications.md Generated 2026-02-20 22:54