-- DentalCare v0.8.0.4
-- Adaptive teeth-first encounters and production-gate completion guidance.

ALTER TABLE `{{prefix}}clinical_encounters`
  ADD COLUMN `care_path` VARCHAR(40) NOT NULL DEFAULT 'comprehensive' AFTER `visit_type`,
  ADD COLUMN `vitals_skip_reason` VARCHAR(500) NULL AFTER `history_present_condition`,
  ADD COLUMN `care_path_decided_by` BIGINT UNSIGNED NULL AFTER `vitals_skip_reason`,
  ADD COLUMN `care_path_decided_at` DATETIME NULL AFTER `care_path_decided_by`,
  ADD KEY `idx_encounter_care_path` (`care_path`,`status`,`created_at`);
