-- ALTER statements for tbl_ipd table
-- Add missing fields for IPD case paper form

ALTER TABLE `tbl_ipd` 
ADD COLUMN `UhidNo` varchar(100) DEFAULT NULL AFTER `MrdNo`,
ADD COLUMN `Address` text DEFAULT NULL AFTER `Mobile`,
ADD COLUMN `WtOnAdm` varchar(20) DEFAULT NULL AFTER `Weight`,
ADD COLUMN `HtOnAdm` varchar(20) DEFAULT NULL AFTER `Height`,
ADD COLUMN `TempOnAdm` varchar(20) DEFAULT NULL AFTER `Temp`,
ADD COLUMN `RelativeOccupation` varchar(255) DEFAULT NULL AFTER `RelativePhone2`;

-- Note: The following fields have different names in form vs table:
-- Form Field -> Table Field
-- PatientType -> Type (already exists)
-- AadharNo -> AadharCardNo (already exists)
-- Ward -> WardId (already exists, but you may need to store ward name separately if needed)
-- ProvisionalDiagnosis -> ProDiagnosis (already exists)
-- ReferredBy -> ReferedBy (already exists)
-- Indication -> AdmissionIndication (already exists)
-- Mobile1 -> Mobile (already exists)
-- Mobile2 -> RelativePhone2 (already exists)
