CREATE function func_create_log_patient_consent() returns trigger
    LANGUAGE plpgsql AS
$$
BEGIN
    INSERT INTO log_patient_consent
    VALUES (OLD.patient_consent, OLD.physical_consent_url,OLD.current);
    RETURN NEW;
END
$$;

ALTER function func_create_log_patient_consent() owner TO postgres;
