-- Tables

-- Alters

ALTER TABLE AKUZ.T_CONSILIUM_DECISION ADD "complaints" varchar(4096) NULL;

ALTER TABLE AKUZ.T_CONSILIUM_DECISION ADD "anamnesis" varchar(4096) NULL;

ALTER TABLE AKUZ.T_CONSILIUM_DECISION ADD "objectivestatus" varchar(4096) NULL;

ALTER TABLE AKUZ.T_CONSILIUM_DECISION ADD "treatment" varchar(4096) NULL;

UPDATE AKUZ.T_CONSILIUM_DECISION AS decision
SET 
  Treatment = consilium.Treatment,
  ObjectiveStatus = consilium.ObjectiveStatus,
  Complaints = consilium.Complaints,
  Anamnesis = consilium.Anamnesis
FROM AKUZ.T_CONSILIUM AS consilium
WHERE decision.Consilium = consilium.MedicalRecordID;

ALTER TABLE AKUZ.T_CONSILIUM DROP COLUMN "complaints";

ALTER TABLE AKUZ.T_CONSILIUM DROP COLUMN "anamnesis";

ALTER TABLE AKUZ.T_CONSILIUM DROP COLUMN "objectivestatus";

ALTER TABLE AKUZ.T_CONSILIUM DROP COLUMN "treatment";
