--
--


-- Started on 2025-08-28 14:26:57

SELECT pg_catalog.set_config('search_path', '', false);

--
-- TOC entry 5 (class 2615 OID 2200)
-- Name: public; Type: SCHEMA; Schema: -; Owner: pg_database_owner
--

CREATE SCHEMA public;


ALTER SCHEMA public OWNER TO pg_database_owner;

--
-- TOC entry 5745 (class 0 OID 0)
-- Dependencies: 5
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: pg_database_owner
--

COMMENT ON SCHEMA public IS 'standard public schema';


--
-- TOC entry 410 (class 1255 OID 25106)
-- Name: f_create_login_role_permission(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.f_create_login_role_permission() RETURNS character varying
    LANGUAGE plpgsql
    AS $$ 


  	  	    DECLARE 


  	  			v_admin_id integer; 


  	  	    BEGIN 






  	  		 v_admin_id := 0; 






  	         insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_INSTITUTION'::text as nameid, 'View institution settings' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 


  	         insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_STAFFROLE'::text as nameid, 'View staff role settings' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	         insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_LOGINROLE'::text as nameid, 'View login role settings' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	         insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_STAFFMEMBER'::text as nameid, 'View staff member settings' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	           (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_TAG'::text as nameid, 'View tag settings' as description ,true as def_value, true as value) as rp_data 


  	           where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	         insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_WARNING'::text as nameid, 'View warning settings' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	           (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_DASHBOARD'::text as nameid, 'View dashboard frame' as description ,true as def_value, true as value) as rp_data 


  	           where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	            (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_AUDIT'::text as nameid, 'View audit frame' as description ,true as def_value, true as value) as rp_data 


  	            where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value,working_view,working_view_exist) select login_role_id,ptype,nameid,description,def_value,value,false,true from 


  	            (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_PROCEDURE'::text as nameid, 'View procedure frame' as description ,true as def_value, true as value) as rp_data 


  	            where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	            (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_DEVICE'::text as nameid, 'View device frame' as description ,true as def_value, true as value,false,true) as rp_data 


  	            where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value,working_view,working_view_exist) select login_role_id,ptype,nameid,description,def_value,value,false,true from 


  	              (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_EXAMLIST'::text as nameid, 'View exam list frame' as description ,true as def_value, true as value) as rp_data 


  	              where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	              (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_STAFF'::text as nameid, 'View staff frame' as description ,true as def_value, true as value) as rp_data 


  	              where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	              (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_DOSIMETRY'::text as nameid, 'View dosimetry frame' as description ,true as def_value, true as value) as rp_data 


  	              where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	              (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_LEGALDOCUMENT'::text as nameid, 'View legal document frame' as description ,true as def_value, true as value) as rp_data 


  	              where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	              (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_SCHEDULEDTASK'::text as nameid, 'View scheduled task frame' as description ,true as def_value, true as value) as rp_data 


  	              where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 


  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	              (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_INCIDENTREPORTING'::text as nameid, 'View incident reporting frame' as description ,true as def_value, true as value) as rp_data 


  	              where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 






  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_INSTITUTIONDOCUMENT'::text as nameid, 'View institution document frame' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 




  	           insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_EXAMIDENT'::text as nameid, 'View the exam link frame' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 




  	          insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	          (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_EXAMLINK'::text as nameid, 'View the exam link frame' as description ,true as def_value, true as value) as rp_data 


  	          where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 




              insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


              (select v_admin_id as login_role_id,'VIEW' as ptype, 'VIEW_STATISTIC'::text as nameid, 'View the statistic frame' as description ,true as def_value, true as value) as rp_data 


              where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 




  	         -- insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	         --  (select v_admin_id as login_role_id,'ACTION' as ptype, 'ACTION_ADD_INSTITUTION'::text as nameid,'Can add an institution' as description ,true as def_value, true as value) as rp_data 


  	         --  where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 


  	         -- insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	         --  (select v_admin_id as login_role_id,'ACTION' as ptype, 'ACTION_MODIFY_INSTITUTION'::text as nameid,'Can modify an institution' as description ,true as def_value, true as value) as rp_data 


  	         --  where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 


  	         -- insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value) select login_role_id,ptype,nameid,description,def_value,value from 


  	         --  (select v_admin_id as login_role_id,'ACTION' as ptype, 'ACTION_DELETE_INSTITUTION'::text as nameid,'Can delete an institution' as description ,true as def_value, true as value) as rp_data 


  	         --  where not exists (select * from login_role_permission where v_admin_id = login_role_permission.login_role_id and login_role_permission.nameid = rp_data.nameid); 










  	  	    -- update other role if necessary 


  	  	    insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value,working_view,working_view_exist) 


  	          select roleid,alluserpermission.ptype,alluserpermission.nameid,alluserpermission.description,alluserpermission.def_value,alluserpermission.def_value,alluserpermission.working_view,alluserpermission.working_view_exist from (select login_role.id as roleid,ptype,nameid,description,def_value,value,working_view,working_view_exist from 


  	  	  (select login_role_permission.ptype,nameid,description,def_value,value,working_view,working_view_exist from login_role_permission,login_role where login_role_permission.login_role_id = login_role.id and login_role.id = v_admin_id) as adminpermission,login_role) as alluserpermission 


  	  	   left join login_role_permission on login_role_permission.login_role_id = roleid and  login_role_permission.nameid = alluserpermission.nameid 


  	  	   where id is null; 






  	    		return true; 


  	  	    END 


  	  	$$;


ALTER FUNCTION public.f_create_login_role_permission() OWNER TO postgres;

--
-- TOC entry 370 (class 1255 OID 25107)
-- Name: f_staffmember_equals_staff(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.f_staffmember_equals_staff() RETURNS trigger
    LANGUAGE plpgsql
    AS $$ 
	begin  
		new.staff_member_id := new.staff_id; 
	 
	return new; 
	end; 
$$;


ALTER FUNCTION public.f_staffmember_equals_staff() OWNER TO postgres;

--
-- TOC entry 415 (class 1255 OID 25108)
-- Name: f_tag_link(integer); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.f_tag_link(in_exam_id integer) RETURNS character varying
    LANGUAGE plpgsql
    AS $$
  	    DECLARE
  			v_list varchar;
  	    BEGIN

  		 v_list := null;
		select STRING_AGG (tag_link.tag_id::text,',') into v_list from tag_link where type = 'examlist' and ext_id = in_exam_id;
		RETURN v_list;

  	    END
  	$$;


ALTER FUNCTION public.f_tag_link(in_exam_id integer) OWNER TO postgres;

--
-- TOC entry 392 (class 1255 OID 25109)
-- Name: trg_init_login_role_permission(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.trg_init_login_role_permission() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
  DECLARE
  v_admin_id integer;
  BEGIN

    v_admin_id := 0;
    insert into login_role_permission(login_role_id,ptype,nameid,description,def_value,value,working_view,working_view_exist)
    select NEW.id,ptype,nameid,description,def_value,def_value,working_view,working_view_exist from login_role_permission where login_role_id = v_admin_id;

    RETURN NEW;
  END;
  $$;


ALTER FUNCTION public.trg_init_login_role_permission() OWNER TO postgres;

--
-- TOC entry 382 (class 1255 OID 25110)
-- Name: trg_init_tag_department(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.trg_init_tag_department() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
  DECLARE
  tag_id integer;
  site_id integer;
  site_name varchar;
  BEGIN
    select institution.id,institution.name into site_id, site_name from institution,department where institution.id = department.inst_id and department.id = NEW.id;

    insert into tag(type,name,removed) values('OR',site_name || ' ' || NEW.name,false) RETURNING id INTO tag_id;
    insert into tag_link(type,ext_id,tag_id) values('department',NEW.id,tag_id);
    RETURN NEW;
  END;
  $$;


ALTER FUNCTION public.trg_init_tag_department() OWNER TO postgres;

--
-- TOC entry 419 (class 1255 OID 25111)
-- Name: trg_init_tag_department_update(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.trg_init_tag_department_update() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
  DECLARE
  tag_id integer;
  site_name varchar;
  site_id integer;
  BEGIN
    select institution.id,institution.name into site_id, site_name from institution,department where institution.id = department.inst_id and department.id = NEW.id;
    update tag set removed = NEW.removed, name = site_name || ' ' || NEW.name from tag_link where tag_link.type = 'department' and tag_link.ext_id = NEW.id and tag_link.tag_id = tag.id;
    RETURN NEW;
  END;
  $$;


ALTER FUNCTION public.trg_init_tag_department_update() OWNER TO postgres;

--
-- TOC entry 407 (class 1255 OID 25112)
-- Name: trg_init_tag_institution(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.trg_init_tag_institution() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
  DECLARE
  tag_id integer;
  BEGIN
    insert into tag(type,name,removed) values('OR',NEW.name,false) RETURNING id INTO tag_id;
    insert into tag_link(type,ext_id,tag_id) values('institution',NEW.id,tag_id);
    RETURN NEW;
  END;
  $$;


ALTER FUNCTION public.trg_init_tag_institution() OWNER TO postgres;

--
-- TOC entry 406 (class 1255 OID 25113)
-- Name: trg_init_tag_institution_update(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.trg_init_tag_institution_update() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
  DECLARE
  tag_id integer;
  BEGIN
    update tag set removed = NEW.removed, name = NEW.name from tag_link where tag_link.type = 'institution' and tag_link.ext_id = NEW.id and tag_link.tag_id = tag.id;
    RETURN NEW;
  END;
  $$;


ALTER FUNCTION public.trg_init_tag_institution_update() OWNER TO postgres;



--
-- TOC entry 216 (class 1259 OID 25114)
-- Name: action; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action (
    id integer NOT NULL,
    description character varying,
    status_id integer,
    origine character varying,
    deadline timestamp with time zone,
    enddate timestamp with time zone,
    begdate timestamp with time zone NOT NULL,
    personincharge integer,
    removed boolean DEFAULT false,
    dep_id integer DEFAULT '-1'::integer
);


ALTER TABLE public.action OWNER TO postgres;

--
-- TOC entry 217 (class 1259 OID 25121)
-- Name: action_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.action_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.action_id_seq OWNER TO postgres;

--
-- TOC entry 5746 (class 0 OID 0)
-- Dependencies: 217
-- Name: action_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.action_id_seq OWNED BY public.action.id;


--
-- TOC entry 218 (class 1259 OID 25122)
-- Name: action_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_link (
    id integer NOT NULL,
    action_id integer NOT NULL,
    ext_id integer NOT NULL,
    scope character varying NOT NULL
);


ALTER TABLE public.action_link OWNER TO postgres;

--
-- TOC entry 219 (class 1259 OID 25127)
-- Name: action_link_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.action_link_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.action_link_id_seq OWNER TO postgres;

--
-- TOC entry 5747 (class 0 OID 0)
-- Dependencies: 219
-- Name: action_link_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.action_link_id_seq OWNED BY public.action_link.id;


--
-- TOC entry 346 (class 1259 OID 26170)
-- Name: action_status_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.action_status_link (
    staff_member_id integer NOT NULL,
    document_id integer NOT NULL,
    last_opened timestamp without time zone,
    action_at timestamp without time zone,
    action_id integer,
    date timestamp without time zone,
    last_reminder timestamp without time zone
);


ALTER TABLE public.action_status_link OWNER TO postgres;

--
-- TOC entry 220 (class 1259 OID 25128)
-- Name: afcnsend; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.afcnsend (
    id integer NOT NULL,
    inst_id integer,
    dep_id integer,
    device_id integer,
    title character varying,
    senddate timestamp with time zone NOT NULL,
    sender integer,
    comment character varying,
    removed boolean DEFAULT false,
    status_id integer
);


ALTER TABLE public.afcnsend OWNER TO postgres;

--
-- TOC entry 221 (class 1259 OID 25134)
-- Name: afcnsend_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.afcnsend_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.afcnsend_id_seq OWNER TO postgres;

--
-- TOC entry 5748 (class 0 OID 0)
-- Dependencies: 221
-- Name: afcnsend_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.afcnsend_id_seq OWNED BY public.afcnsend.id;


--
-- TOC entry 222 (class 1259 OID 25135)
-- Name: agelist; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.agelist (
    id integer NOT NULL,
    label character varying NOT NULL
);


ALTER TABLE public.agelist OWNER TO postgres;

--
-- TOC entry 223 (class 1259 OID 25140)
-- Name: agelist_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.agelist_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.agelist_id_seq OWNER TO postgres;

--
-- TOC entry 5749 (class 0 OID 0)
-- Dependencies: 223
-- Name: agelist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.agelist_id_seq OWNED BY public.agelist.id;


--
-- TOC entry 224 (class 1259 OID 25141)
-- Name: audit; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.audit (
    id integer NOT NULL,
    inst_id integer DEFAULT '-1'::integer,
    dep_id integer DEFAULT '-1'::integer,
    date timestamp with time zone,
    origine integer,
    title character varying,
    comment character varying,
    status_id integer,
    personincharge integer,
    removed boolean DEFAULT false,
    type integer DEFAULT 2 NOT NULL,
    start_date timestamp(0) with time zone,
    end_date timestamp(0) with time zone
);


ALTER TABLE public.audit OWNER TO postgres;

--
-- TOC entry 225 (class 1259 OID 25150)
-- Name: audit_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.audit_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_id_seq OWNER TO postgres;

--
-- TOC entry 5750 (class 0 OID 0)
-- Dependencies: 225
-- Name: audit_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.audit_id_seq OWNED BY public.audit.id;


--
-- TOC entry 226 (class 1259 OID 25151)
-- Name: audit_record; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.audit_record (
    id integer NOT NULL,
    audit_id integer NOT NULL,
    quaad_point_id integer NOT NULL,
    validated boolean DEFAULT false NOT NULL
);


ALTER TABLE public.audit_record OWNER TO postgres;

--
-- TOC entry 227 (class 1259 OID 25155)
-- Name: audit_record_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.audit_record_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_record_id_seq OWNER TO postgres;

--
-- TOC entry 5751 (class 0 OID 0)
-- Dependencies: 227
-- Name: audit_record_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.audit_record_id_seq OWNED BY public.audit_record.id;


--
-- TOC entry 228 (class 1259 OID 25156)
-- Name: audit_recordprocedure; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.audit_recordprocedure (
    id integer NOT NULL,
    audit_record_id integer NOT NULL,
    procedure_id integer NOT NULL,
    doc_id integer NOT NULL,
    remark text,
    status boolean DEFAULT false NOT NULL,
    forcedstatus boolean
);


ALTER TABLE public.audit_recordprocedure OWNER TO postgres;

--
-- TOC entry 229 (class 1259 OID 25162)
-- Name: audit_recordprocedure_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.audit_recordprocedure_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_recordprocedure_id_seq OWNER TO postgres;

--
-- TOC entry 5752 (class 0 OID 0)
-- Dependencies: 229
-- Name: audit_recordprocedure_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.audit_recordprocedure_id_seq OWNED BY public.audit_recordprocedure.id;


--
-- TOC entry 230 (class 1259 OID 25163)
-- Name: audit_subrecord; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.audit_subrecord (
    id integer NOT NULL,
    audit_record_id integer NOT NULL,
    quaadpoint_tag_id integer NOT NULL,
    scope_id integer NOT NULL,
    scope2_id integer,
    force_doctext text,
    force_docid integer,
    remark text,
    status boolean DEFAULT false NOT NULL,
    forcedstatus boolean,
    doc_id integer NOT NULL,
    force_result character varying
);


ALTER TABLE public.audit_subrecord OWNER TO postgres;

--
-- TOC entry 231 (class 1259 OID 25169)
-- Name: audit_subrecord_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.audit_subrecord_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_subrecord_id_seq OWNER TO postgres;

--
-- TOC entry 5753 (class 0 OID 0)
-- Dependencies: 231
-- Name: audit_subrecord_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.audit_subrecord_id_seq OWNED BY public.audit_subrecord.id;


--
-- TOC entry 232 (class 1259 OID 25170)
-- Name: audit_type; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.audit_type (
    id integer NOT NULL,
    name character varying NOT NULL,
    removed character varying DEFAULT false NOT NULL,
    maintype character varying
);


ALTER TABLE public.audit_type OWNER TO postgres;

--
-- TOC entry 233 (class 1259 OID 25176)
-- Name: audit_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.audit_type_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_type_id_seq OWNER TO postgres;

--
-- TOC entry 5754 (class 0 OID 0)
-- Dependencies: 233
-- Name: audit_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.audit_type_id_seq OWNED BY public.audit_type.id;


--
-- TOC entry 349 (class 1259 OID 26769)
-- Name: civilitylist; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.civilitylist (
    id integer NOT NULL,
    name character varying NOT NULL
);


ALTER TABLE public.civilitylist OWNER TO postgres;

--
-- TOC entry 348 (class 1259 OID 26768)
-- Name: civilitylist_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.civilitylist_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.civilitylist_id_seq OWNER TO postgres;

--
-- TOC entry 5755 (class 0 OID 0)
-- Dependencies: 348
-- Name: civilitylist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.civilitylist_id_seq OWNED BY public.civilitylist.id;


--
-- TOC entry 345 (class 1259 OID 26153)
-- Name: default_action_needed; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.default_action_needed (
    document_type character varying,
    staff_role_id integer,
    department_id integer,
    id integer NOT NULL,
    action integer NOT NULL
);


ALTER TABLE public.default_action_needed OWNER TO postgres;

--
-- TOC entry 347 (class 1259 OID 26186)
-- Name: default_read_needed_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

ALTER TABLE public.default_action_needed ALTER COLUMN id ADD GENERATED ALWAYS AS IDENTITY (
    SEQUENCE NAME public.default_read_needed_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- TOC entry 234 (class 1259 OID 25177)
-- Name: department; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.department (
    id integer NOT NULL,
    name character varying NOT NULL,
    inst_id integer,
    removed boolean DEFAULT false
);


ALTER TABLE public.department OWNER TO postgres;

--
-- TOC entry 235 (class 1259 OID 25183)
-- Name: department_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.department_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.department_id_seq OWNER TO postgres;

--
-- TOC entry 5756 (class 0 OID 0)
-- Dependencies: 235
-- Name: department_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.department_id_seq OWNED BY public.department.id;


--
-- TOC entry 236 (class 1259 OID 25184)
-- Name: device; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.device (
    id integer NOT NULL,
    name character varying,
    brand character varying,
    model character varying,
    serialnumber character varying,
    removed boolean DEFAULT false,
    ris_name character varying,
    pacs_name character varying,
    dacs_name character varying,
    modalitytype character varying DEFAULT 'RX'::character varying NOT NULL,
    photo bytea
);


ALTER TABLE public.device OWNER TO postgres;

--
-- TOC entry 237 (class 1259 OID 25191)
-- Name: device_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.device_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.device_id_seq OWNER TO postgres;

--
-- TOC entry 5757 (class 0 OID 0)
-- Dependencies: 237
-- Name: device_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.device_id_seq OWNED BY public.device.id;


--
-- TOC entry 238 (class 1259 OID 25192)
-- Name: device_inspection; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.device_inspection (
    id integer NOT NULL,
    device_id integer NOT NULL,
    inspection_date timestamp with time zone,
    planned_date timestamp with time zone,
    result integer,
    comment character varying,
    type character varying,
    status_id integer,
    removed boolean DEFAULT false
);


ALTER TABLE public.device_inspection OWNER TO postgres;

--
-- TOC entry 239 (class 1259 OID 25198)
-- Name: device_inspection_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.device_inspection_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.device_inspection_id_seq OWNER TO postgres;

--
-- TOC entry 5758 (class 0 OID 0)
-- Dependencies: 239
-- Name: device_inspection_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.device_inspection_id_seq OWNED BY public.device_inspection.id;


--
-- TOC entry 240 (class 1259 OID 25199)
-- Name: device_installation; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.device_installation (
    id integer NOT NULL,
    device_id integer NOT NULL,
    dep_id integer NOT NULL,
    installdate timestamp with time zone NOT NULL,
    removeddate timestamp with time zone,
    removed boolean DEFAULT false,
    installedby character varying DEFAULT ''::character varying,
    inchargeof character varying DEFAULT ''::character varying,
    comment character varying DEFAULT ''::character varying
);


ALTER TABLE public.device_installation OWNER TO postgres;

--
-- TOC entry 241 (class 1259 OID 25208)
-- Name: device_installation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.device_installation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.device_installation_id_seq OWNER TO postgres;

--
-- TOC entry 5759 (class 0 OID 0)
-- Dependencies: 241
-- Name: device_installation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.device_installation_id_seq OWNED BY public.device_installation.id;


--
-- TOC entry 242 (class 1259 OID 25209)
-- Name: device_maintenance; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.device_maintenance (
    id integer NOT NULL,
    device_id integer NOT NULL,
    maintenance_date timestamp with time zone,
    planned_date timestamp with time zone,
    result integer,
    comment character varying,
    type character varying,
    status_id integer,
    removed boolean DEFAULT false
);


ALTER TABLE public.device_maintenance OWNER TO postgres;

--
-- TOC entry 243 (class 1259 OID 25215)
-- Name: device_maintenance_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.device_maintenance_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.device_maintenance_id_seq OWNER TO postgres;

--
-- TOC entry 5760 (class 0 OID 0)
-- Dependencies: 243
-- Name: device_maintenance_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.device_maintenance_id_seq OWNED BY public.device_maintenance.id;


--
-- TOC entry 244 (class 1259 OID 25216)
-- Name: document; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.document (
    id integer NOT NULL,
    file character varying,
    realfilename character varying,
    folder character varying NOT NULL,
    type character varying DEFAULT 'PDF'::character varying NOT NULL,
    creation_date timestamp with time zone DEFAULT now() NOT NULL,
    removed boolean DEFAULT false,
    revision integer DEFAULT 1 NOT NULL,
    label character varying DEFAULT ''::character varying,
    comment character varying DEFAULT ''::character varying,
    uploadedby integer NOT NULL,
    doc_master_id integer NOT NULL,
    sourcefile character varying,
    sourcerealfilename character varying,
    extern_link character varying,
    upload_date timestamp with time zone DEFAULT now() NOT NULL,
    valid_until_date timestamp with time zone DEFAULT to_timestamp('29991231235959'::text, 'YYYYMMDDHH24MISS'::text) NOT NULL,
    modification_date timestamp with time zone DEFAULT now()
);


ALTER TABLE public.document OWNER TO postgres;

--
-- TOC entry 245 (class 1259 OID 25229)
-- Name: document_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.document_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.document_id_seq OWNER TO postgres;

--
-- TOC entry 5761 (class 0 OID 0)
-- Dependencies: 245
-- Name: document_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.document_id_seq OWNED BY public.document.id;


--
-- TOC entry 246 (class 1259 OID 25230)
-- Name: document_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.document_link (
    id integer NOT NULL,
    type character varying NOT NULL,
    ext_id integer,
    doc_id integer
);


ALTER TABLE public.document_link OWNER TO postgres;

--
-- TOC entry 5762 (class 0 OID 0)
-- Dependencies: 246
-- Name: COLUMN document_link.type; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.document_link.type IS 'doit être le nom de la table à lier';


--
-- TOC entry 247 (class 1259 OID 25235)
-- Name: document_link_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.document_link_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.document_link_id_seq OWNER TO postgres;

--
-- TOC entry 5763 (class 0 OID 0)
-- Dependencies: 247
-- Name: document_link_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.document_link_id_seq OWNED BY public.document_link.id;


--
-- TOC entry 248 (class 1259 OID 25236)
-- Name: document_master; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.document_master (
    id integer NOT NULL,
    name character varying NOT NULL,
    removed boolean DEFAULT false
);


ALTER TABLE public.document_master OWNER TO postgres;

--
-- TOC entry 249 (class 1259 OID 25242)
-- Name: document_master_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.document_master_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.document_master_id_seq OWNER TO postgres;

--
-- TOC entry 5764 (class 0 OID 0)
-- Dependencies: 249
-- Name: document_master_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.document_master_id_seq OWNED BY public.document_master.id;


--
-- TOC entry 250 (class 1259 OID 25243)
-- Name: documentstatus; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.documentstatus (
    id integer NOT NULL,
    begdate timestamp with time zone NOT NULL,
    enddate timestamp with time zone DEFAULT '2999-12-31 00:00:00+01'::timestamp with time zone NOT NULL,
    doc_id integer NOT NULL,
    status_id integer NOT NULL
);


ALTER TABLE public.documentstatus OWNER TO postgres;

--
-- TOC entry 251 (class 1259 OID 25247)
-- Name: documentstatus_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.documentstatus_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.documentstatus_id_seq OWNER TO postgres;

--
-- TOC entry 5765 (class 0 OID 0)
-- Dependencies: 251
-- Name: documentstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.documentstatus_id_seq OWNED BY public.documentstatus.id;


--
-- TOC entry 351 (class 1259 OID 26820)
-- Name: documenttypelist; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.documenttypelist (
    id integer NOT NULL,
    name character varying NOT NULL
);


ALTER TABLE public.documenttypelist OWNER TO postgres;

--
-- TOC entry 350 (class 1259 OID 26819)
-- Name: documenttypelist_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.documenttypelist_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.documenttypelist_id_seq OWNER TO postgres;

--
-- TOC entry 5766 (class 0 OID 0)
-- Dependencies: 350
-- Name: documenttypelist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.documenttypelist_id_seq OWNED BY public.documenttypelist.id;


--
-- TOC entry 252 (class 1259 OID 25248)
-- Name: enum_listvalue; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.enum_listvalue (
    scope character varying,
    value integer,
    name character varying,
    lang character varying
);


ALTER TABLE public.enum_listvalue OWNER TO postgres;

--
-- TOC entry 253 (class 1259 OID 25253)
-- Name: examident; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.examident (
    id integer NOT NULL,
    name character varying NOT NULL,
    description character varying NOT NULL,
    removed boolean DEFAULT false
);


ALTER TABLE public.examident OWNER TO postgres;

--
-- TOC entry 254 (class 1259 OID 25259)
-- Name: examident_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.examident_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.examident_id_seq OWNER TO postgres;

--
-- TOC entry 5767 (class 0 OID 0)
-- Dependencies: 254
-- Name: examident_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.examident_id_seq OWNED BY public.examident.id;


--
-- TOC entry 255 (class 1259 OID 25260)
-- Name: examident_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.examident_link (
    exam_id integer,
    examident_id integer
);


ALTER TABLE public.examident_link OWNER TO postgres;

--
-- TOC entry 256 (class 1259 OID 25263)
-- Name: examlist; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.examlist (
    id integer NOT NULL,
    modality character varying,
    nameid character varying,
    description character varying,
    removed boolean DEFAULT false
);


ALTER TABLE public.examlist OWNER TO postgres;

--
-- TOC entry 257 (class 1259 OID 25269)
-- Name: examlist_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.examlist_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.examlist_id_seq OWNER TO postgres;

--
-- TOC entry 5768 (class 0 OID 0)
-- Dependencies: 257
-- Name: examlist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.examlist_id_seq OWNED BY public.examlist.id;


--
-- TOC entry 258 (class 1259 OID 25270)
-- Name: examwarning; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.examwarning (
    id integer NOT NULL,
    title character varying,
    description character varying,
    removed boolean DEFAULT false,
    sex_id integer,
    age_id integer
);


ALTER TABLE public.examwarning OWNER TO postgres;

--
-- TOC entry 259 (class 1259 OID 25276)
-- Name: examwarning_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.examwarning_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.examwarning_id_seq OWNER TO postgres;

--
-- TOC entry 5769 (class 0 OID 0)
-- Dependencies: 259
-- Name: examwarning_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.examwarning_id_seq OWNED BY public.examwarning.id;


--
-- TOC entry 260 (class 1259 OID 25277)
-- Name: examwarning_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.examwarning_link (
    exam_id integer,
    examwarning_id integer
);


ALTER TABLE public.examwarning_link OWNER TO postgres;

--
-- TOC entry 261 (class 1259 OID 25280)
-- Name: external_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.external_link (
    id integer NOT NULL,
    table_name character varying NOT NULL,
    table_id bigint NOT NULL,
    ext_id character varying NOT NULL,
    ext_src integer NOT NULL
);


ALTER TABLE public.external_link OWNER TO postgres;

--
-- TOC entry 262 (class 1259 OID 25285)
-- Name: external_link_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.external_link_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.external_link_id_seq OWNER TO postgres;

--
-- TOC entry 5770 (class 0 OID 0)
-- Dependencies: 262
-- Name: external_link_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.external_link_id_seq OWNED BY public.external_link.id;


--
-- TOC entry 263 (class 1259 OID 25286)
-- Name: external_src; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.external_src (
    id integer NOT NULL,
    src_name character varying NOT NULL
);


ALTER TABLE public.external_src OWNER TO postgres;

--
-- TOC entry 264 (class 1259 OID 25291)
-- Name: external_src_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.external_src_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.external_src_id_seq OWNER TO postgres;

--
-- TOC entry 5771 (class 0 OID 0)
-- Dependencies: 264
-- Name: external_src_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.external_src_id_seq OWNED BY public.external_src.id;


--
-- TOC entry 265 (class 1259 OID 25292)
-- Name: institution; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.institution (
    id integer NOT NULL,
    name character varying NOT NULL,
    removed boolean DEFAULT false
);


ALTER TABLE public.institution OWNER TO postgres;

--
-- TOC entry 266 (class 1259 OID 25298)
-- Name: institution_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.institution_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.institution_id_seq OWNER TO postgres;

--
-- TOC entry 5772 (class 0 OID 0)
-- Dependencies: 266
-- Name: institution_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.institution_id_seq OWNED BY public.institution.id;


--
-- TOC entry 267 (class 1259 OID 25299)
-- Name: legaldocument; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.legaldocument (
    id integer NOT NULL,
    name character varying,
    type character varying,
    comment character varying,
    removed boolean DEFAULT false
);


ALTER TABLE public.legaldocument OWNER TO postgres;

--
-- TOC entry 268 (class 1259 OID 25305)
-- Name: legaldocument_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.legaldocument_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.legaldocument_id_seq OWNER TO postgres;

--
-- TOC entry 5773 (class 0 OID 0)
-- Dependencies: 268
-- Name: legaldocument_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.legaldocument_id_seq OWNED BY public.legaldocument.id;


--
-- TOC entry 269 (class 1259 OID 25306)
-- Name: link_quaad_tag; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.link_quaad_tag (
    id_quaadpoint integer NOT NULL,
    id_tag integer NOT NULL
);


ALTER TABLE public.link_quaad_tag OWNER TO postgres;

--
-- TOC entry 270 (class 1259 OID 25309)
-- Name: link_scope_view; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.link_scope_view (
    scope character varying NOT NULL,
    view character varying
);


ALTER TABLE public.link_scope_view OWNER TO postgres;

--
-- TOC entry 271 (class 1259 OID 25314)
-- Name: login_role; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.login_role (
    id integer NOT NULL,
    name character varying,
    removed boolean DEFAULT false
);


ALTER TABLE public.login_role OWNER TO postgres;

--
-- TOC entry 272 (class 1259 OID 25320)
-- Name: login_role_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.login_role_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.login_role_id_seq OWNER TO postgres;

--
-- TOC entry 5774 (class 0 OID 0)
-- Dependencies: 272
-- Name: login_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.login_role_id_seq OWNED BY public.login_role.id;


--
-- TOC entry 273 (class 1259 OID 25321)
-- Name: login_role_permission; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.login_role_permission (
    id integer NOT NULL,
    ptype character varying DEFAULT ''::character varying,
    nameid character varying NOT NULL,
    description character varying DEFAULT ''::character varying,
    def_value boolean DEFAULT false,
    value boolean DEFAULT false,
    working_view boolean DEFAULT false,
    working_view_exist boolean DEFAULT false,
    login_role_id integer NOT NULL
);


ALTER TABLE public.login_role_permission OWNER TO postgres;

--
-- TOC entry 274 (class 1259 OID 25332)
-- Name: login_role_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.login_role_permission_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.login_role_permission_id_seq OWNER TO postgres;

--
-- TOC entry 5775 (class 0 OID 0)
-- Dependencies: 274
-- Name: login_role_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.login_role_permission_id_seq OWNED BY public.login_role_permission.id;


--
-- TOC entry 275 (class 1259 OID 25333)
-- Name: procedure; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.procedure (
    id integer NOT NULL,
    name_en character varying,
    name_fr character varying,
    name_nl character varying,
    comment character varying,
    removed boolean DEFAULT false,
    type integer
);


ALTER TABLE public.procedure OWNER TO postgres;

--
-- TOC entry 276 (class 1259 OID 25339)
-- Name: procedure_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.procedure_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.procedure_id_seq OWNER TO postgres;

--
-- TOC entry 5776 (class 0 OID 0)
-- Dependencies: 276
-- Name: procedure_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.procedure_id_seq OWNED BY public.procedure.id;


--
-- TOC entry 277 (class 1259 OID 25340)
-- Name: quaad_description; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.quaad_description (
    id integer NOT NULL,
    id_quaadpoint integer NOT NULL,
    language character varying NOT NULL,
    description character varying,
    description_summary character varying
);


ALTER TABLE public.quaad_description OWNER TO postgres;

--
-- TOC entry 278 (class 1259 OID 25345)
-- Name: quaad_description_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.quaad_description_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.quaad_description_id_seq OWNER TO postgres;

--
-- TOC entry 5777 (class 0 OID 0)
-- Dependencies: 278
-- Name: quaad_description_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.quaad_description_id_seq OWNED BY public.quaad_description.id;


--
-- TOC entry 279 (class 1259 OID 25346)
-- Name: quaad_nameinscope; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.quaad_nameinscope (
    scope_name character varying NOT NULL,
    name character varying NOT NULL
);


ALTER TABLE public.quaad_nameinscope OWNER TO postgres;

--
-- TOC entry 280 (class 1259 OID 25351)
-- Name: quaad_point; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.quaad_point (
    id integer NOT NULL,
    level1 integer DEFAULT '-1'::integer NOT NULL,
    level2 integer DEFAULT '-1'::integer NOT NULL,
    level3 integer DEFAULT '-1'::integer NOT NULL,
    level4 integer DEFAULT '-1'::integer NOT NULL,
    level5 integer DEFAULT '-1'::integer NOT NULL,
    inlevelorder integer DEFAULT 1 NOT NULL,
    istitle boolean DEFAULT false,
    datebeg date,
    dateend date,
    quaadversion integer
);


ALTER TABLE public.quaad_point OWNER TO postgres;

--
-- TOC entry 281 (class 1259 OID 25361)
-- Name: quaad_point_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.quaad_point_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.quaad_point_id_seq OWNER TO postgres;

--
-- TOC entry 5778 (class 0 OID 0)
-- Dependencies: 281
-- Name: quaad_point_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.quaad_point_id_seq OWNED BY public.quaad_point.id;


--
-- TOC entry 282 (class 1259 OID 25362)
-- Name: quaadpoint_tag; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.quaadpoint_tag (
    id integer NOT NULL,
    procedure_needed character varying,
    documents_needed integer DEFAULT 0 NOT NULL,
    scope character varying NOT NULL,
    additional_param character varying,
    period integer DEFAULT '-1'::integer NOT NULL,
    scope2 character varying,
    where_notagid character varying DEFAULT false NOT NULL,
    isglobalscope boolean DEFAULT false NOT NULL,
    document_scope character varying DEFAULT 'institution'::character varying NOT NULL
);


ALTER TABLE public.quaadpoint_tag OWNER TO postgres;

--
-- TOC entry 283 (class 1259 OID 25372)
-- Name: quaadpoint_tag_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.quaadpoint_tag_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.quaadpoint_tag_id_seq OWNER TO postgres;

--
-- TOC entry 5779 (class 0 OID 0)
-- Dependencies: 283
-- Name: quaadpoint_tag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.quaadpoint_tag_id_seq OWNED BY public.quaadpoint_tag.id;


--
-- TOC entry 284 (class 1259 OID 25373)
-- Name: quaadpoint_tag_name; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.quaadpoint_tag_name (
    id integer NOT NULL,
    name character varying NOT NULL,
    language character varying DEFAULT 'FR'::character varying NOT NULL,
    id_quaadpoint_tag integer NOT NULL
);


ALTER TABLE public.quaadpoint_tag_name OWNER TO postgres;

--
-- TOC entry 285 (class 1259 OID 25379)
-- Name: quaadpoint_tag_name_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.quaadpoint_tag_name_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.quaadpoint_tag_name_id_seq OWNER TO postgres;

--
-- TOC entry 5780 (class 0 OID 0)
-- Dependencies: 285
-- Name: quaadpoint_tag_name_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.quaadpoint_tag_name_id_seq OWNED BY public.quaadpoint_tag_name.id;


--
-- TOC entry 286 (class 1259 OID 25380)
-- Name: quaadtag_doc_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.quaadtag_doc_link (
    id_quaadtag integer NOT NULL,
    id_doclink integer NOT NULL
);


ALTER TABLE public.quaadtag_doc_link OWNER TO postgres;

--
-- TOC entry 287 (class 1259 OID 25383)
-- Name: report; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.report (
    id integer NOT NULL,
    severity integer DEFAULT 0,
    title character varying,
    reportdate timestamp with time zone NOT NULL,
    closeddate timestamp with time zone,
    reporter integer,
    comment character varying DEFAULT ''::character varying,
    statuscomment character varying DEFAULT ''::character varying,
    status_id integer,
    dep_id integer,
    removed boolean DEFAULT false
);


ALTER TABLE public.report OWNER TO postgres;

--
-- TOC entry 288 (class 1259 OID 25392)
-- Name: report_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.report_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.report_id_seq OWNER TO postgres;

--
-- TOC entry 5781 (class 0 OID 0)
-- Dependencies: 288
-- Name: report_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.report_id_seq OWNED BY public.report.id;


--
-- TOC entry 289 (class 1259 OID 25393)
-- Name: sequpdate_state; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.sequpdate_state (
    updateid character varying NOT NULL,
    uid double precision
);


ALTER TABLE public.sequpdate_state OWNER TO postgres;

--
-- TOC entry 290 (class 1259 OID 25398)
-- Name: sexlist; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.sexlist (
    id integer NOT NULL,
    label character varying NOT NULL
);


ALTER TABLE public.sexlist OWNER TO postgres;

--
-- TOC entry 291 (class 1259 OID 25403)
-- Name: sexlist_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.sexlist_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.sexlist_id_seq OWNER TO postgres;

--
-- TOC entry 5782 (class 0 OID 0)
-- Dependencies: 291
-- Name: sexlist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.sexlist_id_seq OWNED BY public.sexlist.id;


--
-- TOC entry 292 (class 1259 OID 25404)
-- Name: staff_formation; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.staff_formation (
    id integer NOT NULL,
    staff_id integer NOT NULL,
    formation_date timestamp with time zone,
    planned_date timestamp with time zone,
    title character varying,
    comment character varying,
    type character varying,
    status_id integer,
    removed boolean DEFAULT false,
    staff_member_id integer
);


ALTER TABLE public.staff_formation OWNER TO postgres;

--
-- TOC entry 293 (class 1259 OID 25410)
-- Name: staff_formation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.staff_formation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.staff_formation_id_seq OWNER TO postgres;

--
-- TOC entry 5783 (class 0 OID 0)
-- Dependencies: 293
-- Name: staff_formation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.staff_formation_id_seq OWNED BY public.staff_formation.id;


--
-- TOC entry 294 (class 1259 OID 25411)
-- Name: staff_job; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.staff_job (
    id integer NOT NULL,
    dep_id integer NOT NULL,
    staff_id integer NOT NULL,
    begdate timestamp with time zone NOT NULL,
    enddate timestamp with time zone DEFAULT '2999-12-31 00:00:00+01'::timestamp with time zone NOT NULL,
    staff_role_id integer NOT NULL,
    active boolean DEFAULT false,
    removed boolean DEFAULT false
);


ALTER TABLE public.staff_job OWNER TO postgres;

--
-- TOC entry 295 (class 1259 OID 25417)
-- Name: staff_job_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.staff_job_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.staff_job_id_seq OWNER TO postgres;

--
-- TOC entry 5784 (class 0 OID 0)
-- Dependencies: 295
-- Name: staff_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.staff_job_id_seq OWNED BY public.staff_job.id;


--
-- TOC entry 296 (class 1259 OID 25418)
-- Name: staff_member; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.staff_member (
    id integer NOT NULL,
    lastname character varying,
    firstname character varying,
    removed boolean DEFAULT false,
    login character varying NOT NULL,
    password character varying NOT NULL,
    login_role_id integer,
    active boolean DEFAULT false,
    ris_name character varying,
    pacs_name character varying,
    dacs_name character varying,
    photo bytea,
    email character varying,
    civility_id integer
);


ALTER TABLE public.staff_member OWNER TO postgres;

--
-- TOC entry 297 (class 1259 OID 25425)
-- Name: staff_member_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.staff_member_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.staff_member_id_seq OWNER TO postgres;

--
-- TOC entry 5785 (class 0 OID 0)
-- Dependencies: 297
-- Name: staff_member_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.staff_member_id_seq OWNED BY public.staff_member.id;


--
-- TOC entry 298 (class 1259 OID 25426)
-- Name: staff_role; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.staff_role (
    id integer NOT NULL,
    name character varying,
    removed boolean DEFAULT false,
    scope_id integer DEFAULT 1
);


ALTER TABLE public.staff_role OWNER TO postgres;

--
-- TOC entry 5786 (class 0 OID 0)
-- Dependencies: 298
-- Name: TABLE staff_role; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.staff_role IS 'Scope ID : {0 = institution}, {1 = departement}';


--
-- TOC entry 299 (class 1259 OID 25433)
-- Name: staff_role_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.staff_role_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.staff_role_id_seq OWNER TO postgres;

--
-- TOC entry 5787 (class 0 OID 0)
-- Dependencies: 299
-- Name: staff_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.staff_role_id_seq OWNED BY public.staff_role.id;


--
-- TOC entry 300 (class 1259 OID 25434)
-- Name: statuslist; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.statuslist (
    id integer NOT NULL,
    status_name character varying NOT NULL,
    type character varying
);


ALTER TABLE public.statuslist OWNER TO postgres;

--
-- TOC entry 5788 (class 0 OID 0)
-- Dependencies: 300
-- Name: COLUMN statuslist.type; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.statuslist.type IS 'active status for table';


--
-- TOC entry 301 (class 1259 OID 25439)
-- Name: statuslist_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.statuslist_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.statuslist_id_seq OWNER TO postgres;

--
-- TOC entry 5789 (class 0 OID 0)
-- Dependencies: 301
-- Name: statuslist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.statuslist_id_seq OWNED BY public.statuslist.id;


--
-- TOC entry 302 (class 1259 OID 25440)
-- Name: survey; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.survey (
    id integer NOT NULL,
    title character varying NOT NULL,
    description character varying,
    type integer NOT NULL,
    status integer NOT NULL,
    begindate timestamp(0) with time zone,
    enddate timestamp(0) with time zone,
    comment character varying,
    conclusion character varying,
    removed boolean DEFAULT false
);


ALTER TABLE public.survey OWNER TO postgres;

--
-- TOC entry 303 (class 1259 OID 25446)
-- Name: survey_field; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.survey_field (
    id integer NOT NULL,
    content character varying,
    type integer NOT NULL,
    survey_id integer NOT NULL,
    "position" integer NOT NULL
);


ALTER TABLE public.survey_field OWNER TO postgres;

--
-- TOC entry 304 (class 1259 OID 25451)
-- Name: survey_field_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.survey_field_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.survey_field_id_seq OWNER TO postgres;

--
-- TOC entry 5790 (class 0 OID 0)
-- Dependencies: 304
-- Name: survey_field_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.survey_field_id_seq OWNED BY public.survey_field.id;


--
-- TOC entry 305 (class 1259 OID 25452)
-- Name: survey_field_type; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.survey_field_type (
    id integer NOT NULL,
    name character varying NOT NULL
);


ALTER TABLE public.survey_field_type OWNER TO postgres;

--
-- TOC entry 306 (class 1259 OID 25457)
-- Name: survey_field_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.survey_field_type_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.survey_field_type_id_seq OWNER TO postgres;

--
-- TOC entry 5791 (class 0 OID 0)
-- Dependencies: 306
-- Name: survey_field_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.survey_field_type_id_seq OWNED BY public.survey_field_type.id;


--
-- TOC entry 307 (class 1259 OID 25458)
-- Name: survey_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.survey_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.survey_id_seq OWNER TO postgres;

--
-- TOC entry 5792 (class 0 OID 0)
-- Dependencies: 307
-- Name: survey_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.survey_id_seq OWNED BY public.survey.id;


--
-- TOC entry 308 (class 1259 OID 25459)
-- Name: survey_resp; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.survey_resp (
    id integer NOT NULL,
    survey_id integer NOT NULL,
    rdate timestamp(0) with time zone
);


ALTER TABLE public.survey_resp OWNER TO postgres;

--
-- TOC entry 309 (class 1259 OID 25462)
-- Name: survey_resp_field; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.survey_resp_field (
    id integer NOT NULL,
    field_id integer NOT NULL,
    value integer NOT NULL,
    resp_id integer NOT NULL,
    value_text character varying
);


ALTER TABLE public.survey_resp_field OWNER TO postgres;

--
-- TOC entry 310 (class 1259 OID 25467)
-- Name: survey_resp_field_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.survey_resp_field_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.survey_resp_field_id_seq OWNER TO postgres;

--
-- TOC entry 5793 (class 0 OID 0)
-- Dependencies: 310
-- Name: survey_resp_field_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.survey_resp_field_id_seq OWNED BY public.survey_resp_field.id;


--
-- TOC entry 311 (class 1259 OID 25468)
-- Name: survey_resp_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.survey_resp_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.survey_resp_id_seq OWNER TO postgres;

--
-- TOC entry 5794 (class 0 OID 0)
-- Dependencies: 311
-- Name: survey_resp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.survey_resp_id_seq OWNED BY public.survey_resp.id;


--
-- TOC entry 312 (class 1259 OID 25469)
-- Name: survey_type; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.survey_type (
    id integer NOT NULL,
    name character varying NOT NULL
);


ALTER TABLE public.survey_type OWNER TO postgres;

--
-- TOC entry 313 (class 1259 OID 25474)
-- Name: survey_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.survey_type_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.survey_type_id_seq OWNER TO postgres;

--
-- TOC entry 5795 (class 0 OID 0)
-- Dependencies: 313
-- Name: survey_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.survey_type_id_seq OWNED BY public.survey_type.id;


--
-- TOC entry 314 (class 1259 OID 25475)
-- Name: tag; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tag (
    id integer NOT NULL,
    type character varying,
    name character varying NOT NULL,
    removed boolean DEFAULT false
);


ALTER TABLE public.tag OWNER TO postgres;

--
-- TOC entry 315 (class 1259 OID 25481)
-- Name: tag_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tag_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tag_id_seq OWNER TO postgres;

--
-- TOC entry 5796 (class 0 OID 0)
-- Dependencies: 315
-- Name: tag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tag_id_seq OWNED BY public.tag.id;


--
-- TOC entry 316 (class 1259 OID 25482)
-- Name: tag_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.tag_link (
    id integer NOT NULL,
    type character varying NOT NULL,
    ext_id integer,
    tag_id integer
);


ALTER TABLE public.tag_link OWNER TO postgres;

--
-- TOC entry 5797 (class 0 OID 0)
-- Dependencies: 316
-- Name: COLUMN tag_link.type; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.tag_link.type IS 'doit être le nom de la table à lier';


--
-- TOC entry 317 (class 1259 OID 25487)
-- Name: tag_link_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.tag_link_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.tag_link_id_seq OWNER TO postgres;

--
-- TOC entry 5798 (class 0 OID 0)
-- Dependencies: 317
-- Name: tag_link_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.tag_link_id_seq OWNED BY public.tag_link.id;


--
-- TOC entry 354 (class 1259 OID 29856)
-- Name: task; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.task (
    id integer NOT NULL,
    task_master_id integer NOT NULL,
    due_date timestamp with time zone NOT NULL,
    title character varying NOT NULL,
    description character varying,
    comment character varying,
    status_id integer DEFAULT 3,
    removed boolean DEFAULT false,
    closing_date timestamp with time zone
);


ALTER TABLE public.task OWNER TO postgres;

--
-- TOC entry 352 (class 1259 OID 29854)
-- Name: task_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.task_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.task_id_seq OWNER TO postgres;

--
-- TOC entry 5799 (class 0 OID 0)
-- Dependencies: 352
-- Name: task_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.task_id_seq OWNED BY public.task.id;


--
-- TOC entry 356 (class 1259 OID 29868)
-- Name: task_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.task_link (
    id integer NOT NULL,
    task_id integer NOT NULL,
    staff_member_id integer NOT NULL,
    status_id integer NOT NULL,
    comment character varying,
    status_date timestamp with time zone,
    last_reminder timestamp with time zone,
    last_reminder_staff_id integer
);


ALTER TABLE public.task_link OWNER TO postgres;

--
-- TOC entry 355 (class 1259 OID 29867)
-- Name: task_link_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.task_link_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.task_link_id_seq OWNER TO postgres;

--
-- TOC entry 5800 (class 0 OID 0)
-- Dependencies: 355
-- Name: task_link_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.task_link_id_seq OWNED BY public.task_link.id;


--
-- TOC entry 358 (class 1259 OID 29875)
-- Name: task_master; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.task_master (
    id integer NOT NULL,
    title character varying NOT NULL,
    description character varying,
    start_date timestamp with time zone NOT NULL,
    end_date timestamp with time zone DEFAULT '2099-12-31 00:00:00+01'::timestamp with time zone,
    recurrence integer DEFAULT 0 NOT NULL,
    day_of_week character varying DEFAULT '-1'::character varying NOT NULL,
    active boolean DEFAULT true NOT NULL,
    dep_id integer DEFAULT '-1'::integer NOT NULL,
    removed boolean DEFAULT false NOT NULL,
    closing_type integer DEFAULT 0
);


ALTER TABLE public.task_master OWNER TO postgres;

--
-- TOC entry 357 (class 1259 OID 29874)
-- Name: task_master_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.task_master_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.task_master_id_seq OWNER TO postgres;

--
-- TOC entry 5801 (class 0 OID 0)
-- Dependencies: 357
-- Name: task_master_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.task_master_id_seq OWNED BY public.task_master.id;


--
-- TOC entry 360 (class 1259 OID 29891)
-- Name: task_master_link; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.task_master_link (
    id integer NOT NULL,
    task_master_id integer NOT NULL,
    staff_member_id integer NOT NULL
);


ALTER TABLE public.task_master_link OWNER TO postgres;

--
-- TOC entry 359 (class 1259 OID 29890)
-- Name: task_master_link_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.task_master_link_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.task_master_link_id_seq OWNER TO postgres;

--
-- TOC entry 5802 (class 0 OID 0)
-- Dependencies: 359
-- Name: task_master_link_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.task_master_link_id_seq OWNED BY public.task_master_link.id;


--
-- TOC entry 353 (class 1259 OID 29855)
-- Name: task_task_master_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.task_task_master_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.task_task_master_id_seq OWNER TO postgres;

--
-- TOC entry 5803 (class 0 OID 0)
-- Dependencies: 353
-- Name: task_task_master_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.task_task_master_id_seq OWNED BY public.task.task_master_id;


--
-- TOC entry 318 (class 1259 OID 25488)
-- Name: v_alert; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert AS
 SELECT 'device_inspection'::character varying AS type,
    device.name,
        CASE
            WHEN ((now())::date >= (device_inspection.planned_date)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (device_inspection.planned_date)::date) THEN 2
            ELSE 1
        END AS level,
    device_inspection.planned_date,
    ''::character varying AS title
   FROM public.device_inspection,
    public.device
  WHERE ((device.id = device_inspection.device_id) AND (device_inspection.status_id = 3) AND (device_inspection.planned_date IS NOT NULL))
UNION ALL
 SELECT 'staff_formation'::character varying AS type,
    (((staff_member.lastname)::text || ' '::text) || (staff_member.firstname)::text) AS name,
        CASE
            WHEN ((now())::date >= (staff_formation.planned_date)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (staff_formation.planned_date)::date) THEN 2
            ELSE 1
        END AS level,
    staff_formation.planned_date,
    staff_formation.title
   FROM public.staff_formation,
    public.staff_member
  WHERE ((staff_member.id = staff_formation.staff_id) AND (staff_formation.status_id = 3) AND (staff_formation.planned_date IS NOT NULL))
UNION ALL
 SELECT 'action'::character varying AS type,
    action.description AS name,
        CASE
            WHEN ((now())::date >= (action.deadline)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (action.deadline)::date) THEN 2
            ELSE 1
        END AS level,
    action.deadline AS planned_date,
    action.origine AS title
   FROM public.action
  WHERE ((action.removed = false) AND (action.status_id = 3) AND (action.deadline IS NOT NULL));


ALTER VIEW public.v_alert OWNER TO postgres;

--
-- TOC entry 319 (class 1259 OID 25493)
-- Name: v_alert_action; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_action AS
 SELECT description,
        CASE
            WHEN ((now())::date >= (deadline)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (deadline)::date) THEN 2
            ELSE 1
        END AS level,
    deadline,
    origine AS title,
    dep_id
   FROM public.action
  WHERE ((removed = false) AND (status_id = 3) AND (deadline IS NOT NULL));


ALTER VIEW public.v_alert_action OWNER TO postgres;

--
-- TOC entry 320 (class 1259 OID 25497)
-- Name: v_alert_afcnsend; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_afcnsend AS
 SELECT afcnsend.id,
        CASE
            WHEN ((now())::date >= (afcnsend.senddate)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (afcnsend.senddate)::date) THEN 2
            ELSE 1
        END AS level,
    afcnsend.senddate,
    afcnsend.comment,
    department.name AS department,
    department.id AS dep_id
   FROM (public.afcnsend
     LEFT JOIN public.department ON ((afcnsend.dep_id = department.id)))
  WHERE ((afcnsend.removed = false) AND (afcnsend.status_id = 3) AND (afcnsend.senddate IS NOT NULL));


ALTER VIEW public.v_alert_afcnsend OWNER TO postgres;

--
-- TOC entry 321 (class 1259 OID 25502)
-- Name: v_alert_audit; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_audit AS
 SELECT id,
        CASE
            WHEN ((now())::date >= (date)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (date)::date) THEN 2
            ELSE 1
        END AS level,
    date,
    title,
    inst_id,
    dep_id
   FROM public.audit
  WHERE ((removed = false) AND (status_id = 3) AND (date IS NOT NULL));


ALTER VIEW public.v_alert_audit OWNER TO postgres;

--
-- TOC entry 322 (class 1259 OID 25506)
-- Name: v_alert_device_inspection; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_device_inspection AS
 SELECT device.id,
    device.name,
        CASE
            WHEN ((now())::date >= (device_inspection.planned_date)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (device_inspection.planned_date)::date) THEN 2
            ELSE 1
        END AS level,
    device_inspection.planned_date,
    ''::character varying AS title
   FROM public.device_inspection,
    public.device
  WHERE ((device.removed = false) AND (device_inspection.removed = false) AND (device.id = device_inspection.device_id) AND (device_inspection.status_id = 3) AND (device_inspection.planned_date IS NOT NULL));


ALTER VIEW public.v_alert_device_inspection OWNER TO postgres;

--
-- TOC entry 323 (class 1259 OID 25511)
-- Name: v_alert_device_maintenance; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_device_maintenance AS
 SELECT device.id,
    device.name,
        CASE
            WHEN ((now())::date >= (device_maintenance.planned_date)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (device_maintenance.planned_date)::date) THEN 2
            ELSE 1
        END AS level,
    device_maintenance.planned_date,
    ''::character varying AS title
   FROM public.device_maintenance,
    public.device
  WHERE ((device.removed = false) AND (device_maintenance.removed = false) AND (device.id = device_maintenance.device_id) AND (device_maintenance.status_id = 3) AND (device_maintenance.planned_date IS NOT NULL));


ALTER VIEW public.v_alert_device_maintenance OWNER TO postgres;

--
-- TOC entry 324 (class 1259 OID 25516)
-- Name: v_alert_report; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_report AS
 SELECT title,
    COALESCE(severity, 1) AS severity,
    reportdate,
    dep_id
   FROM public.report
  WHERE ((status_id = 7) AND (removed = false))
  ORDER BY COALESCE(severity, 1) DESC NULLS LAST, reportdate;


ALTER VIEW public.v_alert_report OWNER TO postgres;

--
-- TOC entry 325 (class 1259 OID 25520)
-- Name: v_alert_staff_formation; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_staff_formation AS
 SELECT (((staff_member.lastname)::text || ' '::text) || (staff_member.firstname)::text) AS name,
        CASE
            WHEN ((now())::date >= (staff_formation.planned_date)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (staff_formation.planned_date)::date) THEN 2
            ELSE 1
        END AS level,
    staff_formation.planned_date,
    staff_formation.title,
    staff_member.id AS staff_id
   FROM public.staff_formation,
    public.staff_member
  WHERE ((staff_member.id = staff_formation.staff_id) AND (staff_formation.status_id = 3) AND (staff_formation.planned_date IS NOT NULL) AND (staff_formation.removed = false) AND (staff_member.removed = false));


ALTER VIEW public.v_alert_staff_formation OWNER TO postgres;

--
-- TOC entry 361 (class 1259 OID 29895)
-- Name: v_alert_task; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_alert_task AS
 WITH t1 AS (
         SELECT t.id,
            t.task_master_id,
            t.due_date,
            t.title,
            t.description,
            t.comment,
            t.status_id,
            t.removed,
            tl.id,
            tl.task_id,
            tl.staff_member_id,
            tl.status_id,
            tl.comment,
            tl.status_date,
            tl.last_reminder,
            tl.last_reminder_staff_id
           FROM public.task t,
            public.task_link tl
          WHERE ((t.id = tl.task_id) AND (tl.status_id <> 4))
        )
 SELECT task_id,
    description,
        CASE
            WHEN ((now())::date >= (due_date)::date) THEN 3
            WHEN ((((now())::date + '3 days'::interval))::date >= (due_date)::date) THEN 2
            ELSE 1
        END AS level,
    due_date,
    title,
    staff_member_id,
    task_master_id,
    last_reminder,
    last_reminder_staff_id
   FROM t1 t1(id, task_master_id, due_date, title, description, comment, status_id, removed, id_1, task_id, staff_member_id, status_id_1, comment_1, status_date, last_reminder, last_reminder_staff_id)
  WHERE (removed = false);


ALTER VIEW public.v_alert_task OWNER TO postgres;

--
-- TOC entry 326 (class 1259 OID 25525)
-- Name: v_bquaad_deviceinspection; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_bquaad_deviceinspection AS
 WITH t4 AS (
         WITH t3 AS (
                 WITH t2 AS (
                         WITH t AS (
                                 SELECT device_inspection.device_id,
                                    device_inspection.id,
CASE
 WHEN (device_inspection.result = 5) THEN 'OK'::text
 ELSE 'KO'::text
END AS result_okko,
                                    device_inspection.result AS inspection_result,
                                    device_inspection.inspection_date,
                                    device_inspection.planned_date,
                                    action.id AS act_id,
                                    action.status_id AS act_status,
                                    action.description AS action_desc,
                                    device_inspection.comment AS inspection_comment
                                   FROM ((public.device_inspection
                                     LEFT JOIN ( SELECT action_link_1.id,
    action_link_1.action_id,
    action_link_1.ext_id,
    action_link_1.scope
   FROM public.action_link action_link_1
  WHERE ((action_link_1.scope)::text = 'device_inspection'::text)) action_link ON ((action_link.ext_id = device_inspection.id)))
                                     LEFT JOIN public.action ON ((action_link.action_id = action.id)))
                                  WHERE ((device_inspection.removed = false) AND ((action.removed = false) OR (action.removed IS NULL)))
                                )
                         SELECT t.id,
                            t.result_okko,
                            t.inspection_result,
                            t.inspection_date,
                            t.planned_date,
                            t.act_id,
                            t.act_status,
                            t.action_desc AS inspection_comment,
                            doc_l.doc_id,
                            t.device_id
                           FROM (t
                             LEFT JOIN ( SELECT document_link.id,
                                    document_link.type,
                                    document_link.ext_id,
                                    document_link.doc_id
                                   FROM public.document_link
                                  WHERE ((document_link.type)::text = 'device_inspection'::text)) doc_l ON ((doc_l.ext_id = t.id)))
                        )
                 SELECT
                        CASE
                            WHEN (t2.result_okko = 'OK'::text) THEN 'OK'::text
                            ELSE
                            CASE
                                WHEN (t2.act_id IS NOT NULL) THEN 'OK'::text
                                ELSE 'KO'::text
                            END
                        END AS force_result,
                    t2.id,
                    t2.result_okko,
                    t2.inspection_result,
                    t2.inspection_date,
                    t2.planned_date,
                    t2.act_id,
                    t2.act_status,
                    t2.inspection_comment,
                    t2.doc_id,
                    t2.device_id
                   FROM t2
                )
         SELECT t3.id,
            t3.device_id,
                CASE
                    WHEN (t3.inspection_date IS NULL) THEN NULL::integer
                    ELSE t3.doc_id
                END AS doc_id,
            t3.force_result,
                CASE
                    WHEN (t3.force_result = 'KO'::text) THEN (('Le contrôle a été effectué le '::text || to_char(t3.inspection_date, 'DD/MM/YYYY'::text)) || ' avec un résultat négatif et aucune tâche n''a été planifiée'::text)
                    WHEN ((t3.result_okko = t3.force_result) AND (t3.result_okko = 'OK'::text)) THEN (('Le contrôle a été effectué le '::text || to_char(t3.inspection_date, 'DD/MM/YYYY'::text)) || ' et le résultat est positif'::text)
                    ELSE ((('Le contrôle a été effectué le '::text || to_char(t3.inspection_date, 'DD/MM/YYYY'::text)) || ' et le résultat est négatif<br><br> La tâche suivante a été planifiée dans le logiciel eoQUAL:<br>'::text) || (t3.inspection_comment)::text)
                END AS force_doctext,
            NULL::text AS force_docid,
            t3.inspection_date,
            t3.planned_date
           FROM t3
          WHERE (t3.inspection_date IS NOT NULL)
        )
 SELECT t4.id,
    t4.device_id,
    t4.doc_id,
    t4.force_result,
    t4.force_doctext,
    t4.force_docid,
    t4.inspection_date,
    t4.planned_date,
    device_installation.id AS v_device_plus_deviceinstallation_devid_id,
    COALESCE(t4.inspection_date, t4.planned_date) AS tocheck_date
   FROM t4,
    public.device_installation
  WHERE (t4.device_id = device_installation.id);


ALTER VIEW public.v_bquaad_deviceinspection OWNER TO postgres;

--
-- TOC entry 327 (class 1259 OID 25530)
-- Name: v_deptagidbyinsttagid; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_deptagidbyinsttagid AS
 SELECT i.tag_id AS insttagid,
    string_agg((d.tag_id)::text, ','::text) AS tagdepidforinsttagid
   FROM public.tag_link i,
    public.tag_link d,
    public.department
  WHERE (((i.type)::text = 'institution'::text) AND (department.id = d.ext_id) AND ((d.type)::text = 'department'::text) AND (department.inst_id = i.ext_id))
  GROUP BY i.tag_id;


ALTER VIEW public.v_deptagidbyinsttagid OWNER TO postgres;

--
-- TOC entry 328 (class 1259 OID 25534)
-- Name: v_device_actif_by_deptagid; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_device_actif_by_deptagid AS
 SELECT device_installation.dep_id,
    tag_link.tag_id,
    (((now())::date >= (device_installation.installdate)::date) AND (COALESCE((device_installation.removeddate)::date, (now())::date) >= (now())::date)) AS is_actif,
    department.name AS depname,
    device_installation.device_id,
    device_installation.installdate
   FROM public.device_installation,
    public.department,
    public.tag_link
  WHERE (((tag_link.type)::text = 'department'::text) AND (tag_link.ext_id = department.id) AND (device_installation.dep_id = department.id) AND (device_installation.removed = false));


ALTER VIEW public.v_device_actif_by_deptagid OWNER TO postgres;

--
-- TOC entry 329 (class 1259 OID 25539)
-- Name: v_device_historyinstallationdeptagidlist; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_device_historyinstallationdeptagidlist AS
 SELECT device_installation.device_id,
    ((('{'::text || string_agg(DISTINCT (tag_link.tag_id)::text, ','::text)) || '}'::text))::integer[] AS deptagidlist,
    ((('{'::text || string_agg(DISTINCT (tag_link.ext_id)::text, ','::text)) || '}'::text))::integer[] AS depidlist
   FROM public.device_installation,
    public.tag_link
  WHERE (((tag_link.type)::text = 'department'::text) AND (tag_link.ext_id = device_installation.dep_id) AND (device_installation.removed = false))
  GROUP BY device_installation.device_id;


ALTER VIEW public.v_device_historyinstallationdeptagidlist OWNER TO postgres;

--
-- TOC entry 330 (class 1259 OID 25544)
-- Name: v_device_plus_deviceinstallation_devid; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_device_plus_deviceinstallation_devid AS
 SELECT device.id,
    device.brand,
    device.dacs_name,
    device.modalitytype,
    device.model,
    device.name,
    device.pacs_name,
    device.removed,
    device.ris_name,
    device.serialnumber,
    device_installation.id AS install_id,
    device_installation.comment,
    device_installation.dep_id,
    device_installation.inchargeof,
    device_installation.installdate,
    device_installation.installedby,
    device_installation.removed AS inst_removed,
    device_installation.removeddate
   FROM public.device_installation,
    public.device
  WHERE (device.id = device_installation.device_id);


ALTER VIEW public.v_device_plus_deviceinstallation_devid OWNER TO postgres;

--
-- TOC entry 331 (class 1259 OID 25548)
-- Name: v_device_plus_deviceinstallation_instid; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_device_plus_deviceinstallation_instid AS
 SELECT device.id AS dev_id,
    device.brand,
    device.dacs_name,
    device.modalitytype,
    device.model,
    device.name,
    device.pacs_name,
    device.removed,
    device.ris_name,
    device.serialnumber,
    device_installation.id,
    device_installation.comment,
    device_installation.dep_id,
    device_installation.inchargeof,
    device_installation.installdate,
    device_installation.installedby,
    device_installation.removed AS inst_removed,
    device_installation.removeddate
   FROM public.device_installation,
    public.device
  WHERE (device.id = device_installation.device_id);


ALTER VIEW public.v_device_plus_deviceinstallation_instid OWNER TO postgres;

--
-- TOC entry 332 (class 1259 OID 25552)
-- Name: v_exam_risk_tag_doc; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_exam_risk_tag_doc AS
SELECT
    NULL::integer AS id,
    NULL::character varying AS modality,
    NULL::character varying AS name,
    NULL::character varying AS description,
    NULL::text AS risklist,
    NULL::character varying AS taglist,
    NULL::integer AS doc_id,
    NULL::integer AS doc_otherdoc_id;


ALTER VIEW public.v_exam_risk_tag_doc OWNER TO postgres;

--
-- TOC entry 333 (class 1259 OID 25556)
-- Name: v_fullinfo_department; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_fullinfo_department AS
 SELECT ((institution.name)::text || COALESCE((' '::text || (department.name)::text), ''::text)) AS fullname,
    institution.id AS inst_id,
    institution.name AS inst_name,
    department.id AS dep_id,
    department.name AS dep_name,
    (institution.removed OR COALESCE(department.removed, false)) AS instordepremoved
   FROM (public.institution
     LEFT JOIN public.department ON ((department.inst_id = institution.id)));


ALTER VIEW public.v_fullinfo_department OWNER TO postgres;

--
-- TOC entry 334 (class 1259 OID 25560)
-- Name: v_last_documentstatus; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_last_documentstatus AS
 SELECT DISTINCT ON (doc_id) id,
    begdate,
    enddate,
    doc_id,
    status_id
   FROM public.documentstatus
  ORDER BY doc_id, begdate DESC;


ALTER VIEW public.v_last_documentstatus OWNER TO postgres;

--
-- TOC entry 335 (class 1259 OID 25564)
-- Name: v_notremoveddocument; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_notremoveddocument AS
 SELECT document.id,
    document.file,
    document.realfilename,
    document.folder,
    document.type,
    document.creation_date,
    document.removed,
    document.revision,
    document.label,
    document.comment,
    document.uploadedby,
    document.doc_master_id,
    document.sourcefile,
    document.sourcerealfilename
   FROM public.document,
    public.document_master
  WHERE ((document.removed = false) AND (document_master.removed = false) AND (document.doc_master_id = document_master.id));


ALTER VIEW public.v_notremoveddocument OWNER TO postgres;

--
-- TOC entry 336 (class 1259 OID 25568)
-- Name: v_staff_member_depaccess; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_staff_member_depaccess AS
 SELECT DISTINCT dp.id AS dep_id,
    idbj.staff_id
   FROM public.department dp,
    ( SELECT DISTINCT
                CASE
                    WHEN (staff_role.scope_id = 0) THEN vfd.inst_id
                    ELSE NULL::integer
                END AS inst_id,
                CASE
                    WHEN (staff_role.scope_id = 0) THEN NULL::integer
                    ELSE vfd.dep_id
                END AS dep_id,
            staff_job.staff_id
           FROM public.staff_job,
            public.staff_role,
            public.v_fullinfo_department vfd
          WHERE ((staff_job.removed = false) AND (staff_role.removed = false) AND (staff_role.id = staff_job.staff_role_id) AND (staff_job.begdate <= now()) AND (now() <= staff_job.enddate) AND (staff_job.dep_id <> '-1'::integer) AND (vfd.dep_id = staff_job.dep_id))
        UNION
         SELECT NULL::integer AS int4,
            vfd.dep_id,
            staff_member.id
           FROM public.staff_member,
            public.v_fullinfo_department vfd
          WHERE ((staff_member.login_role_id = 0) AND (vfd.dep_id <> '-1'::integer))) idbj
  WHERE ((idbj.inst_id = dp.inst_id) OR (idbj.dep_id = dp.id));


ALTER VIEW public.v_staff_member_depaccess OWNER TO postgres;

--
-- TOC entry 337 (class 1259 OID 25573)
-- Name: v_staff_member_historyjobdeplist; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_staff_member_historyjobdeplist AS
 SELECT DISTINCT vfd.dep_id,
    staff_job.staff_id
   FROM public.staff_job,
    public.staff_role,
    public.v_fullinfo_department vfd
  WHERE ((staff_job.removed = false) AND (staff_role.removed = false) AND (staff_role.id = staff_job.staff_role_id) AND (staff_job.dep_id <> '-1'::integer) AND (vfd.dep_id = staff_job.dep_id));


ALTER VIEW public.v_staff_member_historyjobdeplist OWNER TO postgres;

--
-- TOC entry 338 (class 1259 OID 25577)
-- Name: v_staff_member_historyjobdeptagidlist; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_staff_member_historyjobdeptagidlist AS
 SELECT v_staff_member_historyjobdeplist.staff_id,
    ((('{'::text || string_agg((tag_link.tag_id)::text, ','::text)) || '}'::text))::integer[] AS deptagidlist,
    ((('{'::text || string_agg((tag_link.ext_id)::text, ','::text)) || '}'::text))::integer[] AS depidlist
   FROM public.v_staff_member_historyjobdeplist,
    public.tag_link
  WHERE (((tag_link.type)::text = 'department'::text) AND (tag_link.ext_id = v_staff_member_historyjobdeplist.dep_id))
  GROUP BY v_staff_member_historyjobdeplist.staff_id;


ALTER VIEW public.v_staff_member_historyjobdeptagidlist OWNER TO postgres;

--
-- TOC entry 339 (class 1259 OID 25581)
-- Name: v_staffmember_taglistdep_active_staffjob; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_staffmember_taglistdep_active_staffjob AS
 SELECT ((('{'::text || COALESCE(string_agg(DISTINCT (tag_link.tag_id)::text, ','::text), ''::text)) || '}'::text))::integer[] AS taglistdep_id,
    staff_job.staff_id
   FROM public.staff_job,
    public.department,
    public.tag_link
  WHERE ((staff_job.removed = false) AND (department.removed = false) AND (staff_job.begdate <= now()) AND (staff_job.enddate >= now()) AND (department.id = staff_job.dep_id) AND (tag_link.ext_id = department.id) AND ((tag_link.type)::text = 'department'::text))
  GROUP BY staff_job.staff_id;


ALTER VIEW public.v_staffmember_taglistdep_active_staffjob OWNER TO postgres;

--
-- TOC entry 340 (class 1259 OID 25586)
-- Name: v_survey; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_survey AS
 SELECT survey_field.survey_id,
    survey_field.id AS field_id,
    survey_field.type AS field_type,
    survey_field."position"
   FROM public.survey,
    public.survey_field
  WHERE (survey.id = survey_field.survey_id);


ALTER VIEW public.v_survey OWNER TO postgres;

--
-- TOC entry 341 (class 1259 OID 25590)
-- Name: v_taginfo; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_taginfo AS
 SELECT tt.id,
    tt.link_type,
    tt.ext_id,
    tt.tag_id,
    tt.type,
    tt.alltagidallow,
    tt.name,
    tt.removed,
    (((('{'::text || string_agg(v1.tagdepidforinsttagid, ','::text)) || '}'::text))::integer[] || ((('{'::text || string_agg((v2.insttagid)::text, ','::text)) || '}'::text))::integer[]) AS alltagidinducedallow
   FROM ((( SELECT tag_link.id,
            tag_link.type AS link_type,
            tag_link.ext_id,
            tag_link.tag_id,
            tag.type,
            ((('{'::text || string_agg((tag_link.tag_id)::text, ','::text) OVER (PARTITION BY tag_link.type, tag_link.ext_id)) || '}'::text))::integer[] AS alltagidallow,
            ((('{'::text || string_agg(
                CASE
                    WHEN ((tag.type)::text = 'OR'::text) THEN (tag_link.tag_id)::text
                    ELSE NULL::text
                END, ','::text) OVER (PARTITION BY tag_link.type, tag_link.ext_id)) || '}'::text))::integer[] AS tagtomapinstid,
            tag.name,
            tag.removed
           FROM public.tag_link,
            public.tag
          WHERE (tag.id = tag_link.tag_id)) tt
     LEFT JOIN public.v_deptagidbyinsttagid v1 ON ((v1.insttagid = ANY (tt.alltagidallow))))
     LEFT JOIN public.v_deptagidbyinsttagid v2 ON ((((('{'::text || v2.tagdepidforinsttagid) || '}'::text))::integer[] && tt.tagtomapinstid)))
  GROUP BY tt.id, tt.link_type, tt.ext_id, tt.tag_id, tt.type, tt.alltagidallow, tt.name, tt.removed;


ALTER VIEW public.v_taginfo OWNER TO postgres;

--
-- TOC entry 342 (class 1259 OID 25595)
-- Name: v_taglink_instdep; Type: VIEW; Schema: public; Owner: postgres
--

CREATE VIEW public.v_taglink_instdep AS
 SELECT v_fullinfo_department.inst_id,
    ti.tag_id AS taginstid,
    v_fullinfo_department.dep_id,
    td.tag_id AS tagdepid,
    v_fullinfo_department.instordepremoved
   FROM public.tag_link ti,
    public.tag_link td,
    public.v_fullinfo_department
  WHERE (((ti.type)::text = 'institution'::text) AND ((td.type)::text = 'department'::text) AND (ti.ext_id = v_fullinfo_department.inst_id) AND (td.ext_id = v_fullinfo_department.dep_id));


ALTER VIEW public.v_taglink_instdep OWNER TO postgres;

--
-- TOC entry 343 (class 1259 OID 25599)
-- Name: xusercfg; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.xusercfg (
    id integer NOT NULL,
    data character varying,
    cfgparameter_id integer NOT NULL
);


ALTER TABLE public.xusercfg OWNER TO postgres;

--
-- TOC entry 344 (class 1259 OID 25604)
-- Name: xusercfgparameter; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.xusercfgparameter (
    cfgparameter_id integer NOT NULL,
    vtype integer,
    type integer DEFAULT 1,
    vorder integer,
    variable character varying NOT NULL,
    label character varying NOT NULL,
    description character varying,
    vdefault character varying
);


ALTER TABLE public.xusercfgparameter OWNER TO postgres;

--
-- TOC entry 5137 (class 2604 OID 25610)
-- Name: action id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.action ALTER COLUMN id SET DEFAULT nextval('public.action_id_seq'::regclass);


--
-- TOC entry 5140 (class 2604 OID 25611)
-- Name: action_link id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.action_link ALTER COLUMN id SET DEFAULT nextval('public.action_link_id_seq'::regclass);


--
-- TOC entry 5141 (class 2604 OID 25612)
-- Name: afcnsend id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.afcnsend ALTER COLUMN id SET DEFAULT nextval('public.afcnsend_id_seq'::regclass);


--
-- TOC entry 5143 (class 2604 OID 25613)
-- Name: agelist id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.agelist ALTER COLUMN id SET DEFAULT nextval('public.agelist_id_seq'::regclass);


--
-- TOC entry 5144 (class 2604 OID 25614)
-- Name: audit id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.audit ALTER COLUMN id SET DEFAULT nextval('public.audit_id_seq'::regclass);


--
-- TOC entry 5149 (class 2604 OID 25615)
-- Name: audit_record id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.audit_record ALTER COLUMN id SET DEFAULT nextval('public.audit_record_id_seq'::regclass);


--
-- TOC entry 5151 (class 2604 OID 25616)
-- Name: audit_recordprocedure id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.audit_recordprocedure ALTER COLUMN id SET DEFAULT nextval('public.audit_recordprocedure_id_seq'::regclass);


--
-- TOC entry 5153 (class 2604 OID 25617)
-- Name: audit_subrecord id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.audit_subrecord ALTER COLUMN id SET DEFAULT nextval('public.audit_subrecord_id_seq'::regclass);


--
-- TOC entry 5155 (class 2604 OID 25618)
-- Name: audit_type id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.audit_type ALTER COLUMN id SET DEFAULT nextval('public.audit_type_id_seq'::regclass);


--
-- TOC entry 5256 (class 2604 OID 26772)
-- Name: civilitylist id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.civilitylist ALTER COLUMN id SET DEFAULT nextval('public.civilitylist_id_seq'::regclass);


--
-- TOC entry 5157 (class 2604 OID 25619)
-- Name: department id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.department ALTER COLUMN id SET DEFAULT nextval('public.department_id_seq'::regclass);


--
-- TOC entry 5159 (class 2604 OID 25620)
-- Name: device id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.device ALTER COLUMN id SET DEFAULT nextval('public.device_id_seq'::regclass);


--
-- TOC entry 5162 (class 2604 OID 25621)
-- Name: device_inspection id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.device_inspection ALTER COLUMN id SET DEFAULT nextval('public.device_inspection_id_seq'::regclass);


--
-- TOC entry 5164 (class 2604 OID 25622)
-- Name: device_installation id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.device_installation ALTER COLUMN id SET DEFAULT nextval('public.device_installation_id_seq'::regclass);


--
-- TOC entry 5169 (class 2604 OID 25623)
-- Name: device_maintenance id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.device_maintenance ALTER COLUMN id SET DEFAULT nextval('public.device_maintenance_id_seq'::regclass);


--
-- TOC entry 5171 (class 2604 OID 25624)
-- Name: document id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.document ALTER COLUMN id SET DEFAULT nextval('public.document_id_seq'::regclass);


--
-- TOC entry 5181 (class 2604 OID 25625)
-- Name: document_link id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.document_link ALTER COLUMN id SET DEFAULT nextval('public.document_link_id_seq'::regclass);


--
-- TOC entry 5182 (class 2604 OID 25626)
-- Name: document_master id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.document_master ALTER COLUMN id SET DEFAULT nextval('public.document_master_id_seq'::regclass);


--
-- TOC entry 5184 (class 2604 OID 25627)
-- Name: documentstatus id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.documentstatus ALTER COLUMN id SET DEFAULT nextval('public.documentstatus_id_seq'::regclass);


--
-- TOC entry 5257 (class 2604 OID 26823)
-- Name: documenttypelist id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.documenttypelist ALTER COLUMN id SET DEFAULT nextval('public.documenttypelist_id_seq'::regclass);


--
-- TOC entry 5186 (class 2604 OID 25628)
-- Name: examident id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.examident ALTER COLUMN id SET DEFAULT nextval('public.examident_id_seq'::regclass);


--
-- TOC entry 5188 (class 2604 OID 25629)
-- Name: examlist id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.examlist ALTER COLUMN id SET DEFAULT nextval('public.examlist_id_seq'::regclass);


--
-- TOC entry 5190 (class 2604 OID 25630)
-- Name: examwarning id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.examwarning ALTER COLUMN id SET DEFAULT nextval('public.examwarning_id_seq'::regclass);


--
-- TOC entry 5192 (class 2604 OID 25631)
-- Name: external_link id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_link ALTER COLUMN id SET DEFAULT nextval('public.external_link_id_seq'::regclass);


--
-- TOC entry 5193 (class 2604 OID 25632)
-- Name: external_src id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.external_src ALTER COLUMN id SET DEFAULT nextval('public.external_src_id_seq'::regclass);


--
-- TOC entry 5194 (class 2604 OID 25633)
-- Name: institution id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.institution ALTER COLUMN id SET DEFAULT nextval('public.institution_id_seq'::regclass);


--
-- TOC entry 5196 (class 2604 OID 25634)
-- Name: legaldocument id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.legaldocument ALTER COLUMN id SET DEFAULT nextval('public.legaldocument_id_seq'::regclass);


--
-- TOC entry 5198 (class 2604 OID 25635)
-- Name: login_role id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.login_role ALTER COLUMN id SET DEFAULT nextval('public.login_role_id_seq'::regclass);


--
-- TOC entry 5200 (class 2604 OID 25636)
-- Name: login_role_permission id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.login_role_permission ALTER COLUMN id SET DEFAULT nextval('public.login_role_permission_id_seq'::regclass);


--
-- TOC entry 5207 (class 2604 OID 25637)
-- Name: procedure id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.procedure ALTER COLUMN id SET DEFAULT nextval('public.procedure_id_seq'::regclass);


--
-- TOC entry 5209 (class 2604 OID 25638)
-- Name: quaad_description id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.quaad_description ALTER COLUMN id SET DEFAULT nextval('public.quaad_description_id_seq'::regclass);


--
-- TOC entry 5210 (class 2604 OID 25639)
-- Name: quaad_point id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.quaad_point ALTER COLUMN id SET DEFAULT nextval('public.quaad_point_id_seq'::regclass);


--
-- TOC entry 5218 (class 2604 OID 25640)
-- Name: quaadpoint_tag id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.quaadpoint_tag ALTER COLUMN id SET DEFAULT nextval('public.quaadpoint_tag_id_seq'::regclass);


--
-- TOC entry 5224 (class 2604 OID 25641)
-- Name: quaadpoint_tag_name id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.quaadpoint_tag_name ALTER COLUMN id SET DEFAULT nextval('public.quaadpoint_tag_name_id_seq'::regclass);


--
-- TOC entry 5226 (class 2604 OID 25642)
-- Name: report id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.report ALTER COLUMN id SET DEFAULT nextval('public.report_id_seq'::regclass);


--
-- TOC entry 5231 (class 2604 OID 25643)
-- Name: sexlist id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.sexlist ALTER COLUMN id SET DEFAULT nextval('public.sexlist_id_seq'::regclass);


--
-- TOC entry 5232 (class 2604 OID 25644)
-- Name: staff_formation id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.staff_formation ALTER COLUMN id SET DEFAULT nextval('public.staff_formation_id_seq'::regclass);


--
-- TOC entry 5234 (class 2604 OID 25645)
-- Name: staff_job id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.staff_job ALTER COLUMN id SET DEFAULT nextval('public.staff_job_id_seq'::regclass);


--
-- TOC entry 5238 (class 2604 OID 25646)
-- Name: staff_member id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.staff_member ALTER COLUMN id SET DEFAULT nextval('public.staff_member_id_seq'::regclass);


--
-- TOC entry 5241 (class 2604 OID 25647)
-- Name: staff_role id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.staff_role ALTER COLUMN id SET DEFAULT nextval('public.staff_role_id_seq'::regclass);


--
-- TOC entry 5244 (class 2604 OID 25648)
-- Name: statuslist id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.statuslist ALTER COLUMN id SET DEFAULT nextval('public.statuslist_id_seq'::regclass);


--
-- TOC entry 5245 (class 2604 OID 25649)
-- Name: survey id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.survey ALTER COLUMN id SET DEFAULT nextval('public.survey_id_seq'::regclass);


--
-- TOC entry 5247 (class 2604 OID 25650)
-- Name: survey_field id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.survey_field ALTER COLUMN id SET DEFAULT nextval('public.survey_field_id_seq'::regclass);


--
-- TOC entry 5248 (class 2604 OID 25651)
-- Name: survey_field_type id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.survey_field_type ALTER COLUMN id SET DEFAULT nextval('public.survey_field_type_id_seq'::regclass);


--
-- TOC entry 5249 (class 2604 OID 25652)
-- Name: survey_resp id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.survey_resp ALTER COLUMN id SET DEFAULT nextval('public.survey_resp_id_seq'::regclass);


--
-- TOC entry 5250 (class 2604 OID 25653)
-- Name: survey_resp_field id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.survey_resp_field ALTER COLUMN id SET DEFAULT nextval('public.survey_resp_field_id_seq'::regclass);


--
-- TOC entry 5251 (class 2604 OID 25654)
-- Name: survey_type id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.survey_type ALTER COLUMN id SET DEFAULT nextval('public.survey_type_id_seq'::regclass);


--
-- TOC entry 5252 (class 2604 OID 25655)
-- Name: tag id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tag ALTER COLUMN id SET DEFAULT nextval('public.tag_id_seq'::regclass);


--
-- TOC entry 5254 (class 2604 OID 25656)
-- Name: tag_link id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tag_link ALTER COLUMN id SET DEFAULT nextval('public.tag_link_id_seq'::regclass);


--
-- TOC entry 5258 (class 2604 OID 29859)
-- Name: task id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.task ALTER COLUMN id SET DEFAULT nextval('public.task_id_seq'::regclass);


--
-- TOC entry 5259 (class 2604 OID 29860)
-- Name: task task_master_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.task ALTER COLUMN task_master_id SET DEFAULT nextval('public.task_task_master_id_seq'::regclass);


--
-- TOC entry 5262 (class 2604 OID 29871)
-- Name: task_link id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.task_link ALTER COLUMN id SET DEFAULT nextval('public.task_link_id_seq'::regclass);


--
-- TOC entry 5263 (class 2604 OID 29878)
-- Name: task_master id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.task_master ALTER COLUMN id SET DEFAULT nextval('public.task_master_id_seq'::regclass);


--
-- TOC entry 5271 (class 2604 OID 29894)
-- Name: task_master_link id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.task_master_link ALTER COLUMN id SET DEFAULT nextval('public.task_master_link_id_seq'::regclass);


--
-- TOC entry 5620 (class 0 OID 25114)
-- Dependencies: 216
-- Data for Name: action; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.action VALUES (8, 'BBBBBBBBBBBBBBB', NULL, 'AAAAAAAAAA', '2024-08-16 00:00:00+02', NULL, '2024-08-14 00:00:00+02', NULL, true, -1);
INSERT INTO public.action VALUES (3, 'New task', 3, 'Interne', '2024-08-14 00:00:00+02', NULL, '2023-12-12 00:00:00+01', 0, false, 1);
INSERT INTO public.action VALUES (9, 'New', NULL, NULL, NULL, NULL, '2024-09-30 00:00:00+02', NULL, true, -1);
INSERT INTO public.action VALUES (7, 'New', 4, '', '2024-08-28 00:00:00+02', '2025-03-06 00:00:00+01', '2024-08-13 00:00:00+02', 0, false, 2);
INSERT INTO public.action VALUES (2, 'Remplacer tube RX2000', 3, '', '2021-04-09 00:00:00+02', '2025-03-14 00:00:00+01', '2021-03-22 00:00:00+01', 0, false, 2);


--
-- TOC entry 5622 (class 0 OID 25122)
-- Dependencies: 218
-- Data for Name: action_link; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.action_link VALUES (19, 7, 8, 'device_inspection');
INSERT INTO public.action_link VALUES (25, 3, 8, 'device_inspection');
INSERT INTO public.action_link VALUES (29, 3, 25, 'report');
INSERT INTO public.action_link VALUES (30, 2, 25, 'report');
INSERT INTO public.action_link VALUES (32, 2, 1, 'survey');
INSERT INTO public.action_link VALUES (35, 7, 5, 'device_inspection');
INSERT INTO public.action_link VALUES (36, 3, 5, 'device_inspection');


--
-- TOC entry 5725 (class 0 OID 26170)
-- Dependencies: 346
-- Data for Name: action_status_link; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.action_status_link VALUES (15, 330, NULL, NULL, 1, '2025-05-15 09:45:29.923186', NULL);
INSERT INTO public.action_status_link VALUES (12, 330, NULL, NULL, 1, '2025-05-15 09:45:29.912307', NULL);
INSERT INTO public.action_status_link VALUES (15, 329, NULL, NULL, 1, '2025-05-14 17:57:28.908729', NULL);
INSERT INTO public.action_status_link VALUES (12, 329, NULL, NULL, 1, '2025-05-16 16:06:04.610289', '2025-05-16 16:15:07.736839');
INSERT INTO public.action_status_link VALUES (12, 329, NULL, NULL, 0, '2025-05-14 17:56:03.117503', '2025-05-16 16:15:07.736839');
INSERT INTO public.action_status_link VALUES (16, 330, NULL, NULL, 0, '2025-05-12 17:56:17.094', '2025-05-16 16:15:12.306363');
INSERT INTO public.action_status_link VALUES (16, 330, NULL, NULL, 1, '2025-05-15 09:45:29.924615', '2025-05-16 16:15:12.306363');
INSERT INTO public.action_status_link VALUES (14, 329, NULL, NULL, 1, '2025-05-16 16:06:04.62151', '2025-05-16 16:21:07.59762');
INSERT INTO public.action_status_link VALUES (14, 330, NULL, NULL, 0, '2025-05-10 17:56:42.313', '2025-08-26 17:06:23.445833');
INSERT INTO public.action_status_link VALUES (14, 330, NULL, NULL, 1, '2025-05-15 09:45:29.921768', '2025-08-26 17:06:23.445833');
INSERT INTO public.action_status_link VALUES (14, 410, NULL, NULL, 1, '2025-08-27 18:44:30.454505', NULL);
INSERT INTO public.action_status_link VALUES (15, 410, NULL, NULL, 1, '2025-08-27 18:44:30.457574', NULL);
INSERT INTO public.action_status_link VALUES (12, 410, NULL, NULL, 1, '2025-08-27 18:44:30.441853', '2025-08-27 19:12:33.237794');


--
-- TOC entry 5624 (class 0 OID 25128)
-- Dependencies: 220
-- Data for Name: afcnsend; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.afcnsend VALUES (8, NULL, NULL, NULL, 'New sending', '2021-03-11 12:27:13.099173+01', 0, NULL, true, NULL);
INSERT INTO public.afcnsend VALUES (10, 1, 2, NULL, 'Rapport dosimètres', '2021-03-11 00:00:00+01', 0, 'Rapport dosimètres', true, 4);
INSERT INTO public.afcnsend VALUES (11, 1, 2, 11, 'Titre 001', '2025-01-14 00:00:00+01', 0, 'Titre 001', false, 4);
INSERT INTO public.afcnsend VALUES (9, 1, 2, 12, 'rapport dosimétrie 2020', '2020-12-31 00:00:00+01', 0, 'rapport dosimétrie 2020', false, 4);
INSERT INTO public.afcnsend VALUES (12, 2, 6, NULL, 'New sending', '2025-01-15 00:00:00+01', 0, 'New sending', false, 4);
INSERT INTO public.afcnsend VALUES (16, -1, -1, NULL, 'New sending', '2025-02-05 17:21:59.661234+01', 0, NULL, true, 3);
INSERT INTO public.afcnsend VALUES (14, -1, -1, NULL, 'New sending', '2025-01-16 09:18:52.894812+01', 0, NULL, true, 3);
INSERT INTO public.afcnsend VALUES (15, -1, -1, NULL, 'New sending', '2025-01-16 11:38:32.671429+01', 0, NULL, true, 3);
INSERT INTO public.afcnsend VALUES (13, 1, 4, 10, 'New sending', '2025-02-01 00:00:00+01', 0, 'New sending', false, 3);


--
-- TOC entry 5626 (class 0 OID 25135)
-- Dependencies: 222
-- Data for Name: agelist; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.agelist VALUES (0, 'Infant');
INSERT INTO public.agelist VALUES (1, 'Child');
INSERT INTO public.agelist VALUES (2, 'Adult');
INSERT INTO public.agelist VALUES (3, 'All');


--
-- TOC entry 5628 (class 0 OID 25141)
-- Dependencies: 224
-- Data for Name: audit; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.audit VALUES (13, 1, 2, '2023-08-21 00:00:00+02', 1, 'New audit', '', 3, NULL, true, 4, '2023-08-21 00:00:00+02', '2023-08-21 00:00:00+02');
INSERT INTO public.audit VALUES (11, 1, 2, '2023-03-13 00:00:00+01', 2, 'Auto-audit B-QUAADRIL - 2023', '', 4, NULL, false, 1, '2022-04-07 00:00:00+02', '2023-03-13 00:00:00+01');
INSERT INTO public.audit VALUES (16, -1, -1, '2024-08-16 16:28:43.264387+02', 0, 'New audit', NULL, 3, NULL, true, 2, '2024-08-16 16:28:43+02', '2024-08-16 16:28:43+02');
INSERT INTO public.audit VALUES (15, -1, -1, '2024-08-16 16:27:26.638303+02', 0, 'New audit', NULL, 3, NULL, true, 2, '2024-08-16 16:27:27+02', '2024-08-16 16:27:27+02');
INSERT INTO public.audit VALUES (12, 2, 7, '2023-03-20 00:00:00+01', 0, 'Test 001', 'Rem', 3, NULL, true, 4, '2023-03-20 00:00:00+01', '2023-03-20 00:00:00+01');
INSERT INTO public.audit VALUES (17, 1, 4, '2025-03-06 00:00:00+01', 2, 'Test 002', '', 4, NULL, false, 4, '2025-03-06 00:00:00+01', '2025-03-06 00:00:00+01');
INSERT INTO public.audit VALUES (20, 2, 7, '2025-03-06 00:00:00+01', 1, 'Test 003', '', 4, NULL, false, 1, '2025-03-06 00:00:00+01', '2025-03-07 00:00:00+01');
INSERT INTO public.audit VALUES (19, -1, -1, '2025-03-06 11:02:16.790735+01', 0, 'New audit', NULL, 3, NULL, true, 2, '2025-03-06 11:02:17+01', '2025-03-06 11:02:17+01');
INSERT INTO public.audit VALUES (18, -1, -1, '2025-03-06 11:01:45.627996+01', 0, 'New audit', NULL, 3, NULL, true, 2, '2025-03-06 11:01:46+01', '2025-03-06 11:01:46+01');
INSERT INTO public.audit VALUES (14, 1, 2, '2023-09-28 00:00:00+02', 1, 'Audit selon NF S-99-300  - 2023', 'Test remarque.', 3, NULL, false, 4, '2022-12-14 00:00:00+01', '2023-09-28 00:00:00+02');


--
-- TOC entry 5630 (class 0 OID 25151)
-- Dependencies: 226
-- Data for Name: audit_record; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.audit_record VALUES (409, 11, 10, false);
INSERT INTO public.audit_record VALUES (410, 11, 5, false);
INSERT INTO public.audit_record VALUES (411, 11, 62, false);
INSERT INTO public.audit_record VALUES (415, 11, 9, false);
INSERT INTO public.audit_record VALUES (422, 11, 6, true);
INSERT INTO public.audit_record VALUES (412, 11, 4, true);


--
-- TOC entry 5632 (class 0 OID 25156)
-- Dependencies: 228
-- Data for Name: audit_recordprocedure; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.audit_recordprocedure VALUES (111, 422, 6, 326, 'Test.', true, NULL);
INSERT INTO public.audit_recordprocedure VALUES (112, 412, 2, 325, '', true, NULL);


--
-- TOC entry 5634 (class 0 OID 25163)
-- Dependencies: 230
-- Data for Name: audit_subrecord; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.audit_subrecord VALUES (357, 411, 53, 92, -1, '', -1, 'Mis à jour en 07/2023', true, false, 128, NULL);
INSERT INTO public.audit_subrecord VALUES (359, 410, 2, 9, -1, NULL, NULL, 'Disponible au format papier dans la salle', false, true, -1, NULL);
INSERT INTO public.audit_subrecord VALUES (360, 410, 2, 10, -1, NULL, NULL, 'a retrouver', false, false, -1, NULL);
INSERT INTO public.audit_subrecord VALUES (361, 415, 9, 11, -1, NULL, NULL, 'Disponible en papier dans la salle armoire 2', false, true, -1, NULL);
INSERT INTO public.audit_subrecord VALUES (372, 412, 1, 1, -1, NULL, NULL, 'En attente.', false, true, -1, NULL);


--
-- TOC entry 5636 (class 0 OID 25170)
-- Dependencies: 232
-- Data for Name: audit_type; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.audit_type VALUES (2, 'Other', 'false', NULL);
INSERT INTO public.audit_type VALUES (1, 'B-QUAADRIL(2019/07)', 'false', 'QUAADRIL');
INSERT INTO public.audit_type VALUES (3, 'BQUANUM(2019/07)', 'false', 'QUANUM');
INSERT INTO public.audit_type VALUES (4, 'NF S-99-300', 'false', 'NF S99-300');


--
-- TOC entry 5728 (class 0 OID 26769)
-- Dependencies: 349
-- Data for Name: civilitylist; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.civilitylist VALUES (1, 'Mrs.');
INSERT INTO public.civilitylist VALUES (0, 'Mr.');
INSERT INTO public.civilitylist VALUES (2, 'Miss');
INSERT INTO public.civilitylist VALUES (3, 'Dr.');
INSERT INTO public.civilitylist VALUES (4, 'Prof.');
INSERT INTO public.civilitylist VALUES (5, 'Mx.');


--
-- TOC entry 5724 (class 0 OID 26153)
-- Dependencies: 345
-- Data for Name: default_action_needed; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 2, 4, 200, 0);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 4, 207, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 1, 4, 208, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 1, 209, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 1, 1, 210, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 2, 211, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 1, 2, 212, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 2, 4, 213, 2);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 1, 1, 214, 2);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist_otherdocument', 3, 4, 183, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist_otherdocument', 2, 2, 184, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('procedure', 2, 2, 186, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('institution', 1, 1, 193, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('institution', 10, 1, 194, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('institution', 1, 2, 195, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('institution', 1, 7, 196, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('institution', 1, 6, 197, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('institution', 10, 6, 198, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 2, 1, 18, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 1, 1, 19, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 4, 1, 20, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 3, 1, 21, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 2, 6, 22, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 1, 6, 23, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 4, 6, 24, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('audit', 3, 6, 25, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 2, 4, 26, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 5, 4, 27, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 1, 4, 28, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 4, 4, 29, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 3, 4, 30, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 2, 1, 31, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 5, 1, 32, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 1, 1, 33, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 4, 1, 34, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 3, 1, 35, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 2, 2, 36, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 5, 2, 37, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 1, 2, 38, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 4, 2, 39, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 3, 2, 40, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 2, 7, 41, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 5, 7, 42, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 1, 7, 43, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 4, 7, 44, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 3, 7, 45, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 2, 6, 46, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 5, 6, 47, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 1, 6, 48, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 4, 6, 49, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 3, 6, 50, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 2, 3, 51, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 5, 3, 52, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 1, 3, 53, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 4, 3, 54, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('legaldocument', 3, 3, 55, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('survey', 1, 1, 56, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('survey', 4, 1, 57, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('survey', 3, 1, 58, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('survey', 2, 6, 59, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('survey', 5, 6, 60, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('survey', 1, 6, 61, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('survey', 4, 6, 62, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 3, 4, 63, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 3, 1, 64, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 3, 2, 65, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 3, 7, 66, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 3, 6, 67, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('afcnsend', 3, 3, 68, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 1, 4, 69, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 3, 4, 70, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 1, 1, 71, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 3, 1, 72, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 1, 2, 73, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 3, 2, 74, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 1, 7, 75, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 3, 7, 76, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 1, 6, 77, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 3, 6, 78, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 1, 3, 79, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('device', 3, 3, 80, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('institution', 1, 3, 199, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_formation', 10, 4, 99, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_formation', 10, 1, 100, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_formation', 10, 2, 101, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_formation', 10, 7, 102, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_formation', 10, 6, 103, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_formation', 10, 3, 104, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_member', 10, 4, 105, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_member', 10, 1, 106, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_member', 10, 2, 107, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_member', 10, 7, 108, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_member', 10, 6, 109, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('staff_member', 10, 3, 110, 1);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 4, 201, 0);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 1, 202, 0);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 2, 203, 0);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 7, 204, 0);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 6, 205, 0);
INSERT INTO public.default_action_needed OVERRIDING SYSTEM VALUE VALUES ('examlist', 2, 3, 206, 0);


--
-- TOC entry 5638 (class 0 OID 25177)
-- Dependencies: 234
-- Data for Name: department; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.department VALUES (-1, 'Undef', -1, true);
INSERT INTO public.department VALUES (1, 'Qualité', 1, false);
INSERT INTO public.department VALUES (2, 'Radiologie', 1, false);
INSERT INTO public.department VALUES (4, 'Médecine nucléaire', 1, false);
INSERT INTO public.department VALUES (5, 'New department', 1, true);
INSERT INTO public.department VALUES (6, 'Qualité', 2, false);
INSERT INTO public.department VALUES (3, 'Radiologie', 2, false);
INSERT INTO public.department VALUES (7, 'Médecine nucléaire', 2, false);
INSERT INTO public.department VALUES (8, 'New department', 1, true);
INSERT INTO public.department VALUES (9, 'New departmenttttt', 1, true);
INSERT INTO public.department VALUES (10, 'New department', 5, true);


--
-- TOC entry 5640 (class 0 OID 25184)
-- Dependencies: 236
-- Data for Name: device; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.device VALUES (13, 'New device', NULL, NULL, NULL, false, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (16, 'New device', NULL, NULL, NULL, false, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (17, 'New device', NULL, NULL, NULL, false, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (18, 'New device', NULL, NULL, NULL, false, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (19, 'New device', NULL, NULL, NULL, false, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (20, 'New device', 'Siemens', '', '', true, '2', 'PACS', 'DACS', 'null', NULL);
INSERT INTO public.device VALUES (14, 'New device 001', 'GE', '', '123456', true, '1', '', '', '', NULL);
INSERT INTO public.device VALUES (15, 'New device 0002', 'Toshiba', '', '', true, '', '', '', '', NULL);
INSERT INTO public.device VALUES (24, 'New device', 'Brand', NULL, NULL, true, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (23, 'Brand', '', NULL, NULL, true, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (22, 'New device', 'Ximeo', '', NULL, true, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (21, 'New device', 'Ximeo', '', NULL, true, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (10, 'RX', 'Ximeo', '', '123456', false, '0', 'PACS', 'DACS', 'RX', '\x[encoded data, 8730 characters]');
INSERT INTO public.device VALUES (25, 'New device', 'Brand', NULL, NULL, true, NULL, NULL, NULL, 'RX', NULL);
INSERT INTO public.device VALUES (11, 'Scanner', 'Ximeo', '', '123453', false, '1', 'PACS', 'DACS', 'CT', '\x[encoded data, 10434 characters]');
INSERT INTO public.device VALUES (12, 'Mammo', 'ximeo', '', '123456', false, '5', 'PACS', 'DACS', 'MG', '\x[encoded data, 6612 characters]');
INSERT INTO public.device VALUES (26, 'New device', 'Brand', NULL, NULL, true, NULL, NULL, NULL, 'RX', NULL);


--
-- TOC entry 5642 (class 0 OID 25192)
-- Dependencies: 238
-- Data for Name: device_inspection; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.device_inspection VALUES (6, 10, NULL, NULL, -1, NULL, NULL, 3, true);
INSERT INTO public.device_inspection VALUES (7, 11, '2022-03-09 00:00:00+01', '2022-08-08 00:00:00+02', 5, '', 'inspection', 4, false);
INSERT INTO public.device_inspection VALUES (8, 12, '2022-10-04 00:00:00+02', '2022-12-14 00:00:00+01', 5, '', '', 4, false);
INSERT INTO public.device_inspection VALUES (9, 14, '2025-03-07 00:00:00+01', '2025-03-07 00:00:00+01', 5, '', 'Contrôle annuel', 3, false);
INSERT INTO public.device_inspection VALUES (5, 10, '2021-03-02 00:00:00+01', '2021-02-02 00:00:00+01', -1, 'RAS', 'Contrôle annuel', 4, false);


--
-- TOC entry 5644 (class 0 OID 25199)
-- Dependencies: 240
-- Data for Name: device_installation; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.device_installation VALUES (10, 12, 2, '2021-03-24 14:27:20+01', NULL, false, '', '', '');
INSERT INTO public.device_installation VALUES (12, 13, -1, '2022-03-08 11:02:10.199686+01', NULL, false, '', '', '');
INSERT INTO public.device_installation VALUES (11, 11, 2, '2021-01-05 14:27:35+01', '2023-03-31 15:06:31+02', false, '', '', '');
INSERT INTO public.device_installation VALUES (61, 10, -1, '2024-06-12 16:59:51.867526+02', NULL, false, '', '', '');
INSERT INTO public.device_installation VALUES (62, 10, -1, '2024-09-27 11:37:03.925148+02', NULL, false, '', '', '');
INSERT INTO public.device_installation VALUES (63, 10, -1, '2024-09-27 11:37:06.995365+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (64, 14, 3, '2025-03-06 17:20:35+01', '2025-03-07 17:28:06+01', false, '', '', '');
INSERT INTO public.device_installation VALUES (9, 10, 4, '2020-12-01 12:28:52+01', '2024-06-30 16:52:36+02', false, 'yyyyyyy', 'xxx', 'azerty');
INSERT INTO public.device_installation VALUES (13, 10, 7, '2024-06-07 17:29:43+02', NULL, false, 'rrrrrrr', 'gggg', 'kkkkkkkkkkkkkkkkkkk');
INSERT INTO public.device_installation VALUES (19, 10, -1, '2024-06-07 18:03:19.800838+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (20, 10, -1, '2024-06-07 18:03:21.681398+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (17, 10, -1, '2024-06-07 17:56:12.909538+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (16, 10, -1, '2024-06-07 17:44:40.246606+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (15, 10, -1, '2024-06-07 17:33:35.66635+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (21, 10, -1, '2024-06-07 18:03:23.300045+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (18, 10, -1, '2024-06-07 18:02:48.990268+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (14, 10, -1, '2024-06-07 17:33:05.666069+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (27, 10, -1, '2024-06-10 11:36:53.074703+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (24, 10, -1, '2024-06-10 11:29:49.881918+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (23, 10, -1, '2024-06-10 11:27:58.143581+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (25, 10, -1, '2024-06-10 11:34:39.122889+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (26, 10, -1, '2024-06-10 11:35:57.017304+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (28, 10, -1, '2024-06-10 11:38:05.280453+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (22, 10, -1, '2024-06-10 11:25:24.813331+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (33, 10, -1, '2024-06-10 14:54:42.478017+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (32, 10, -1, '2024-06-10 14:53:39.336398+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (31, 10, -1, '2024-06-10 14:49:30.159721+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (30, 10, -1, '2024-06-10 13:56:48.477928+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (29, 10, -1, '2024-06-10 11:43:31.686073+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (40, 10, -1, '2024-06-10 16:05:06.765154+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (37, 10, -1, '2024-06-10 15:04:23.154162+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (39, 10, -1, '2024-06-10 16:04:22.8477+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (38, 10, -1, '2024-06-10 16:02:39.503565+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (35, 10, -1, '2024-06-10 15:00:59.447726+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (34, 10, -1, '2024-06-10 15:00:38.107823+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (36, 10, -1, '2024-06-10 15:02:13.693898+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (47, 10, -1, '2024-06-10 16:19:38.47234+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (49, 10, -1, '2024-06-10 16:20:17.502251+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (45, 10, -1, '2024-06-10 16:13:00.39569+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (48, 10, -1, '2024-06-10 16:20:13.665552+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (44, 10, -1, '2024-06-10 16:11:23.56868+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (41, 10, -1, '2024-06-10 16:06:08.42954+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (42, 10, -1, '2024-06-10 16:08:10.960582+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (43, 10, -1, '2024-06-10 16:10:33.363239+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (59, 10, -1, '2024-06-10 16:25:30.932162+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (56, 10, -1, '2024-06-10 16:25:29.222963+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (57, 10, -1, '2024-06-10 16:25:29.62949+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (54, 10, -1, '2024-06-10 16:25:27.209746+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (55, 10, -1, '2024-06-10 16:25:28.558113+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (52, 10, -1, '2024-06-10 16:25:17.031008+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (53, 10, -1, '2024-06-10 16:25:18.132693+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (46, 10, -1, '2024-06-10 16:18:55.724211+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (50, 10, -1, '2024-06-10 16:25:13.660449+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (51, 10, -1, '2024-06-10 16:25:15.782679+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (58, 10, -1, '2024-06-10 16:25:30.261555+02', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (60, 10, -1, '2024-06-12 16:56:34.090711+02', NULL, false, '', '', '');
INSERT INTO public.device_installation VALUES (65, 14, -1, '2025-03-06 17:28:11.425125+01', NULL, true, '', '', '');
INSERT INTO public.device_installation VALUES (66, 25, 3, '2025-04-16 14:05:22+02', NULL, false, '', '', '');
INSERT INTO public.device_installation VALUES (67, 11, 2, '2025-04-16 14:08:02+02', '2026-10-01 14:22:25+02', false, '', '', '');


--
-- TOC entry 5646 (class 0 OID 25209)
-- Dependencies: 242
-- Data for Name: device_maintenance; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.device_maintenance VALUES (3, 10, NULL, NULL, NULL, '', 'Corrective', 3, false);
INSERT INTO public.device_maintenance VALUES (4, 12, NULL, NULL, NULL, NULL, NULL, 3, false);
INSERT INTO public.device_maintenance VALUES (5, 10, NULL, NULL, NULL, NULL, NULL, 3, true);
INSERT INTO public.device_maintenance VALUES (7, 10, '2025-03-06 00:00:00+01', '2025-03-06 00:00:00+01', NULL, '', 'Corrective', 4, false);
INSERT INTO public.device_maintenance VALUES (6, 10, NULL, '2025-03-06 00:00:00+01', NULL, '', 'Preventive', 3, false);


--
-- TOC entry 5648 (class 0 OID 25216)
-- Dependencies: 244
-- Data for Name: document; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.document VALUES (291, 'legaldocument_291.pdf', 'PQ-001_Maitrise_des_documents.pdf', 'legaldocument', 'pdf', '2024-09-17 17:30:17+02', false, 1, '', '', 0, 264, NULL, NULL, '', '2024-09-17 17:30:17.035287+02', '2024-09-25 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (290, 'legaldocument_290.pdf', 'XIM_QUA_01.00_CLA.0_Classification.pdf', 'legaldocument', 'pdf', '2024-09-16 09:24:42+02', false, 1, 'Doc label 002', '', 0, 263, NULL, NULL, '', '2024-09-16 09:24:42.629794+02', '2024-10-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (295, 'legaldocument_295.pdf', 'PQ-006_Examen.pdf', 'legaldocument', 'pdf', '2024-09-17 17:35:04+02', false, 1, '', '', 0, 268, NULL, NULL, '', '2024-09-17 17:35:04.592429+02', '2024-09-29 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (296, 'legaldocument_296.pdf', '20190710_b-quaadril_fr_juillet_2019.pdf', 'legaldocument', 'pdf', '2024-09-18 08:23:34+02', false, 1, '', '', 0, 269, NULL, NULL, '', '2024-09-18 08:23:34.492074+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (300, 'institution_300.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'institution', 'pdf', '2024-09-18 11:35:53+02', false, 1, '', '', 0, 272, NULL, NULL, '', '2024-09-18 11:35:53.835485+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (304, 'procedure_304.pdf', 'GUIDE N° 11 Indice 2 • Version du 07.10.2009 • MAJ juillet 2015.pdf', 'procedure', 'pdf', '2024-09-18 11:54:01+02', false, 1, '', '', 0, 274, NULL, NULL, '', '2024-09-18 11:54:01.053547+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (308, 'examlist_308.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'examlist', 'pdf', '2024-09-18 17:46:17+02', false, 1, '', '', 0, 278, NULL, NULL, '', '2024-09-18 17:46:17.93195+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (312, 'staff_formation_312.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'staff_formation', 'pdf', '2024-09-19 09:14:50+02', false, 1, '', '', 0, 282, NULL, NULL, '', '2024-09-19 09:14:50.880571+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (316, 'device_maintenance_316.pdf', 'Décision n° 2019-DC-0660 de l''ASN du 15 janvier 2019 .pdf', 'device_maintenance', 'pdf', '2024-09-19 18:03:41+02', false, 1, '', '', 0, 286, NULL, NULL, '', '2024-09-19 18:03:41.717567+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (320, 'afcnsend_320.pdf', '2013-59-EURATOM.pdf', 'afcnsend', 'pdf', '2024-09-24 17:36:05.545135+02', false, 1, 'Test', 'Test', 0, 290, NULL, NULL, NULL, '2024-09-24 17:36:05.545135+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (324, 'afcnsend_324.pdf', 'Décision n° 2019-DC-0660 de l''ASN du 15 janvier 2019 .pdf', 'afcnsend', 'pdf', '2024-09-25 09:59:21.877554+02', false, 1, '', '', 0, 294, NULL, NULL, NULL, '2024-09-25 09:59:21.877554+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (325, 'procedure_325.pdf', '20190710_b-quaadril_fr_juillet_2019.pdf', 'procedure', 'pdf', '2024-10-03 19:00:27+02', false, 1, '', '', 0, 295, NULL, NULL, '', '2024-10-03 19:00:27.04642+02', '2024-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (327, 'report_327.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'report', 'pdf', '2024-10-04 16:19:38+02', false, 1, '', '', 0, 297, NULL, NULL, '', '2024-10-04 16:19:38.420038+02', '2024-10-04 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (333, 'procedure_333.pdf', 'PQ-005_Incident.pdf', 'procedure', 'pdf', '2025-01-08 14:28:00+01', false, 1, '', '', 0, 301, NULL, NULL, '', '2025-01-08 14:28:00.070366+01', '2045-01-08 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (337, 'survey_337.pdf', 'XIM_PQ05.6_IT.pdf', 'survey', 'pdf', '2025-02-19 18:31:17+01', false, 1, 'Conclusion enquête', 'RAS', 0, 304, NULL, NULL, '', '2025-02-19 18:31:17.533498+01', '2025-02-28 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (289, 'legaldocument_289.pdf', 'plaquette de synthèse guide n° 11 MAJ juillet 2015.pdf', 'legaldocument', 'pdf', '2024-09-13 18:03:14+02', false, 4, 'Label doc rev4', '', 0, 262, NULL, NULL, '', '2024-09-13 18:03:14.104987+02', '2025-03-29 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (343, 'legaldocument_343.pdf', 'PACS Displays How to Select the.pdf', 'legaldocument', 'pdf', '2025-03-06 10:32:45+01', false, 1, '', '', 0, 310, NULL, NULL, '', '2025-03-06 10:32:45.584891+01', '2025-03-31 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (345, 'procedure_345.pdf', 'PQ-005_Incident.pdf', 'procedure', 'pdf', '2025-03-07 14:12:01+01', false, 1, 'PQ-005', '', 0, 311, NULL, NULL, '', '2025-03-07 14:12:01.328538+01', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (286, 'legaldocument_286.pdf', '2013-59-EURATOM.pdf', 'legaldocument', 'pdf', '2024-09-13 17:35:51+02', false, 1, '', '', 0, 262, NULL, NULL, '', '2024-09-13 17:35:51.107904+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (297, 'legaldocument_297.pdf', 'Décision n° 2019-DC-0660 de l''ASN du 15 janvier 2019 .pdf', 'legaldocument', 'pdf', '2024-09-18 08:43:42+02', false, 2, 'BQUAAD 002', '', 0, 269, NULL, NULL, '', '2024-09-18 08:43:42.233255+02', '2024-09-20 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (301, 'legaldocument_301.pdf', 'plaquette de synthèse guide n° 11 MAJ juillet 2015.pdf', 'legaldocument', 'pdf', '2024-09-18 11:37:04+02', false, 2, 'Inst 002', '', 0, 272, NULL, NULL, '', '2024-09-18 11:37:04.096001+02', '2024-09-24 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (305, 'procedure_305.pdf', 'Décision n° 2019-DC-0660 de l''ASN du 15 janvier 2019 .pdf', 'procedure', 'pdf', '2024-09-18 11:55:37+02', false, 1, '', '', 0, 275, NULL, NULL, '', '2024-09-18 11:55:37.219531+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (313, 'device_313.pdf', '20190710_b-quaadril_fr_juillet_2019.pdf', 'device', 'pdf', '2024-09-19 17:41:21+02', false, 1, '', '', 0, 283, NULL, NULL, '', '2024-09-19 17:41:21.252237+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (317, 'report_317.pdf', 'plaquette de synthèse guide n° 11 MAJ juillet 2015.pdf', 'report', 'pdf', '2024-09-19 18:15:59+02', false, 1, '', '', 0, 287, NULL, NULL, '', '2024-09-19 18:15:59.063135+02', '2024-09-22 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (321, 'afcnsend_321.pdf', 'Décision n° 2019-DC-0660 de l''ASN du 15 janvier 2019 .pdf', 'afcnsend', 'pdf', '2024-09-24 17:36:43.263317+02', false, 1, '', '', 0, 291, NULL, NULL, NULL, '2024-09-24 17:36:43.263317+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (326, 'procedure_326.pdf', 'plaquette de synthèse guide n° 11 MAJ juillet 2015.pdf', 'procedure', 'pdf', '2024-10-03 19:30:41+02', false, 1, '', '', 0, 296, NULL, NULL, '', '2024-10-03 19:30:41.830562+02', '2024-10-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (328, 'report_328.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'report', 'pdf', '2024-10-04 16:20:47+02', false, 1, '', '', 0, 298, NULL, NULL, '', '2024-10-04 16:20:47.730232+02', '2024-10-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (292, 'legaldocument_292.pdf', 'PQ-002_Radioprotection-dosimétrie.pdf', 'legaldocument', 'pdf', '2024-09-17 17:32:01+02', false, 1, '', '', 0, 265, NULL, NULL, '', '2024-09-17 17:32:01.361481+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (344, 'legaldocument_344.pdf', 'Five Levels of PACS Modularity Integrating 3D.pdf', 'legaldocument', 'pdf', '2025-03-06 10:33:23+01', false, 2, 'New Doc', '', 0, 310, NULL, NULL, '', '2025-03-06 10:33:23.043614+01', '2025-05-31 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (334, 'procedure_334.pdf', 'PQ-006_Examen.pdf', 'procedure', 'pdf', '2025-01-08 14:28:28+01', false, 1, '', '', 0, 302, NULL, NULL, '', '2025-01-08 14:28:28.684442+01', '2045-01-08 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (287, 'legaldocument_287.pdf', '20190710_b-quaadril_fr_juillet_2019.pdf', 'legaldocument', 'pdf', '2024-09-13 17:36:14+02', false, 2, '', '', 0, 262, NULL, NULL, '', '2024-09-13 17:36:14.278934+02', '2024-10-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (293, 'legaldocument_293.pdf', 'PQ-007_Plateau-technique.pdf', 'legaldocument', 'pdf', '2024-09-17 17:32:35+02', false, 1, '', '', 0, 266, NULL, NULL, '', '2024-09-17 17:32:35.905287+02', '2024-09-27 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (302, 'institution_302.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'institution', 'pdf', '2024-09-18 11:42:19+02', false, 1, '', '', 0, 273, NULL, NULL, '', '2024-09-18 11:42:19.113298+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (306, 'department_306.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'department', 'pdf', '2024-09-18 14:13:01+02', false, 1, 'Dep 001', '', 0, 276, NULL, NULL, '', '2024-09-18 14:13:01.285133+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (314, 'device_installation_314.pdf', 'plaquette de synthèse guide n° 11 MAJ juillet 2015.pdf', 'device_installation', 'pdf', '2024-09-19 17:49:00+02', false, 1, '', '', 0, 284, NULL, NULL, '', '2024-09-19 17:49:00.043971+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (318, 'audit_318.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'audit', 'pdf', '2024-09-19 18:23:30+02', false, 1, '', '', 0, 288, NULL, NULL, '', '2024-09-19 18:23:30.786746+02', '2024-09-23 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (322, 'afcnsend_322.pdf', '2013-59-EURATOM.pdf', 'afcnsend', 'pdf', '2024-09-24 17:39:58.785928+02', false, 1, '', '', 0, 292, NULL, NULL, NULL, '2024-09-24 17:39:58.785928+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (335, 'procedure_335.pdf', 'PQ-007_Plateau-technique.pdf', 'procedure', 'pdf', '2025-01-08 14:29:28+01', false, 2, 'PQ007', '', 0, 295, NULL, NULL, '', '2025-01-08 14:29:28.12827+01', '2045-01-08 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (298, 'legaldocument_298.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'legaldocument', 'pdf', '2024-09-19 09:34:05+02', false, 1, '', '', 0, 270, NULL, NULL, '', '2024-09-18 11:26:21.348212+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (331, 'procedure_331.pdf', 'PQ-003_RH.pdf', 'procedure', 'pdf', '2025-01-08 14:26:45+01', false, 1, '', '', 0, 299, NULL, NULL, '', '2025-01-08 14:26:45.164564+01', '2045-01-08 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (288, 'legaldocument_288.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'legaldocument', 'pdf', '2024-09-13 17:39:58+02', false, 3, '', '', 0, 262, NULL, NULL, '', '2024-09-13 17:39:58.317692+02', '2024-11-30 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (336, 'examlist_otherdocument_336.pdf', 'Produit de contraste.pdf', 'examlist_otherdocument', 'pdf', '2025-01-14 09:56:03+01', false, 1, 'Fiche patient', '', 0, 303, NULL, NULL, '', '2025-01-14 09:56:03.160914+01', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (330, 'procedure_330.pdf', 'PQ-002_Radioprotection-dosimétrie.pdf', 'procedure', 'pdf', '2025-01-08 14:26:13+01', false, 2, 'PQ002', '', 0, 296, NULL, NULL, '', '2025-01-08 14:26:13.836719+01', '2045-01-08 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (329, 'procedure_329.pdf', 'PQ-001_Maitrise_des_documents.pdf', 'procedure', 'pdf', '2025-01-08 14:25:36+01', false, 2, 'PQ001', '', 0, 275, NULL, NULL, '', '2025-01-08 14:25:36.87464+01', '2045-01-08 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (294, 'legaldocument_294.pdf', 'PQ-005_Incident.pdf', 'legaldocument', 'pdf', '2024-09-17 17:34:29+02', false, 1, '', '', 0, 267, NULL, NULL, '', '2024-09-17 17:34:29.522617+02', '2024-09-28 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (299, 'legaldocument_299.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'legaldocument', 'pdf', '2024-09-18 11:27:08+02', false, 1, '', '', 0, 271, NULL, NULL, '', '2024-09-18 11:27:08.445566+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (303, 'institution_303.pdf', 'plaquette de synthèse guide n° 11 MAJ juillet 2015.pdf', 'institution', 'pdf', '2024-09-18 11:42:43+02', false, 2, 'Inst 002', '', 0, 273, NULL, NULL, '', '2024-09-18 11:42:43.419745+02', '2024-09-29 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (307, 'department_307.pdf', 'GUIDE N° 11 Indice 2 • Version du 07.10.2009 • MAJ juillet 2015.pdf', 'department', 'pdf', '2024-09-18 14:30:59+02', false, 1, '', '', 0, 277, NULL, NULL, '', '2024-09-18 14:30:59.266564+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (311, 'staff_member_311.pdf', 'GUIDE N° 11 Indice 2 • Version du 07.10.2009 • MAJ juillet 2015.pdf', 'staff_member', 'pdf', '2024-09-18 18:12:31+02', false, 1, '', '', 0, 281, NULL, NULL, '', '2024-09-18 18:12:31.691952+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (315, 'device_inspection_315.pdf', 'GUIDE N° 11 Indice 2 • Version du 07.10.2009 • MAJ juillet 2015.pdf', 'device_inspection', 'pdf', '2024-09-19 17:58:16+02', false, 1, '', '', 0, 285, NULL, NULL, '', '2024-09-19 17:58:16.58904+02', '2024-09-29 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (323, 'afcnsend_323.pdf', 'Décision n° 2019-DC-0660 de l''ASN du 15 janvier 2019 .pdf', 'afcnsend', 'pdf', '2024-09-24 17:42:05.666194+02', false, 1, '', '', 0, 293, NULL, NULL, NULL, '2024-09-24 17:42:05.666194+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (332, 'procedure_332.pdf', 'PQ-004_Audit.pdf', 'procedure', 'pdf', '2025-01-08 14:27:30+01', false, 1, '', '', 0, 300, NULL, NULL, '', '2025-01-08 14:27:30.288584+01', '2045-01-08 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (319, 'audit_319.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'audit', 'pdf', '2024-09-19 18:29:30+02', false, 1, '', '', 0, 289, NULL, NULL, '', '2024-09-19 18:29:30.109945+02', '2024-09-29 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (378, NULL, NULL, 'procedure', 'docx', '2025-05-07 12:21:41+02', false, 1, '', '', 0, 349, 'procedure378.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 12:21:41.355682+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (379, NULL, NULL, 'procedure', 'docx', '2025-05-07 12:22:43+02', false, 1, '', '', 0, 350, 'procedure379.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 12:22:43.778424+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (354, 'examlist_354.pdf', '7_2_Le B Quaadril quelles implication pour nos services.pdf', 'examlist', 'pdf', '2025-05-05 15:50:09+02', false, 1, '', '', 0, 320, NULL, NULL, '', '2025-05-05 15:50:09.574296+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (347, 'examlist_347.pdf', 'examlist_3.pdf', 'examlist', 'pdf', '2025-04-25 15:00:15+02', false, 1, 'AAAAAAAAAAAAA', 'AAAAAAAAAAAAAAAAA', 0, 313, NULL, NULL, '', '2025-04-25 15:00:15.964429+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (309, 'examlist_309.pdf', 'plaquette de synthèse guide n° 11 MAJ juillet 2015.pdf', 'examlist', 'pdf', '2024-09-18 17:53:57+02', false, 1, 'Rev. 1', '', 0, 279, NULL, NULL, '', '2024-09-18 17:53:57.510407+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (355, 'examlist_355.docx', 'Reception eoDACS.docx', 'examlist', 'docx', '2025-05-05 18:43:03+02', false, 1, '', '', 0, 321, NULL, NULL, '', '2025-05-05 18:43:03.299708+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (356, 'examlist_356.docx', 'Reception eoDACS.docx', 'examlist', 'docx', '2025-05-05 18:46:05+02', false, 1, '', '', 0, 322, NULL, NULL, '', '2025-05-05 18:46:05.469794+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (357, 'examlist_357.docx', 'Reception eoDACS.docx', 'examlist', 'docx', '2025-05-05 18:49:19+02', false, 1, '', '', 0, 323, NULL, NULL, '', '2025-05-05 18:49:19.574573+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (358, 'procedure_358.docx', 'Reception eoDACS.docx', 'procedure', 'docx', '2025-05-05 19:34:46+02', false, 1, '', '', 0, 324, NULL, NULL, '', '2025-05-05 19:34:46.000551+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (359, 'procedure_359.docx', 'Reception eoDACS.docx', 'procedure', 'docx', '2025-05-05 19:35:29+02', false, 1, '', '', 0, 325, NULL, NULL, '', '2025-05-05 19:35:29.033476+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (360, 'procedure_360.docx', 'Reception eoDACS.docx', 'procedure', 'docx', '2025-05-06 09:20:34+02', false, 1, '', '', 0, 326, NULL, NULL, '', '2025-05-06 09:20:34.044711+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (363, 'procedure363docx', 'Reception eoDACS.docx', 'procedure', 'docx', '2025-05-06 10:33:38+02', false, 1, '', '', 0, 333, NULL, NULL, NULL, '2025-05-06 10:33:38.457528+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (364, 'procedure364docx', 'Reception eoDACS.docx', 'procedure', 'docx', '2025-05-06 10:34:52+02', false, 1, '', '', 0, 334, NULL, NULL, NULL, '2025-05-06 10:34:52.971649+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (365, 'procedure365.docx', 'Reception eoDACS.docx', 'procedure', 'docx', '2025-05-06 10:44:41+02', false, 1, '', '', 0, 336, NULL, NULL, NULL, '2025-05-06 10:44:41.258942+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (368, NULL, NULL, 'procedure', 'docx', '2025-05-06 17:42:28+02', false, 1, '', '', 0, 339, 'procedure368.docx', 'Reception eoDACS.docx', NULL, '2025-05-06 17:42:28.252727+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (369, NULL, NULL, 'procedure', 'docx', '2025-05-06 17:49:13+02', false, 1, '', '', 0, 340, 'procedure369.docx', 'Reception eoDACS.docx', NULL, '2025-05-06 17:49:13.829841+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (371, NULL, NULL, 'procedure', 'docx', '2025-05-07 11:48:39+02', false, 1, '', '', 0, 342, 'procedure371.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 11:48:39.41671+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (372, NULL, NULL, 'procedure', 'docx', '2025-05-07 11:54:49+02', false, 1, '', '', 0, 343, 'procedure372.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 11:54:49.192593+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (346, 'examlist_346.pdf', 'examlist_32.pdf', 'examlist', 'pdf', '2025-04-24 11:16:12+02', false, 1, 'Test', '', 0, 312, NULL, NULL, '', '2025-04-24 11:16:12.921006+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (310, 'examlist_otherdocument_310.pdf', 'recommandations_en_matiere_de_prescription_de_limagerie_medicale_pc.pdf', 'examlist_otherdocument', 'pdf', '2024-09-18 17:54:35+02', false, 1, '', '', 0, 280, NULL, NULL, '', '2024-09-18 17:54:35.553462+02', '2024-09-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (348, 'examlist_348.pdf', 'examlist_4.pdf', 'examlist', 'pdf', '2025-04-30 10:30:00+02', false, 1, 'Test', '', 0, 314, NULL, NULL, '', '2025-04-30 10:30:00.545389+02', '2054-04-30 23:59:59+02', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (349, 'institution_349.pdf', 'examlist_3.pdf', 'institution', 'pdf', '2025-04-30 17:28:24+02', false, 1, 'Inst 001', '', 0, 315, NULL, NULL, '', '2025-04-30 17:28:24.58462+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (350, 'examlist_otherdocument_350.docx', 'Reception eoDACS.docx', 'examlist_otherdocument', 'docx', '2025-05-05 15:35:44+02', false, 1, '', '', 0, 316, NULL, NULL, '', '2025-05-05 15:35:44.537751+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (351, 'examlist_otherdocument_351.pdf', '7_2_Le B Quaadril quelles implication pour nos services.pdf', 'examlist_otherdocument', 'pdf', '2025-05-05 15:36:27+02', false, 1, '', '', 0, 317, NULL, NULL, '', '2025-05-05 15:36:27.601351+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (352, 'examlist_otherdocument_352.pdf', '7_2_Le B Quaadril quelles implication pour nos services.pdf', 'examlist_otherdocument', 'pdf', '2025-05-05 15:37:16+02', false, 1, '', '', 0, 318, NULL, NULL, '', '2025-05-05 15:37:16.446289+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (353, 'examlist_353.pdf', '7_2_Le B Quaadril quelles implication pour nos services.pdf', 'examlist', 'pdf', '2025-05-05 15:38:50+02', false, 1, '', '', 0, 319, NULL, NULL, '', '2025-05-05 15:38:50.094295+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (373, NULL, NULL, 'procedure', 'docx', '2025-05-07 11:57:31+02', false, 1, '', '', 0, 344, 'procedure373.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 11:57:31.298598+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (374, NULL, NULL, 'procedure', 'docx', '2025-05-07 12:09:21+02', false, 1, '', '', 0, 345, 'procedure374.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 12:09:21.623452+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (375, NULL, NULL, 'procedure', 'docx', '2025-05-07 12:13:20+02', false, 1, '', '', 0, 346, 'procedure375.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 12:13:20.777315+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (376, NULL, NULL, 'procedure', 'docx', '2025-05-07 12:17:00+02', false, 1, '', '', 0, 347, 'procedure376.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 12:17:00.826046+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (377, NULL, NULL, 'procedure', 'docx', '2025-05-07 12:20:02+02', false, 1, '', '', 0, 348, 'procedure377.docx', 'Reception eoDACS.docx', NULL, '2025-05-07 12:20:02.29944+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (380, 'procedure380.pdf', NULL, 'procedure', 'docx', '2025-05-07 12:29:28+02', false, 1, '', '', 0, 351, 'procedure380.docx', 'Reception eoDACS.docx', '', '2025-05-07 12:29:28.581092+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (383, NULL, NULL, 'procedure', 'docx', '2025-05-07 16:46:46+02', false, 1, '', '', 0, 354, 'procedure383.docx', 'PQ-001_Maitrise_des_documents.docx', NULL, '2025-05-07 16:46:46.161753+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (381, 'procedure381.pdf', NULL, 'procedure', 'docx', '2025-05-07 15:44:12+02', false, 1, '', '', 0, 352, 'procedure381.docx', 'PQ-001_Maitrise_des_documents.docx', '', '2025-05-07 15:44:12.815743+02', '2025-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (384, NULL, NULL, 'procedure', 'docx', '2025-05-07 16:49:34+02', false, 1, '', '', 0, 355, 'procedure384.docx', 'PQ-002_Radioprotection-dosimétrie.docx', NULL, '2025-05-07 16:49:34.046926+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (370, NULL, NULL, 'procedure', 'docx', '2025-05-07 11:44:43+02', false, 1, '', '', 0, 341, 'procedure370.docx', 'Reception eoDACS.docx', '', '2025-05-07 11:44:43.292064+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (385, 'procedure385.pdf', NULL, 'procedure', 'docx', '2025-05-07 16:52:24+02', false, 1, '', '', 0, 356, 'procedure385.docx', 'PQ-002_Radioprotection-dosimétrie.docx', '', '2025-05-07 16:52:24.874162+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (382, 'procedure382.pdf', NULL, 'procedure', 'docx', '2025-05-07 16:01:47+02', false, 1, '', '', 0, 353, 'procedure382.docx', 'PQ-001_Maitrise_des_documents.docx', '', '2025-05-07 16:01:47.767047+02', '2999-12-31 23:59:59+01', '2025-08-27 18:13:57.640807+02');
INSERT INTO public.document VALUES (386, 'examlist386.pdf', NULL, 'examlist', 'docx', '2025-05-07 18:14:36+02', false, 1, '', '', 0, 357, 'examlist386.docx', 'IT-138_TDM_rachis_lombo_sacré.docx', '', '2025-05-07 18:14:36.670294+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (387, 'examlist_otherdocument387.pdf', NULL, 'examlist_otherdocument', 'docx', '2025-05-07 18:27:15+02', false, 1, '', '', 0, 358, 'examlist_otherdocument387.docx', 'MQ.0_Manuel_qualité.docx', '', '2025-05-07 18:27:15.195478+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (388, NULL, NULL, 'institution', 'docx', '2025-05-07 18:33:20+02', false, 1, 'Rev 0', '', 0, 359, 'institution388.docx', 'MQ.0_Manuel_qualité.docx', NULL, '2025-05-07 18:33:20.949262+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (405, 'procedure405.pdf', NULL, 'procedure', 'docx', '2025-05-12 09:26:57+02', false, 1, '', '', 0, 376, 'procedure405.docx', 'PQ-005_Incident.docx', '', '2025-05-12 09:26:57.367025+02', '2999-12-31 23:59:59+01', '2025-05-12 09:26:57.367025+02');
INSERT INTO public.document VALUES (389, 'institution389.pdf', NULL, 'institution', 'docx', '2025-05-07 18:40:27+02', false, 1, '', '', 0, 360, 'institution389.docx', 'PQ-005_Incident.docx', '', '2025-05-07 18:40:27.550977+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (390, 'legaldocument390.pdf', NULL, 'legaldocument', 'docx', '2025-05-07 18:50:05+02', false, 1, 'Test 0011', '', 0, 361, 'legaldocument390.docx', 'PQ-005_Incident.docx', '', '2025-05-07 18:50:05.635564+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (391, 'procedure391.pdf', 'PQ-003_RH.pdf', 'procedure', 'pdf', '2025-05-09 14:24:08+02', false, 1, 'aaaaaaaaaaa', '', 0, 362, NULL, NULL, '', '2025-05-09 14:24:08.274331+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (392, NULL, NULL, 'procedure', 'docx', '2025-05-09 14:53:44+02', false, 1, 'aaaaaaaaaaaaaaaaaaaaa', '', 0, 363, 'procedure392.docx', '', NULL, '2025-05-09 14:53:44.921454+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (393, NULL, NULL, 'procedure', 'docx', '2025-05-09 15:35:29+02', false, 1, 'bbbbbbbbbbbbbbbb', '', 0, 364, 'procedure393.docx', '', NULL, '2025-05-09 15:35:29.151943+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (394, NULL, NULL, 'procedure', 'xlsx', '2025-05-09 15:41:09+02', false, 1, 'FFFFFFFFFFFFFF', '', 0, 365, 'procedure394.xlsx', '', NULL, '2025-05-09 15:41:09.314425+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (395, NULL, NULL, 'procedure', 'xlsx', '2025-05-09 15:44:04+02', false, 1, 'GGGGGGGGGGGGGGG', '', 0, 366, 'procedure395.xlsx', '', NULL, '2025-05-09 15:44:04.160139+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (396, NULL, NULL, 'procedure', 'docx', '2025-05-09 16:00:41+02', false, 1, 'hhhhhhhhhhhhhhhhhhh', '', 0, 367, 'procedure396.docx', '', NULL, '2025-05-09 16:00:41.032799+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (397, NULL, NULL, 'procedure', 'xlsx', '2025-05-09 16:02:02+02', false, 1, '', '', 0, 368, 'procedure397.xlsx', '', NULL, '2025-05-09 16:02:02.911829+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (398, NULL, NULL, 'procedure', 'docx', '2025-05-09 16:05:49+02', false, 1, 'JJJJJJJJJJJJJJJJJJJJJJJJ', '', 0, 369, 'procedure398.docx', 'PQ-004_Audit.docx', NULL, '2025-05-09 16:05:49.141336+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (402, NULL, NULL, 'procedure', 'docx', '2025-05-09 16:19:26+02', false, 1, '', '', 0, 373, 'procedure402.docx', 'PQ-004_Audit.docx', NULL, '2025-05-09 16:19:26.267076+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (403, 'procedure403.pdf', NULL, 'procedure', 'docx', '2025-05-09 16:43:43+02', false, 1, '', '', 0, 374, 'procedure403.docx', 'PQ-006_Examen.docx', '', '2025-05-09 16:43:43.717841+02', '2999-12-31 23:59:59+01', '2025-05-10 11:08:33.244896+02');
INSERT INTO public.document VALUES (400, 'procedure400.xlsx', NULL, 'procedure', 'xlsx', '2025-05-09 16:10:49+02', false, 1, 'Rev 1', '', 0, 371, 'procedure400.xlsx', 'PQ-004_Audit.docx', '', '2025-05-09 16:10:49.100677+02', '2999-12-31 23:59:59+01', '2025-05-10 11:35:20.782963+02');
INSERT INTO public.document VALUES (404, 'procedure404.pdf', NULL, 'procedure', 'docx', '2025-05-12 09:23:51+02', false, 1, '', '', 0, 375, 'procedure404.docx', '', '', '2025-05-12 09:23:51.4487+02', '2999-12-31 23:59:59+01', '2025-05-12 09:24:28.164245+02');
INSERT INTO public.document VALUES (399, 'procedure399.pdf', NULL, 'procedure', 'docx', '2025-05-09 16:09:53+02', false, 1, 'Rev 1', '', 0, 370, 'procedure399.docx', 'PQ-004_Audit.docx', '', '2025-05-09 16:09:53.702122+02', '2999-12-31 23:59:59+01', '2025-08-27 18:21:38.029177+02');
INSERT INTO public.document VALUES (401, 'procedure401.pdf', NULL, 'procedure', 'docx', '2025-08-27 18:36:17+02', false, 1, 'Test 003 - Rev 1', '', 0, 372, 'procedure401.docx', 'PQ-004_Audit.docx', '', '2025-05-09 16:13:58.16611+02', '2025-08-31 23:59:59+02', '2025-05-16 17:02:04.451547+02');
INSERT INTO public.document VALUES (406, 'procedure406.pdf', NULL, 'procedure', 'docx', '2025-05-12 09:57:58+02', false, 1, '', '', 0, 377, 'procedure406.docx', 'PQ-005_Incident.docx', '', '2025-05-12 09:57:58.564033+02', '2999-12-31 23:59:59+01', '2025-05-12 09:57:58.564033+02');
INSERT INTO public.document VALUES (410, 'procedure410.pdf', NULL, 'procedure', 'docx', '2025-08-27 18:41:52+02', false, 2, '', '', 0, 377, 'procedure410.docx', '', '', '2025-08-27 18:41:52.19961+02', '2999-12-31 23:59:59+01', '2025-08-27 18:43:06.695475+02');


--
-- TOC entry 5650 (class 0 OID 25230)
-- Dependencies: 246
-- Data for Name: document_link; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.document_link VALUES (276, 'legaldocument', 1, 286);
INSERT INTO public.document_link VALUES (277, 'legaldocument', 1, 287);
INSERT INTO public.document_link VALUES (278, 'legaldocument', 1, 288);
INSERT INTO public.document_link VALUES (279, 'legaldocument', 1, 289);
INSERT INTO public.document_link VALUES (280, 'legaldocument', 1, 290);
INSERT INTO public.document_link VALUES (281, 'legaldocument', 1, 291);
INSERT INTO public.document_link VALUES (282, 'legaldocument', 1, 292);
INSERT INTO public.document_link VALUES (283, 'legaldocument', 1, 293);
INSERT INTO public.document_link VALUES (284, 'legaldocument', 1, 294);
INSERT INTO public.document_link VALUES (285, 'legaldocument', 1, 295);
INSERT INTO public.document_link VALUES (286, 'legaldocument', 2, 296);
INSERT INTO public.document_link VALUES (287, 'legaldocument', 2, 297);
INSERT INTO public.document_link VALUES (288, 'legaldocument', 1, 298);
INSERT INTO public.document_link VALUES (289, 'legaldocument', 2, 299);
INSERT INTO public.document_link VALUES (290, 'institution', 1, 300);
INSERT INTO public.document_link VALUES (291, 'legaldocument', 1, 301);
INSERT INTO public.document_link VALUES (292, 'institution', 1, 302);
INSERT INTO public.document_link VALUES (293, 'institution', 1, 303);
INSERT INTO public.document_link VALUES (294, 'procedure', -1, 304);
INSERT INTO public.document_link VALUES (295, 'procedure', 1, 305);
INSERT INTO public.document_link VALUES (296, 'department', 2, 306);
INSERT INTO public.document_link VALUES (297, 'department', 1, 307);
INSERT INTO public.document_link VALUES (298, 'examlist', -1, 308);
INSERT INTO public.document_link VALUES (299, 'examlist', 102, 309);
INSERT INTO public.document_link VALUES (300, 'examlist_otherdocument', 103, 310);
INSERT INTO public.document_link VALUES (301, 'staff_member', 14, 311);
INSERT INTO public.document_link VALUES (302, 'staff_formation', 5, 312);
INSERT INTO public.document_link VALUES (303, 'device', 10, 313);
INSERT INTO public.document_link VALUES (304, 'device_installation', 9, 314);
INSERT INTO public.document_link VALUES (305, 'device_inspection', 5, 315);
INSERT INTO public.document_link VALUES (306, 'device_maintenance', 4, 316);
INSERT INTO public.document_link VALUES (307, 'report', 5, 317);
INSERT INTO public.document_link VALUES (308, 'audit', -1, 318);
INSERT INTO public.document_link VALUES (309, 'audit', 14, 319);
INSERT INTO public.document_link VALUES (310, 'afcnsend', -1, 320);
INSERT INTO public.document_link VALUES (311, 'afcnsend', -1, 321);
INSERT INTO public.document_link VALUES (312, 'afcnsend', 9, 322);
INSERT INTO public.document_link VALUES (313, 'afcnsend', 10, 323);
INSERT INTO public.document_link VALUES (314, 'afcnsend', 9, 324);
INSERT INTO public.document_link VALUES (315, 'procedure', 2, 325);
INSERT INTO public.document_link VALUES (316, 'procedure', 6, 326);
INSERT INTO public.document_link VALUES (317, 'report', 22, 327);
INSERT INTO public.document_link VALUES (318, 'report', 25, 328);
INSERT INTO public.document_link VALUES (319, 'procedure', 1, 329);
INSERT INTO public.document_link VALUES (320, 'procedure', 6, 330);
INSERT INTO public.document_link VALUES (321, 'procedure', 5, 331);
INSERT INTO public.document_link VALUES (322, 'procedure', 8, 332);
INSERT INTO public.document_link VALUES (323, 'procedure', 7, 333);
INSERT INTO public.document_link VALUES (324, 'procedure', 3, 334);
INSERT INTO public.document_link VALUES (325, 'procedure', 2, 335);
INSERT INTO public.document_link VALUES (326, 'examlist_otherdocument', 102, 336);
INSERT INTO public.document_link VALUES (327, 'survey', 1, 337);
INSERT INTO public.document_link VALUES (328, 'legaldocument', 28, 343);
INSERT INTO public.document_link VALUES (329, 'legaldocument', 28, 344);
INSERT INTO public.document_link VALUES (330, 'procedure', 22, 345);
INSERT INTO public.document_link VALUES (331, 'examlist', 103, 346);
INSERT INTO public.document_link VALUES (332, 'examlist', 144, 347);
INSERT INTO public.document_link VALUES (333, 'examlist', 119, 348);
INSERT INTO public.document_link VALUES (334, 'institution', 2, 349);
INSERT INTO public.document_link VALUES (335, 'examlist_otherdocument', 102, 350);
INSERT INTO public.document_link VALUES (336, 'examlist_otherdocument', 102, 351);
INSERT INTO public.document_link VALUES (337, 'examlist_otherdocument', 102, 352);
INSERT INTO public.document_link VALUES (338, 'examlist', 118, 353);
INSERT INTO public.document_link VALUES (339, 'examlist', 118, 354);
INSERT INTO public.document_link VALUES (340, 'examlist', 121, 355);
INSERT INTO public.document_link VALUES (341, 'examlist', 121, 356);
INSERT INTO public.document_link VALUES (342, 'examlist', 121, 357);
INSERT INTO public.document_link VALUES (343, 'procedure', 24, 358);
INSERT INTO public.document_link VALUES (344, 'procedure', 24, 359);
INSERT INTO public.document_link VALUES (345, 'procedure', 25, 360);
INSERT INTO public.document_link VALUES (346, 'procedure', 26, NULL);
INSERT INTO public.document_link VALUES (347, 'procedure', 26, 364);
INSERT INTO public.document_link VALUES (348, 'procedure', 26, 365);
INSERT INTO public.document_link VALUES (349, 'procedure', 27, 368);
INSERT INTO public.document_link VALUES (350, 'procedure', 27, 369);
INSERT INTO public.document_link VALUES (351, 'procedure', -1, 370);
INSERT INTO public.document_link VALUES (352, 'procedure', 24, 371);
INSERT INTO public.document_link VALUES (353, 'procedure', 24, 372);
INSERT INTO public.document_link VALUES (354, 'procedure', 24, 373);
INSERT INTO public.document_link VALUES (355, 'procedure', 24, 374);
INSERT INTO public.document_link VALUES (356, 'procedure', 24, 375);
INSERT INTO public.document_link VALUES (357, 'procedure', 24, 376);
INSERT INTO public.document_link VALUES (358, 'procedure', 24, 377);
INSERT INTO public.document_link VALUES (359, 'procedure', 24, 378);
INSERT INTO public.document_link VALUES (360, 'procedure', 24, 379);
INSERT INTO public.document_link VALUES (361, 'procedure', 24, 380);
INSERT INTO public.document_link VALUES (362, 'procedure', 28, 381);
INSERT INTO public.document_link VALUES (363, 'procedure', 28, 382);
INSERT INTO public.document_link VALUES (364, 'procedure', 24, 383);
INSERT INTO public.document_link VALUES (365, 'procedure', 24, 384);
INSERT INTO public.document_link VALUES (366, 'procedure', 29, 385);
INSERT INTO public.document_link VALUES (367, 'examlist', 143, 386);
INSERT INTO public.document_link VALUES (368, 'examlist_otherdocument', 143, 387);
INSERT INTO public.document_link VALUES (369, 'institution', 2, 388);
INSERT INTO public.document_link VALUES (370, 'institution', 1, 389);
INSERT INTO public.document_link VALUES (371, 'legaldocument', 28, 390);
INSERT INTO public.document_link VALUES (372, 'procedure', 24, 391);
INSERT INTO public.document_link VALUES (373, 'procedure', 30, 392);
INSERT INTO public.document_link VALUES (374, 'procedure', 24, 393);
INSERT INTO public.document_link VALUES (375, 'procedure', 31, 394);
INSERT INTO public.document_link VALUES (376, 'procedure', 32, 395);
INSERT INTO public.document_link VALUES (377, 'procedure', 33, 396);
INSERT INTO public.document_link VALUES (378, 'procedure', 34, 397);
INSERT INTO public.document_link VALUES (379, 'procedure', 35, 398);
INSERT INTO public.document_link VALUES (380, 'procedure', 27, 399);
INSERT INTO public.document_link VALUES (381, 'procedure', 36, 400);
INSERT INTO public.document_link VALUES (382, 'procedure', 37, 401);
INSERT INTO public.document_link VALUES (383, 'procedure', 38, 402);
INSERT INTO public.document_link VALUES (384, 'procedure', 39, 403);
INSERT INTO public.document_link VALUES (385, 'procedure', 40, 404);
INSERT INTO public.document_link VALUES (386, 'procedure', 41, 405);
INSERT INTO public.document_link VALUES (387, 'procedure', 42, 406);
INSERT INTO public.document_link VALUES (388, 'procedure', 42, 410);


--
-- TOC entry 5652 (class 0 OID 25236)
-- Dependencies: 248
-- Data for Name: document_master; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.document_master VALUES (266, 'Test 1002', true);
INSERT INTO public.document_master VALUES (269, 'BQUAAD 001', false);
INSERT INTO public.document_master VALUES (271, 'Test Inst 1000', false);
INSERT INTO public.document_master VALUES (273, 'Test Inst 1000', false);
INSERT INTO public.document_master VALUES (277, 'Dep 001', false);
INSERT INTO public.document_master VALUES (281, 'CV', false);
INSERT INTO public.document_master VALUES (282, 'Formation 001', false);
INSERT INTO public.document_master VALUES (284, 'Device install 001', false);
INSERT INTO public.document_master VALUES (286, 'Device maintenance 001', false);
INSERT INTO public.document_master VALUES (288, 'Audit 001', true);
INSERT INTO public.document_master VALUES (290, 'Test', true);
INSERT INTO public.document_master VALUES (292, 'Test001111', false);
INSERT INTO public.document_master VALUES (294, 'Test002', false);
INSERT INTO public.document_master VALUES (295, 'Autorisation', false);
INSERT INTO public.document_master VALUES (297, '', false);
INSERT INTO public.document_master VALUES (301, 'PQ005', false);
INSERT INTO public.document_master VALUES (304, 'Conclusion enquête', false);
INSERT INTO public.document_master VALUES (305, 'Doc 001', false);
INSERT INTO public.document_master VALUES (307, 'Doc 002', false);
INSERT INTO public.document_master VALUES (309, 'Doc004', false);
INSERT INTO public.document_master VALUES (311, 'PQ-005', false);
INSERT INTO public.document_master VALUES (299, 'PQ003', false);
INSERT INTO public.document_master VALUES (267, 'Test 1003', true);
INSERT INTO public.document_master VALUES (276, 'Dep 001', true);
INSERT INTO public.document_master VALUES (278, 'Exam 001', false);
INSERT INTO public.document_master VALUES (283, 'Device info 001', false);
INSERT INTO public.document_master VALUES (285, 'Device inspect 001', false);
INSERT INTO public.document_master VALUES (287, 'Incident 001', false);
INSERT INTO public.document_master VALUES (291, 'Test1', true);
INSERT INTO public.document_master VALUES (293, 'Test002', false);
INSERT INTO public.document_master VALUES (298, 'Incident 123', false);
INSERT INTO public.document_master VALUES (300, 'PQ004', false);
INSERT INTO public.document_master VALUES (262, 'Doc 1.4', false);
INSERT INTO public.document_master VALUES (306, 'Doc 001', false);
INSERT INTO public.document_master VALUES (308, 'Doc003', false);
INSERT INTO public.document_master VALUES (289, 'Audit 001', false);
INSERT INTO public.document_master VALUES (302, 'PQ006', false);
INSERT INTO public.document_master VALUES (341, 'Gestion documentaire', false);
INSERT INTO public.document_master VALUES (353, 'Gestion documentaire', false);
INSERT INTO public.document_master VALUES (275, 'Proc 001', false);
INSERT INTO public.document_master VALUES (313, 'AAAAAAA', false);
INSERT INTO public.document_master VALUES (352, '', true);
INSERT INTO public.document_master VALUES (370, '', false);
INSERT INTO public.document_master VALUES (351, '', true);
INSERT INTO public.document_master VALUES (354, '', true);
INSERT INTO public.document_master VALUES (372, 'Test 003', false);
INSERT INTO public.document_master VALUES (356, '', false);
INSERT INTO public.document_master VALUES (357, '', false);
INSERT INTO public.document_master VALUES (358, '', false);
INSERT INTO public.document_master VALUES (359, 'Inst 002', false);
INSERT INTO public.document_master VALUES (312, 'Test', false);
INSERT INTO public.document_master VALUES (280, 'Patient sheet 001', false);
INSERT INTO public.document_master VALUES (314, 'Test', false);
INSERT INTO public.document_master VALUES (303, 'Fiche patient', false);
INSERT INTO public.document_master VALUES (270, 'Test Inst 1000', true);
INSERT INTO public.document_master VALUES (272, 'Test Inst 1000000', true);
INSERT INTO public.document_master VALUES (268, 'Test 10033', true);
INSERT INTO public.document_master VALUES (265, 'Test 1001', true);
INSERT INTO public.document_master VALUES (264, 'Test 1000', true);
INSERT INTO public.document_master VALUES (263, 'Doc 0022', true);
INSERT INTO public.document_master VALUES (315, 'Inst 001', false);
INSERT INTO public.document_master VALUES (360, '', false);
INSERT INTO public.document_master VALUES (377, 'Test 008', false);
INSERT INTO public.document_master VALUES (316, 'eoDACS', false);
INSERT INTO public.document_master VALUES (317, '', false);
INSERT INTO public.document_master VALUES (318, '', false);
INSERT INTO public.document_master VALUES (319, 'eoDACS', true);
INSERT INTO public.document_master VALUES (310, 'Doc 00555', true);
INSERT INTO public.document_master VALUES (355, '', true);
INSERT INTO public.document_master VALUES (320, 'eoDACS 1', false);
INSERT INTO public.document_master VALUES (279, 'Exam 00112', false);
INSERT INTO public.document_master VALUES (321, 'eoDACS', false);
INSERT INTO public.document_master VALUES (322, 'eoDACS', false);
INSERT INTO public.document_master VALUES (323, '', false);
INSERT INTO public.document_master VALUES (324, 'eoDACS', true);
INSERT INTO public.document_master VALUES (326, 'Test', false);
INSERT INTO public.document_master VALUES (327, 'Test', false);
INSERT INTO public.document_master VALUES (328, 'Test', false);
INSERT INTO public.document_master VALUES (329, 'Test', false);
INSERT INTO public.document_master VALUES (330, 'Test', false);
INSERT INTO public.document_master VALUES (331, 'Test', false);
INSERT INTO public.document_master VALUES (332, 'Test', false);
INSERT INTO public.document_master VALUES (333, 'Test', false);
INSERT INTO public.document_master VALUES (334, 'Test', true);
INSERT INTO public.document_master VALUES (335, 'Test', false);
INSERT INTO public.document_master VALUES (337, '', false);
INSERT INTO public.document_master VALUES (338, '', false);
INSERT INTO public.document_master VALUES (339, '', true);
INSERT INTO public.document_master VALUES (336, 'Test', true);
INSERT INTO public.document_master VALUES (274, 'Proc 001', true);
INSERT INTO public.document_master VALUES (325, 'eoDACS', true);
INSERT INTO public.document_master VALUES (342, '', true);
INSERT INTO public.document_master VALUES (343, '', true);
INSERT INTO public.document_master VALUES (344, '', true);
INSERT INTO public.document_master VALUES (345, '', true);
INSERT INTO public.document_master VALUES (346, '', true);
INSERT INTO public.document_master VALUES (347, '', true);
INSERT INTO public.document_master VALUES (348, '', true);
INSERT INTO public.document_master VALUES (349, '', true);
INSERT INTO public.document_master VALUES (350, '', true);
INSERT INTO public.document_master VALUES (361, 'Test 0011', false);
INSERT INTO public.document_master VALUES (363, '', false);
INSERT INTO public.document_master VALUES (362, '', true);
INSERT INTO public.document_master VALUES (364, '', false);
INSERT INTO public.document_master VALUES (365, '', false);
INSERT INTO public.document_master VALUES (366, '', false);
INSERT INTO public.document_master VALUES (367, '', false);
INSERT INTO public.document_master VALUES (368, '', false);
INSERT INTO public.document_master VALUES (369, '', false);
INSERT INTO public.document_master VALUES (340, '', true);
INSERT INTO public.document_master VALUES (373, '', false);
INSERT INTO public.document_master VALUES (374, '', false);
INSERT INTO public.document_master VALUES (371, '', false);
INSERT INTO public.document_master VALUES (376, '', false);
INSERT INTO public.document_master VALUES (375, '', false);
INSERT INTO public.document_master VALUES (296, 'Radioprotection', false);


--
-- TOC entry 5654 (class 0 OID 25243)
-- Dependencies: 250
-- Data for Name: documentstatus; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.documentstatus VALUES (298, '2024-09-13 17:36:14.275361+02', '2999-12-31 00:00:00+01', 286, 2);
INSERT INTO public.documentstatus VALUES (300, '2024-09-13 17:39:58.306765+02', '2999-12-31 00:00:00+01', 287, 2);
INSERT INTO public.documentstatus VALUES (302, '2024-09-13 18:03:14.102167+02', '2999-12-31 00:00:00+01', 288, 2);
INSERT INTO public.documentstatus VALUES (311, '2024-09-18 08:43:42.230785+02', '2999-12-31 00:00:00+01', 296, 2);
INSERT INTO public.documentstatus VALUES (316, '2024-09-18 11:37:04.092036+02', '2999-12-31 00:00:00+01', 300, 2);
INSERT INTO public.documentstatus VALUES (319, '2024-09-18 11:42:43.417744+02', '2999-12-31 00:00:00+01', 302, 2);
INSERT INTO public.documentstatus VALUES (346, '2025-01-08 14:25:36.837761+01', '2999-12-31 00:00:00+01', 305, 2);
INSERT INTO public.documentstatus VALUES (348, '2025-01-08 14:26:13.827383+01', '2999-12-31 00:00:00+01', 326, 2);
INSERT INTO public.documentstatus VALUES (354, '2025-01-08 14:29:28.125902+01', '2999-12-31 00:00:00+01', 325, 2);
INSERT INTO public.documentstatus VALUES (359, '2025-03-06 10:33:23.036646+01', '2999-12-31 00:00:00+01', 343, 2);
INSERT INTO public.documentstatus VALUES (297, '2024-09-13 17:35:51.117004+02', '2024-09-13 17:36:14.275361+02', 286, 14);
INSERT INTO public.documentstatus VALUES (299, '2024-09-13 17:36:14.286246+02', '2024-09-13 17:39:58.306765+02', 287, 14);
INSERT INTO public.documentstatus VALUES (301, '2024-09-13 17:39:58.342484+02', '2024-09-13 18:03:14.102167+02', 288, 14);
INSERT INTO public.documentstatus VALUES (303, '2024-09-13 18:03:14.113488+02', '2999-12-31 00:00:00+01', 289, 14);
INSERT INTO public.documentstatus VALUES (304, '2024-09-16 09:24:42.671424+02', '2999-12-31 00:00:00+01', 290, 14);
INSERT INTO public.documentstatus VALUES (305, '2024-09-17 17:30:17.062224+02', '2999-12-31 00:00:00+01', 291, 14);
INSERT INTO public.documentstatus VALUES (306, '2024-09-17 17:32:01.370536+02', '2999-12-31 00:00:00+01', 292, 14);
INSERT INTO public.documentstatus VALUES (307, '2024-09-17 17:32:35.91538+02', '2999-12-31 00:00:00+01', 293, 14);
INSERT INTO public.documentstatus VALUES (308, '2024-09-17 17:34:29.530639+02', '2999-12-31 00:00:00+01', 294, 14);
INSERT INTO public.documentstatus VALUES (309, '2024-09-17 17:35:04.602741+02', '2999-12-31 00:00:00+01', 295, 14);
INSERT INTO public.documentstatus VALUES (310, '2024-09-18 08:23:34.524069+02', '2024-09-18 08:43:42.230785+02', 296, 14);
INSERT INTO public.documentstatus VALUES (312, '2024-09-18 08:43:42.242855+02', '2999-12-31 00:00:00+01', 297, 14);
INSERT INTO public.documentstatus VALUES (313, '2024-09-18 11:26:21.357335+02', '2999-12-31 00:00:00+01', 298, 14);
INSERT INTO public.documentstatus VALUES (314, '2024-09-18 11:27:08.452999+02', '2999-12-31 00:00:00+01', 299, 14);
INSERT INTO public.documentstatus VALUES (315, '2024-09-18 11:35:53.848721+02', '2024-09-18 11:37:04.092036+02', 300, 14);
INSERT INTO public.documentstatus VALUES (317, '2024-09-18 11:37:04.102702+02', '2999-12-31 00:00:00+01', 301, 14);
INSERT INTO public.documentstatus VALUES (318, '2024-09-18 11:42:19.126112+02', '2024-09-18 11:42:43.417744+02', 302, 14);
INSERT INTO public.documentstatus VALUES (320, '2024-09-18 11:42:43.425651+02', '2999-12-31 00:00:00+01', 303, 14);
INSERT INTO public.documentstatus VALUES (321, '2024-09-18 11:54:01.06323+02', '2999-12-31 00:00:00+01', 304, 14);
INSERT INTO public.documentstatus VALUES (323, '2024-09-18 14:13:01.298608+02', '2999-12-31 00:00:00+01', 306, 14);
INSERT INTO public.documentstatus VALUES (324, '2024-09-18 14:30:59.277302+02', '2999-12-31 00:00:00+01', 307, 14);
INSERT INTO public.documentstatus VALUES (325, '2024-09-18 17:46:17.950065+02', '2999-12-31 00:00:00+01', 308, 14);
INSERT INTO public.documentstatus VALUES (326, '2024-09-18 17:53:57.520698+02', '2999-12-31 00:00:00+01', 309, 14);
INSERT INTO public.documentstatus VALUES (327, '2024-09-18 17:54:35.568684+02', '2999-12-31 00:00:00+01', 310, 14);
INSERT INTO public.documentstatus VALUES (328, '2024-09-18 18:12:31.706018+02', '2999-12-31 00:00:00+01', 311, 14);
INSERT INTO public.documentstatus VALUES (329, '2024-09-19 09:14:50.904832+02', '2999-12-31 00:00:00+01', 312, 14);
INSERT INTO public.documentstatus VALUES (330, '2024-09-19 17:41:21.27163+02', '2999-12-31 00:00:00+01', 313, 14);
INSERT INTO public.documentstatus VALUES (331, '2024-09-19 17:49:00.054856+02', '2999-12-31 00:00:00+01', 314, 14);
INSERT INTO public.documentstatus VALUES (332, '2024-09-19 17:58:16.603142+02', '2999-12-31 00:00:00+01', 315, 14);
INSERT INTO public.documentstatus VALUES (333, '2024-09-19 18:03:41.736573+02', '2999-12-31 00:00:00+01', 316, 14);
INSERT INTO public.documentstatus VALUES (334, '2024-09-19 18:15:59.072386+02', '2999-12-31 00:00:00+01', 317, 14);
INSERT INTO public.documentstatus VALUES (335, '2024-09-19 18:23:30.79973+02', '2999-12-31 00:00:00+01', 318, 14);
INSERT INTO public.documentstatus VALUES (336, '2024-09-19 18:29:30.11831+02', '2999-12-31 00:00:00+01', 319, 14);
INSERT INTO public.documentstatus VALUES (337, '2024-09-24 17:36:05.579301+02', '2999-12-31 00:00:00+01', 320, 14);
INSERT INTO public.documentstatus VALUES (338, '2024-09-24 17:36:43.273163+02', '2999-12-31 00:00:00+01', 321, 14);
INSERT INTO public.documentstatus VALUES (339, '2024-09-24 17:39:58.796504+02', '2999-12-31 00:00:00+01', 322, 14);
INSERT INTO public.documentstatus VALUES (340, '2024-09-24 17:42:05.675704+02', '2999-12-31 00:00:00+01', 323, 14);
INSERT INTO public.documentstatus VALUES (341, '2024-09-25 09:59:21.903144+02', '2999-12-31 00:00:00+01', 324, 14);
INSERT INTO public.documentstatus VALUES (344, '2024-10-04 16:19:38.444917+02', '2999-12-31 00:00:00+01', 327, 14);
INSERT INTO public.documentstatus VALUES (345, '2024-10-04 16:20:47.739968+02', '2999-12-31 00:00:00+01', 328, 14);
INSERT INTO public.documentstatus VALUES (322, '2024-09-18 11:55:37.235086+02', '2025-01-08 14:25:36.837761+01', 305, 14);
INSERT INTO public.documentstatus VALUES (349, '2025-01-08 14:26:13.870615+01', '2025-05-14 17:51:16.277688+02', 330, 14);
INSERT INTO public.documentstatus VALUES (343, '2024-10-03 19:30:41.843106+02', '2025-01-08 14:26:13.827383+01', 326, 14);
INSERT INTO public.documentstatus VALUES (350, '2025-01-08 14:26:45.174006+01', '2025-08-27 15:28:40.770301+02', 331, 14);
INSERT INTO public.documentstatus VALUES (351, '2025-01-08 14:27:30.300431+01', '2999-12-31 00:00:00+01', 332, 14);
INSERT INTO public.documentstatus VALUES (352, '2025-01-08 14:28:00.079709+01', '2999-12-31 00:00:00+01', 333, 14);
INSERT INTO public.documentstatus VALUES (353, '2025-01-08 14:28:28.700293+01', '2999-12-31 00:00:00+01', 334, 14);
INSERT INTO public.documentstatus VALUES (342, '2024-10-03 19:00:27.075848+02', '2025-01-08 14:29:28.125902+01', 325, 14);
INSERT INTO public.documentstatus VALUES (355, '2025-01-08 14:29:28.136397+01', '2999-12-31 00:00:00+01', 335, 14);
INSERT INTO public.documentstatus VALUES (356, '2025-01-14 09:56:03.200415+01', '2999-12-31 00:00:00+01', 336, 14);
INSERT INTO public.documentstatus VALUES (357, '2025-02-19 18:31:17.557342+01', '2999-12-31 00:00:00+01', 337, 14);
INSERT INTO public.documentstatus VALUES (358, '2025-03-06 10:32:45.597766+01', '2025-03-06 10:33:23.036646+01', 343, 14);
INSERT INTO public.documentstatus VALUES (360, '2025-03-06 10:33:23.049252+01', '2999-12-31 00:00:00+01', 344, 14);
INSERT INTO public.documentstatus VALUES (361, '2025-03-07 14:12:01.348183+01', '2999-12-31 00:00:00+01', 345, 14);
INSERT INTO public.documentstatus VALUES (362, '2025-04-24 11:16:12.941133+02', '2999-12-31 00:00:00+01', 346, 14);
INSERT INTO public.documentstatus VALUES (363, '2025-04-25 15:00:15.986289+02', '2999-12-31 00:00:00+01', 347, 14);
INSERT INTO public.documentstatus VALUES (364, '2025-04-30 10:30:00.574927+02', '2999-12-31 00:00:00+01', 348, 14);
INSERT INTO public.documentstatus VALUES (365, '2025-04-30 17:28:24.59754+02', '2999-12-31 00:00:00+01', 349, 14);
INSERT INTO public.documentstatus VALUES (366, '2025-05-05 15:35:44.557291+02', '2999-12-31 00:00:00+01', 350, 1);
INSERT INTO public.documentstatus VALUES (367, '2025-05-05 15:36:27.609904+02', '2999-12-31 00:00:00+01', 351, 1);
INSERT INTO public.documentstatus VALUES (368, '2025-05-05 15:37:16.454912+02', '2999-12-31 00:00:00+01', 352, 1);
INSERT INTO public.documentstatus VALUES (369, '2025-05-05 15:38:50.103631+02', '2999-12-31 00:00:00+01', 353, 1);
INSERT INTO public.documentstatus VALUES (370, '2025-05-05 15:50:09.583015+02', '2025-05-05 16:16:58.303422+02', 354, 1);
INSERT INTO public.documentstatus VALUES (371, '2025-05-05 16:16:58.303422+02', '2025-05-05 16:17:16.33181+02', 354, 10);
INSERT INTO public.documentstatus VALUES (372, '2025-05-05 16:17:16.33181+02', '2999-12-31 00:00:00+01', 354, 11);
INSERT INTO public.documentstatus VALUES (373, '2025-05-05 18:49:19.589434+02', '2999-12-31 00:00:00+01', 357, 10);
INSERT INTO public.documentstatus VALUES (374, '2025-05-05 19:34:46.010205+02', '2999-12-31 00:00:00+01', 358, 10);
INSERT INTO public.documentstatus VALUES (375, '2025-05-05 19:35:29.045345+02', '2999-12-31 00:00:00+01', 359, 10);
INSERT INTO public.documentstatus VALUES (376, '2025-05-06 09:20:34.070396+02', '2999-12-31 00:00:00+01', 360, 10);
INSERT INTO public.documentstatus VALUES (377, '2025-05-06 10:34:53.05182+02', '2999-12-31 00:00:00+01', 364, 10);
INSERT INTO public.documentstatus VALUES (378, '2025-05-06 10:44:41.342326+02', '2999-12-31 00:00:00+01', 365, 10);
INSERT INTO public.documentstatus VALUES (379, '2025-05-06 17:42:28.316474+02', '2999-12-31 00:00:00+01', 368, 10);
INSERT INTO public.documentstatus VALUES (380, '2025-05-06 17:49:13.898434+02', '2999-12-31 00:00:00+01', 369, 10);
INSERT INTO public.documentstatus VALUES (381, '2025-05-07 11:44:43.37793+02', '2999-12-31 00:00:00+01', 370, 10);
INSERT INTO public.documentstatus VALUES (382, '2025-05-07 11:48:39.497191+02', '2999-12-31 00:00:00+01', 371, 10);
INSERT INTO public.documentstatus VALUES (383, '2025-05-07 11:54:49.258989+02', '2999-12-31 00:00:00+01', 372, 10);
INSERT INTO public.documentstatus VALUES (384, '2025-05-07 11:57:31.360801+02', '2999-12-31 00:00:00+01', 373, 10);
INSERT INTO public.documentstatus VALUES (385, '2025-05-07 12:09:21.697345+02', '2999-12-31 00:00:00+01', 374, 10);
INSERT INTO public.documentstatus VALUES (386, '2025-05-07 12:13:20.846533+02', '2999-12-31 00:00:00+01', 375, 10);
INSERT INTO public.documentstatus VALUES (387, '2025-05-07 12:17:00.9+02', '2999-12-31 00:00:00+01', 376, 10);
INSERT INTO public.documentstatus VALUES (388, '2025-05-07 12:20:02.37798+02', '2999-12-31 00:00:00+01', 377, 10);
INSERT INTO public.documentstatus VALUES (389, '2025-05-07 12:21:41.423292+02', '2999-12-31 00:00:00+01', 378, 10);
INSERT INTO public.documentstatus VALUES (390, '2025-05-07 12:22:43.84996+02', '2999-12-31 00:00:00+01', 379, 10);
INSERT INTO public.documentstatus VALUES (391, '2025-05-07 12:29:28.65177+02', '2025-05-07 12:48:25.722984+02', 380, 10);
INSERT INTO public.documentstatus VALUES (392, '2025-05-07 12:48:25.722984+02', '2025-05-07 13:59:17.74303+02', 380, 14);
INSERT INTO public.documentstatus VALUES (393, '2025-05-07 13:59:17.74303+02', '2025-05-07 13:59:26.414897+02', 380, 10);
INSERT INTO public.documentstatus VALUES (394, '2025-05-07 13:59:26.414897+02', '2025-05-07 14:57:07.377149+02', 380, 14);
INSERT INTO public.documentstatus VALUES (395, '2025-05-07 14:57:07.377149+02', '2025-05-07 15:30:07.681829+02', 380, 10);
INSERT INTO public.documentstatus VALUES (396, '2025-05-07 15:30:07.681829+02', '2025-05-07 15:32:17.701336+02', 380, 14);
INSERT INTO public.documentstatus VALUES (397, '2025-05-07 15:32:17.701336+02', '2025-05-07 15:32:27.742909+02', 380, 10);
INSERT INTO public.documentstatus VALUES (398, '2025-05-07 15:32:27.742909+02', '2025-05-07 15:33:12.159291+02', 380, 14);
INSERT INTO public.documentstatus VALUES (399, '2025-05-07 15:33:12.159291+02', '2025-05-07 15:42:52.115474+02', 380, 10);
INSERT INTO public.documentstatus VALUES (400, '2025-05-07 15:42:52.115474+02', '2999-12-31 00:00:00+01', 380, 14);
INSERT INTO public.documentstatus VALUES (401, '2025-05-07 15:44:12.887101+02', '2025-05-07 15:46:47.769833+02', 381, 10);
INSERT INTO public.documentstatus VALUES (402, '2025-05-07 15:46:47.769833+02', '2999-12-31 00:00:00+01', 381, 14);
INSERT INTO public.documentstatus VALUES (403, '2025-05-07 16:01:47.871675+02', '2025-05-07 16:02:27.731267+02', 382, 10);
INSERT INTO public.documentstatus VALUES (405, '2025-05-07 16:46:46.23142+02', '2999-12-31 00:00:00+01', 383, 10);
INSERT INTO public.documentstatus VALUES (406, '2025-05-07 16:49:34.123256+02', '2999-12-31 00:00:00+01', 384, 10);
INSERT INTO public.documentstatus VALUES (404, '2025-05-07 16:02:27.731267+02', '2025-05-07 16:51:19.600142+02', 382, 14);
INSERT INTO public.documentstatus VALUES (407, '2025-05-07 16:51:19.600142+02', '2025-05-07 16:51:27.49364+02', 382, 10);
INSERT INTO public.documentstatus VALUES (409, '2025-05-07 16:52:24.9426+02', '2025-05-07 16:52:51.804338+02', 385, 10);
INSERT INTO public.documentstatus VALUES (410, '2025-05-07 16:52:51.804338+02', '2999-12-31 00:00:00+01', 385, 14);
INSERT INTO public.documentstatus VALUES (411, '2025-05-07 18:14:36.730265+02', '2025-05-07 18:24:45.184956+02', 386, 10);
INSERT INTO public.documentstatus VALUES (412, '2025-05-07 18:24:45.184956+02', '2999-12-31 00:00:00+01', 386, 14);
INSERT INTO public.documentstatus VALUES (413, '2025-05-07 18:27:15.254299+02', '2025-05-07 18:27:38.907544+02', 387, 10);
INSERT INTO public.documentstatus VALUES (414, '2025-05-07 18:27:38.907544+02', '2999-12-31 00:00:00+01', 387, 14);
INSERT INTO public.documentstatus VALUES (415, '2025-05-07 18:33:21.01581+02', '2999-12-31 00:00:00+01', 388, 10);
INSERT INTO public.documentstatus VALUES (416, '2025-05-07 18:40:27.609398+02', '2025-05-07 18:42:23.187284+02', 389, 10);
INSERT INTO public.documentstatus VALUES (417, '2025-05-07 18:42:23.187284+02', '2999-12-31 00:00:00+01', 389, 14);
INSERT INTO public.documentstatus VALUES (418, '2025-05-07 18:50:05.701525+02', '2025-05-07 18:56:51.138747+02', 390, 10);
INSERT INTO public.documentstatus VALUES (419, '2025-05-07 18:56:51.138747+02', '2999-12-31 00:00:00+01', 390, 14);
INSERT INTO public.documentstatus VALUES (408, '2025-05-07 16:51:27.49364+02', '2025-05-09 08:14:38.790438+02', 382, 14);
INSERT INTO public.documentstatus VALUES (421, '2025-05-09 14:24:08.346481+02', '2025-05-09 14:24:38.450722+02', 391, 10);
INSERT INTO public.documentstatus VALUES (422, '2025-05-09 14:24:38.450722+02', '2999-12-31 00:00:00+01', 391, 12);
INSERT INTO public.documentstatus VALUES (423, '2025-05-09 14:53:44.983956+02', '2999-12-31 00:00:00+01', 392, 10);
INSERT INTO public.documentstatus VALUES (424, '2025-05-09 15:35:29.232226+02', '2999-12-31 00:00:00+01', 393, 10);
INSERT INTO public.documentstatus VALUES (425, '2025-05-09 15:41:09.383933+02', '2999-12-31 00:00:00+01', 394, 10);
INSERT INTO public.documentstatus VALUES (426, '2025-05-09 15:44:04.231119+02', '2999-12-31 00:00:00+01', 395, 10);
INSERT INTO public.documentstatus VALUES (347, '2025-01-08 14:25:36.903572+01', '2025-05-14 12:54:12.358857+02', 329, 14);
INSERT INTO public.documentstatus VALUES (427, '2025-05-09 16:00:41.10999+02', '2999-12-31 00:00:00+01', 396, 10);
INSERT INTO public.documentstatus VALUES (428, '2025-05-09 16:02:02.97852+02', '2999-12-31 00:00:00+01', 397, 10);
INSERT INTO public.documentstatus VALUES (429, '2025-05-09 16:05:49.203316+02', '2999-12-31 00:00:00+01', 398, 10);
INSERT INTO public.documentstatus VALUES (432, '2025-05-09 16:13:58.225504+02', '2025-05-09 16:14:35.048829+02', 401, 10);
INSERT INTO public.documentstatus VALUES (434, '2025-05-09 16:19:26.331483+02', '2999-12-31 00:00:00+01', 402, 14);
INSERT INTO public.documentstatus VALUES (435, '2025-05-09 16:43:43.816914+02', '2025-05-09 16:44:19.585202+02', 403, 10);
INSERT INTO public.documentstatus VALUES (436, '2025-05-09 16:44:19.585202+02', '2999-12-31 00:00:00+01', 403, 14);
INSERT INTO public.documentstatus VALUES (431, '2025-05-09 16:10:49.159941+02', '2025-05-10 11:35:28.821846+02', 400, 10);
INSERT INTO public.documentstatus VALUES (437, '2025-05-10 11:35:28.821846+02', '2999-12-31 00:00:00+01', 400, 14);
INSERT INTO public.documentstatus VALUES (438, '2025-05-12 09:23:51.541841+02', '2025-05-12 09:24:48.875463+02', 404, 10);
INSERT INTO public.documentstatus VALUES (439, '2025-05-12 09:24:48.875463+02', '2999-12-31 00:00:00+01', 404, 14);
INSERT INTO public.documentstatus VALUES (440, '2025-05-12 09:26:57.534872+02', '2025-05-12 09:27:08.89168+02', 405, 14);
INSERT INTO public.documentstatus VALUES (441, '2025-05-12 09:27:08.89168+02', '2025-05-12 09:27:31.883418+02', 405, 10);
INSERT INTO public.documentstatus VALUES (442, '2025-05-12 09:27:31.883418+02', '2025-05-12 09:28:14.070288+02', 405, 14);
INSERT INTO public.documentstatus VALUES (444, '2025-05-12 09:57:58.722493+02', '2025-05-12 09:59:20.446816+02', 406, 10);
INSERT INTO public.documentstatus VALUES (445, '2025-05-12 09:59:20.446816+02', '2025-05-12 10:06:51.127472+02', 406, 14);
INSERT INTO public.documentstatus VALUES (443, '2025-05-12 09:28:14.070288+02', '2025-05-13 19:12:24.73387+02', 405, 10);
INSERT INTO public.documentstatus VALUES (447, '2025-05-13 19:12:24.73387+02', '2999-12-31 00:00:00+01', 405, 11);
INSERT INTO public.documentstatus VALUES (446, '2025-05-12 10:06:51.127472+02', '2025-05-13 19:22:59.997705+02', 406, 10);
INSERT INTO public.documentstatus VALUES (448, '2025-05-13 19:22:59.997705+02', '2025-05-13 19:23:26.584499+02', 406, 11);
INSERT INTO public.documentstatus VALUES (420, '2025-05-09 08:14:38.790438+02', '2025-05-13 19:47:00.639839+02', 382, 10);
INSERT INTO public.documentstatus VALUES (450, '2025-05-13 19:47:00.639839+02', '2025-05-13 20:06:49.985293+02', 382, 12);
INSERT INTO public.documentstatus VALUES (451, '2025-05-13 20:06:49.985293+02', '2025-05-13 20:07:10.685724+02', 382, 10);
INSERT INTO public.documentstatus VALUES (452, '2025-05-13 20:07:10.685724+02', '2025-05-13 20:08:23.565809+02', 382, 11);
INSERT INTO public.documentstatus VALUES (453, '2025-05-13 20:08:23.565809+02', '2999-12-31 00:00:00+01', 382, 10);
INSERT INTO public.documentstatus VALUES (454, '2025-05-14 12:54:12.358857+02', '2025-05-14 17:43:35.445084+02', 329, 10);
INSERT INTO public.documentstatus VALUES (455, '2025-05-14 17:43:35.445084+02', '2025-05-14 17:57:28.821857+02', 329, 11);
INSERT INTO public.documentstatus VALUES (456, '2025-05-14 17:51:16.277688+02', '2025-05-15 09:45:29.838502+02', 330, 11);
INSERT INTO public.documentstatus VALUES (433, '2025-05-09 16:14:35.048829+02', '2025-05-16 16:39:41.445378+02', 401, 14);
INSERT INTO public.documentstatus VALUES (460, '2025-08-27 15:28:40.770301+02', '2999-12-31 00:00:00+01', 331, 2);
INSERT INTO public.documentstatus VALUES (458, '2025-05-15 09:45:29.838502+02', '2025-08-27 15:40:24.619809+02', 330, 14);
INSERT INTO public.documentstatus VALUES (461, '2025-08-27 15:40:24.619809+02', '2999-12-31 00:00:00+01', 330, 2);
INSERT INTO public.documentstatus VALUES (457, '2025-05-14 17:57:28.821857+02', '2025-08-27 18:18:48.28644+02', 329, 14);
INSERT INTO public.documentstatus VALUES (462, '2025-08-27 18:18:48.28644+02', '2025-08-27 18:19:14.593533+02', 329, 10);
INSERT INTO public.documentstatus VALUES (463, '2025-08-27 18:19:14.593533+02', '2025-08-27 18:19:25.380105+02', 329, 14);
INSERT INTO public.documentstatus VALUES (464, '2025-08-27 18:19:25.380105+02', '2999-12-31 00:00:00+01', 329, 2);
INSERT INTO public.documentstatus VALUES (430, '2025-05-09 16:09:53.764607+02', '2025-08-27 18:31:15.005562+02', 399, 10);
INSERT INTO public.documentstatus VALUES (465, '2025-08-27 18:31:15.005562+02', '2999-12-31 00:00:00+01', 399, 14);
INSERT INTO public.documentstatus VALUES (459, '2025-05-16 16:39:41.445378+02', '2025-08-27 18:36:17.774592+02', 401, 10);
INSERT INTO public.documentstatus VALUES (466, '2025-08-27 18:36:17.774592+02', '2999-12-31 00:00:00+01', 401, 14);
INSERT INTO public.documentstatus VALUES (449, '2025-05-13 19:23:26.584499+02', '2025-08-27 18:40:34.026453+02', 406, 10);
INSERT INTO public.documentstatus VALUES (467, '2025-08-27 18:40:34.026453+02', '2025-08-27 18:41:52.097911+02', 406, 14);
INSERT INTO public.documentstatus VALUES (468, '2025-08-27 18:41:52.097911+02', '2999-12-31 00:00:00+01', 406, 2);
INSERT INTO public.documentstatus VALUES (469, '2025-08-27 18:41:52.247647+02', '2025-08-27 18:43:15.341062+02', 410, 10);
INSERT INTO public.documentstatus VALUES (470, '2025-08-27 18:43:15.341062+02', '2999-12-31 00:00:00+01', 410, 14);


--
-- TOC entry 5730 (class 0 OID 26820)
-- Dependencies: 351
-- Data for Name: documenttypelist; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.documenttypelist VALUES (0, 'External document link');
INSERT INTO public.documenttypelist VALUES (3, 'Excel document ( .xlsx )');
INSERT INTO public.documenttypelist VALUES (2, 'Word document ( .docx )');
INSERT INTO public.documenttypelist VALUES (1, 'PDF document ( .pdf )');


--
-- TOC entry 5656 (class 0 OID 25248)
-- Dependencies: 252
-- Data for Name: enum_listvalue; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.enum_listvalue VALUES ('jobrolescope', 0, 'Institution', 'en');
INSERT INTO public.enum_listvalue VALUES ('jobrolescope', 1, 'Department', 'en');


--
-- TOC entry 5657 (class 0 OID 25253)
-- Dependencies: 253
-- Data for Name: examident; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.examident VALUES (1, '451010', 'Radiographie de l''abdomen', false);
INSERT INTO public.examident VALUES (4, 'New exam ident', 'Description', true);
INSERT INTO public.examident VALUES (5, 'XXXXXXXXXXXXX', 'Description', false);


--
-- TOC entry 5659 (class 0 OID 25260)
-- Dependencies: 255
-- Data for Name: examident_link; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.examident_link VALUES (8, 1);
INSERT INTO public.examident_link VALUES (75, 1);
INSERT INTO public.examident_link VALUES (118, 1);
INSERT INTO public.examident_link VALUES (119, 5);
INSERT INTO public.examident_link VALUES (103, 1);
INSERT INTO public.examident_link VALUES (115, 5);
INSERT INTO public.examident_link VALUES (102, 1);
INSERT INTO public.examident_link VALUES (102, 5);


--
-- TOC entry 5660 (class 0 OID 25263)
-- Dependencies: 256
-- Data for Name: examlist; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.examlist VALUES (21, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (20, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (25, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (51, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (68, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (22, 'RX', 'New exam', 'XXX', true);
INSERT INTO public.examlist VALUES (23, 'RX', 'Test001', 'Test 001', true);
INSERT INTO public.examlist VALUES (24, 'RX', 'YYY', '', true);
INSERT INTO public.examlist VALUES (54, 'TDM', 'Massif facial traumatisme maxillo-facial', '', true);
INSERT INTO public.examlist VALUES (29, 'RX', 'Cholangiographie', '', true);
INSERT INTO public.examlist VALUES (4, 'RX', 'Sialographie', 'Sialographie', true);
INSERT INTO public.examlist VALUES (34, 'RX', 'Rachis lombo-sacré', '', true);
INSERT INTO public.examlist VALUES (70, 'RX', 'Discographie arthrographie facettaires lombaires infiltrations foraminales', '', true);
INSERT INTO public.examlist VALUES (52, 'TDM', 'Massif facial dysfonctionnement rhino-sinus chronique', '', true);
INSERT INTO public.examlist VALUES (67, 'TDM', 'Exploration limitée thorax', '', true);
INSERT INTO public.examlist VALUES (63, 'TDM', 'Aorte thoraco-abdominale', '', true);
INSERT INTO public.examlist VALUES (10, 'RX', 'Estomac', 'Radiographie du colon', true);
INSERT INTO public.examlist VALUES (35, 'RX', 'Bassin standard', '', true);
INSERT INTO public.examlist VALUES (45, 'TDM', 'Lésions hépatiques hypervasculaires', '', true);
INSERT INTO public.examlist VALUES (6, 'TDM', 'Abdo-pelv standard', '', true);
INSERT INTO public.examlist VALUES (39, 'RX', 'UIV contrôle simple', '', true);
INSERT INTO public.examlist VALUES (36, 'RX', 'Abdomen sans préparation', '', true);
INSERT INTO public.examlist VALUES (69, 'RX', 'Myélographie saccoradiculographie épidurographie', '', true);
INSERT INTO public.examlist VALUES (31, 'RX', 'Radio standard au lit', '', true);
INSERT INTO public.examlist VALUES (50, 'TDM', 'Encéphale standard', '', true);
INSERT INTO public.examlist VALUES (60, 'TDM', 'Vaisseaux pulmonaires', '', true);
INSERT INTO public.examlist VALUES (14, 'TDM', 'Pancréas standard', 'Scanner du pancréas standard', true);
INSERT INTO public.examlist VALUES (66, 'TDM', 'Carotide cervicale', '', true);
INSERT INTO public.examlist VALUES (59, 'TDM', 'Vaisseaux médiastinaux', '', true);
INSERT INTO public.examlist VALUES (13, 'TDM', 'Hépatique standard', 'Scanner hépatique standard', true);
INSERT INTO public.examlist VALUES (65, 'TDM', 'Contrôle endoprothèse aortique', '', true);
INSERT INTO public.examlist VALUES (2, 'RX', 'Thorax face', 'Radiographie du thorax de face', true);
INSERT INTO public.examlist VALUES (16, 'TDM', 'Pancréatique - pancréas non-tumoral', 'Scanner pancréatique - pancréas non-tumoral', true);
INSERT INTO public.examlist VALUES (62, 'TDM', 'Aorte abdominale', '', true);
INSERT INTO public.examlist VALUES (44, 'RX', 'Colpocystodéfécographie', '', true);
INSERT INTO public.examlist VALUES (11, 'RX', 'Intestin grêle', 'Radiographie de l''intestin grêle', true);
INSERT INTO public.examlist VALUES (42, 'RX', 'Cystographie suspubienne homme', '', true);
INSERT INTO public.examlist VALUES (41, 'RX', 'Cystographie rétrograde femme', '', true);
INSERT INTO public.examlist VALUES (40, 'RX', 'Urétrocystographie rétrograde homme', '', true);
INSERT INTO public.examlist VALUES (46, 'TDM', 'Ostéo-articulaire', '', true);
INSERT INTO public.examlist VALUES (43, 'RX', 'Hystérosalpingographie', '', true);
INSERT INTO public.examlist VALUES (53, 'TDM', 'Massif facial pathologie tumorale', '', true);
INSERT INTO public.examlist VALUES (32, 'RX', 'Rachis cervical', '', true);
INSERT INTO public.examlist VALUES (9, 'RX', 'Colon', 'Radiographie du colon', true);
INSERT INTO public.examlist VALUES (7, 'TDM', 'Abdomen non-traumatique aigu standard', '', true);
INSERT INTO public.examlist VALUES (38, 'RX', 'UIV avec étude mictionnelle', '', true);
INSERT INTO public.examlist VALUES (15, 'TDM', 'Pancréatique - lésions hypervasculaires', 'Scanner pancréatique - lésions hypervasculaires', true);
INSERT INTO public.examlist VALUES (48, 'TDM', 'Arthroscanner genou hanche épaule', '', true);
INSERT INTO public.examlist VALUES (26, 'RX', 'Rachis lombaire', '', true);
INSERT INTO public.examlist VALUES (12, 'TDM', 'Thorax haute résolution', 'Scanner du thorax haute résolution', true);
INSERT INTO public.examlist VALUES (57, 'TDM', 'Rénal', '', true);
INSERT INTO public.examlist VALUES (61, 'TDM', 'Artères rénales', '', true);
INSERT INTO public.examlist VALUES (19, 'Mammographie', 'Mammographie', 'Mammographie', true);
INSERT INTO public.examlist VALUES (30, 'RX', 'Thorax profil', '', true);
INSERT INTO public.examlist VALUES (49, 'TDM', 'Pelvimétrie', '', true);
INSERT INTO public.examlist VALUES (47, 'TDM', 'Rachis cervical', '', true);
INSERT INTO public.examlist VALUES (3, 'RX', 'Sinus', 'Radiographie des sinus', true);
INSERT INTO public.examlist VALUES (17, 'TDM', 'Vaisseaux hépatiques', 'Scanner des vaisseaux hépatiques', true);
INSERT INTO public.examlist VALUES (28, 'RX', 'Genou', '', true);
INSERT INTO public.examlist VALUES (37, 'RX', 'UIV standard', '', true);
INSERT INTO public.examlist VALUES (33, 'RX', 'Rachis thoracique', '', true);
INSERT INTO public.examlist VALUES (1, 'TDM', 'Thorax standard', 'Scanner thorax standard', true);
INSERT INTO public.examlist VALUES (5, 'RX', 'Panoramique dentaire', 'Panoramique dentaire', true);
INSERT INTO public.examlist VALUES (18, 'TDM', 'Rochers', 'Scanner des rochers', true);
INSERT INTO public.examlist VALUES (64, 'TDM', 'Bilan endoprothèse aortique', '', true);
INSERT INTO public.examlist VALUES (55, 'TDM', 'Cou en cancérologie', '', true);
INSERT INTO public.examlist VALUES (27, 'RX', 'Hanche', '', true);
INSERT INTO public.examlist VALUES (56, 'TDM', 'Dentaire', '', true);
INSERT INTO public.examlist VALUES (58, 'TDM', 'Tractus urinaire (sans contraste)', '', true);
INSERT INTO public.examlist VALUES (8, 'RX', 'Abdomen sans préparation', 'Radiographie de l''abdomen sans préparation', true);
INSERT INTO public.examlist VALUES (71, 'Radiographie', 'RX SINUS', 'RX SINUS', false);
INSERT INTO public.examlist VALUES (72, 'Radiographie', 'RX sialographie', 'RX sialographie', false);
INSERT INTO public.examlist VALUES (73, 'Radiographie', 'RX Pano dentaire', 'RX Pano dentaire', false);
INSERT INTO public.examlist VALUES (74, 'Radiographie', 'Rx thorax Face', 'Rx thorax Face', false);
INSERT INTO public.examlist VALUES (75, 'Radiographie', 'Rx abdomen à blanc', 'Rx abdomen à blanc', false);
INSERT INTO public.examlist VALUES (77, 'Radiographie', 'RX intestin grele', 'RX intestin grele', false);
INSERT INTO public.examlist VALUES (76, 'Radiographie', 'RX estomac', 'RX estomac', false);
INSERT INTO public.examlist VALUES (78, 'Radiographie', 'RX colon', 'RX colon', false);
INSERT INTO public.examlist VALUES (79, 'Radiographie', 'RX rachis cervical', 'RX rachis cervical', false);
INSERT INTO public.examlist VALUES (84, 'Radiographie', 'RX rachis dorsal', 'RX rachis dorsal', false);
INSERT INTO public.examlist VALUES (83, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (85, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (82, 'Radiographie', 'IN Discographie arthrographies_facettaires lombaires infiltrations foraminales', 'IN Discographie arthrographies_facettaires lombaires infiltrations foraminales', false);
INSERT INTO public.examlist VALUES (81, 'Radiographie', 'IN Myélographie saccoradiculographie épidurographie', 'IN Myélographie saccoradiculographie épidurographie', false);
INSERT INTO public.examlist VALUES (90, 'Radiographie', 'RX Uretrocystographie retrograde homme', 'RX Uretrocystographie retrograde homme', false);
INSERT INTO public.examlist VALUES (80, 'Radiographie', 'RX rachis lombaire', 'RX rachis lombaire', false);
INSERT INTO public.examlist VALUES (86, 'Radiographie', 'RX rachis lombaire', 'RX rachis lombaire', true);
INSERT INTO public.examlist VALUES (87, 'Radiographie', 'RX urographie intraveineuse', '', false);
INSERT INTO public.examlist VALUES (88, 'Radiographie', 'RX urographie intraveineuse mictionelle', 'RX urographie intraveineuse mictionelle', false);
INSERT INTO public.examlist VALUES (89, 'Radiographie', 'RX urographie intraveineuse contrôle simple', 'RX urographie intraveineuse contrôle simple', false);
INSERT INTO public.examlist VALUES (91, 'Radiographie', 'RX Cystographie suspubienne', 'RX Cystographie suspubien', false);
INSERT INTO public.examlist VALUES (92, 'Radiographie', 'RX Hysterosalpingographie', 'RX Hysterosalpingographie', false);
INSERT INTO public.examlist VALUES (93, 'Radiographie', 'RX colpocystodefecographie', 'RX colpocystodefecographie', false);
INSERT INTO public.examlist VALUES (94, 'Radiographie', 'IN rachis lombaire bloc op', 'IN rachis lombaire bloc op', false);
INSERT INTO public.examlist VALUES (95, 'Radiographie', 'IN hanche bloc op', 'IN hanche bloc op', false);
INSERT INTO public.examlist VALUES (96, 'Radiographie', 'IN cholangiographie bloc op', 'IN cholangiographie bloc op', false);
INSERT INTO public.examlist VALUES (97, 'Radiographie', 'RX radio standard au lit', 'RX radio standard au lit', false);
INSERT INTO public.examlist VALUES (98, 'Radiographie', 'RX thorax profil', 'RX thorax profil', false);
INSERT INTO public.examlist VALUES (99, 'TDM', 'CT thorax', 'CT thorax', false);
INSERT INTO public.examlist VALUES (100, 'TDM', 'CT thorax HD', 'CT thorax HD', false);
INSERT INTO public.examlist VALUES (101, 'TDM', 'CT thorax exploration limitée', 'CT thorax exploration limitée', false);
INSERT INTO public.examlist VALUES (104, 'TDM', 'CT hépatique', 'CT hépatique', false);
INSERT INTO public.examlist VALUES (105, 'TDM', 'CT pancreas', 'CT pancréas', false);
INSERT INTO public.examlist VALUES (106, 'TDM', 'CT pancréas lésions hypervascularisées', 'CT pancréas lésions hypervascularisées', false);
INSERT INTO public.examlist VALUES (107, 'TDM', 'CT vaisseaux hépatiques', 'CT vaisseaux hépatiques', false);
INSERT INTO public.examlist VALUES (108, 'TDM', 'CT encéphale standard', 'CT encéphale standard', false);
INSERT INTO public.examlist VALUES (109, 'TDM', 'CT Massif facial pour dysfonctionnement rhino-sinusien chronique', 'CT Massif facial pour dysfonctionnement rhino-sinusien chronique', false);
INSERT INTO public.examlist VALUES (110, 'TDM', 'CT massif facial pour tumeur', 'CT massif facial pour tumeur', false);
INSERT INTO public.examlist VALUES (111, 'TDM', 'CT massif facial trauma', 'CT massif facial trauma', false);
INSERT INTO public.examlist VALUES (112, 'TDM', 'CT rochers', 'CT rochers', false);
INSERT INTO public.examlist VALUES (113, 'TDM', 'CT dentaire', 'CT dentaire', false);
INSERT INTO public.examlist VALUES (114, 'TDM', 'CT cou onco', 'CT cou onco', false);
INSERT INTO public.examlist VALUES (116, 'TDM', 'CT urinaire sans contraste', 'CT urinaire sans contraste', false);
INSERT INTO public.examlist VALUES (117, 'TDM', 'CT vaisseaux intestinaux', 'CT vaisseaux intestinaux', false);
INSERT INTO public.examlist VALUES (123, 'TDM', 'CT controle stent', 'CT controle stent', false);
INSERT INTO public.examlist VALUES (122, 'TDM', 'CT aorte thoraco-abdominale endoprothèse', 'CT aorte thoraco-abdominale endoprothèse', false);
INSERT INTO public.examlist VALUES (124, 'TDM', 'CT angioscanner carotidien', 'CT angioscanner carotidien', false);
INSERT INTO public.examlist VALUES (125, 'TDM', 'CT rachis cervical', 'CT rachis cervical', false);
INSERT INTO public.examlist VALUES (127, 'TDM', 'CT arthroscan', 'CT arthroscan', false);
INSERT INTO public.examlist VALUES (128, 'TDM', 'CT pelvimétrie', 'CT pelvimétrie', false);
INSERT INTO public.examlist VALUES (129, 'Mammographie', 'MG mammographie', 'MG mammographie', false);
INSERT INTO public.examlist VALUES (130, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (121, 'TDM', 'CT aorte thoraco-abdominale', 'CT aorte thoraco-abdominale', false);
INSERT INTO public.examlist VALUES (120, 'TDM', 'CT aorte abdominale standard', 'CT aorte abdominale standard', false);
INSERT INTO public.examlist VALUES (103, 'TDM', 'CT abdo aigu non traumatique', 'CT abdo aigu non traumatique', false);
INSERT INTO public.examlist VALUES (119, 'TDM', 'CT angioscan rénal', 'CT angioscan rénal', false);
INSERT INTO public.examlist VALUES (131, 'TDM', 'Exam_test', 'Exam de test sans document', true);
INSERT INTO public.examlist VALUES (132, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (134, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (135, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (133, '', 'test', '', true);
INSERT INTO public.examlist VALUES (102, 'TDM', 'CT abdo-pelv', 'CT abdo-pelv', false);
INSERT INTO public.examlist VALUES (137, 'Radiographie', 'Test', '', true);
INSERT INTO public.examlist VALUES (138, 'TDM', 'New exam', 'bbbbbbbbbbb', true);
INSERT INTO public.examlist VALUES (139, NULL, 'New exam', NULL, true);
INSERT INTO public.examlist VALUES (136, 'RX', 'New 001', 'aaaaaaaaaaaa', true);
INSERT INTO public.examlist VALUES (140, 'TDM', 'New exam', 'Test', true);
INSERT INTO public.examlist VALUES (141, 'TDM', 'New exam', 'Test', false);
INSERT INTO public.examlist VALUES (142, NULL, 'New exam', NULL, false);
INSERT INTO public.examlist VALUES (144, 'RX', 'New exam 001', 'Test 1', false);
INSERT INTO public.examlist VALUES (118, 'TDM', 'CT angioscan thoracique', 'CT angioscan thoracique', false);
INSERT INTO public.examlist VALUES (115, 'TDM', 'CT abdo pelvien urinaire', 'CT abdo pelvien urinaire', false);
INSERT INTO public.examlist VALUES (126, 'TDM', 'CT Lombaire', 'CT Lombaire', true);
INSERT INTO public.examlist VALUES (145, NULL, 'New exam', NULL, false);
INSERT INTO public.examlist VALUES (146, NULL, 'New exam', NULL, false);
INSERT INTO public.examlist VALUES (147, NULL, 'New exam', NULL, false);
INSERT INTO public.examlist VALUES (143, 'TDM', 'CT Lombaire', 'CT Lombaire', false);


--
-- TOC entry 5662 (class 0 OID 25270)
-- Dependencies: 258
-- Data for Name: examwarning; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.examwarning VALUES (1, 'Rayonnements ionisants', 'Les rayonnements ionisants utilisés durant les examens radiologiques peuvent ...', false, 2, 3);
INSERT INTO public.examwarning VALUES (4, '', NULL, true, -1, -1);
INSERT INTO public.examwarning VALUES (7, 'aaaaaaaaaaaaaaassssssssssssss', NULL, true, -1, -1);
INSERT INTO public.examwarning VALUES (5, 'a000', '', true, -1, -1);
INSERT INTO public.examwarning VALUES (6, 'azerty', '', true, -1, -1);
INSERT INTO public.examwarning VALUES (3, 'Rayonnements ionsiant et grossesse', 'Test.', false, 1, 2);
INSERT INTO public.examwarning VALUES (2, 'Allergie produit de contraste', 'L''injection de produit de contraste iodé peut provoquée une réaction allergoïde allant d''une simple sensation de démangeaison jusqu''au choc anaphylactique et à l’œdème de Quincke pouvant comporter un risque pour le patient.', false, 2, 3);
INSERT INTO public.examwarning VALUES (8, 'New Warning', NULL, true, -1, -1);
INSERT INTO public.examwarning VALUES (9, 'New Warning gggggggg', '', true, NULL, NULL);
INSERT INTO public.examwarning VALUES (10, 'New Warning', NULL, true, -1, -1);
INSERT INTO public.examwarning VALUES (11, 'New Warninggggggggggggg', '', true, NULL, NULL);


--
-- TOC entry 5664 (class 0 OID 25277)
-- Dependencies: 260
-- Data for Name: examwarning_link; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO public.examwarning_link VALUES (1, 1);
INSERT INTO public.examwarning_link VALUES (2, 1);
INSERT INTO public.examwarning_link VALUES (3, 1);
INSERT INTO public.examwarning_link VALUES (4, 1);
INSERT INTO public.examwarning_link VALUES (5, 1);
INSERT INTO public.examwarning_link VALUES (1, 2);
INSERT INTO public.examwarning_link VALUES (6, 1);
INSERT INTO public.examwarning_link VALUES (6, 2);
INSERT INTO public.examwarning_link VALUES (7, 1);
INSERT INTO public.examwarning_link VALUES (7, 2);
INSERT INTO public.examwarning_link VALUES (8, 1);
INSERT INTO public.examwarning_link VALUES (9, 1);
INSERT INTO public.examwarning_link VALUES (10, 1);
INSERT INTO public.examwarning_link VALUES (11, 1);
INSERT INTO public.examwarning_link VALUES (12, 1);
INSERT INTO public.examwarning_link VALUES (13, 1);
INSERT INTO public.examwarning_link VALUES (14, 1);
INSERT INTO public.examwarning_link VALUES (15, 1);
INSERT INTO public.examwarning_link VALUES (16, 1);
INSERT INTO public.examwarning_link VALUES (17, 1);
INSERT INTO public.examwarning_link VALUES (18, 1);
INSERT INTO public.examwarning_link VALUES (19, 1);
INSERT INTO public.examwarning_link VALUES (39, 2);
INSERT INTO public.examwarning_link VALUES (39, 1);
INSERT INTO public.examwarning_link VALUES (71, 1);
INSERT INTO public.examwarning_link VALUES (72, 2);
INSERT INTO public.examwarning_link VALUES (72, 1);
INSERT INTO public.examwarning_link VALUES (73, 1);
INSERT INTO public.examwarning_link VALUES (74, 1);
INSERT INTO public.examwarning_link VALUES (75, 1);
INSERT INTO public.examwarning_link VALUES (76, 1);
INSERT INTO public.examwarning_link VALUES (77, 1);
INSERT INTO public.examwarning_link VALUES (78, 1);
INSERT INTO public.examwarning_link VALUES (79, 1);
INSERT INTO public.examwarning_link VALUES (80, 1);
INSERT INTO public.examwarning_link VALUES (81, 2);
INSERT INTO public.examwarning_link VALUES (81, 1);
INSERT INTO public.examwarning_link VALUES (82, 2);
INSERT INTO public.examwarning_link VALUES (82, 1);
INSERT INTO public.examwarning_link VALUES (84, 1);
INSERT INTO public.examwarning_link VALUES (86, 1);
INSERT INTO public.examwarning_link VALUES (87, 2);
INSERT INTO public.examwarning_link VALUES (87, 1);
INSERT INTO public.examwarning_link VALUES (88, 2);
INSERT INTO public.examwarning_link VALUES (88, 1);
INSERT INTO public.examwarning_link VALUES (89, 2);
INSERT INTO public.examwarning_link VALUES (89, 1);
INSERT INTO public.examwarning_link VALUES (90, 2);
INSERT INTO public.examwarning_link VALUES (90, 1);
INSERT INTO public.examwarning_link VALUES (91, 2);
INSERT INTO public.examwarning_link VALUES (91, 1);
INSERT INTO public.examwarning_link VALUES (92, 2);
INSERT INTO public.examwarning_link VALUES (92, 1);
INSERT INTO public.examwarning_link VALUES (93, 1);
INSERT INTO public.examwarning_link VALUES (94, 1);
INSERT INTO public.examwarning_link VALUES (95, 1);
INSERT INTO public.examwarning_link VALUES (96, 1);
INSERT INTO public.examwarning_link VALUES (97, 1);
INSERT INTO public.examwarning_link VALUES (98, 1);
INSERT INTO public.examwarning_link VALUES (99, 1);
INSERT INTO public.examwarning_link VALUES (100, 1);
INSERT INTO public.examwarning_link VALUES (101, 1);
INSERT INTO public.examwarning_link VALUES (102, 2);
INSERT INTO public.examwarning_link VALUES (103, 2);
INSERT INTO public.examwarning_link VALUES (103, 1);
INSERT INTO public.examwarning_link VALUES (104, 2);
INSERT INTO public.examwarning_link VALUES (104, 1);
INSERT INTO public.examwarning_link VALUES (105, 2);
INSERT INTO public.examwarning_link VALUES (105, 1);
INSERT INTO public.examwarning_link VALUES (106, 1);
INSERT INTO public.examwarning_link VALUES (107, 2);
INSERT INTO public.examwarning_link VALUES (107, 1);
INSERT INTO public.examwarning_link VALUES (108, 1);
INSERT INTO public.examwarning_link VALUES (109, 1);
INSERT INTO public.examwarning_link VALUES (110, 2);
INSERT INTO public.examwarning_link VALUES (110, 1);
INSERT INTO public.examwarning_link VALUES (111, 1);
INSERT INTO public.examwarning_link VALUES (112, 1);
INSERT INTO public.examwarning_link VALUES (113, 1);
INSERT INTO public.examwarning_link VALUES (114, 2);
INSERT INTO public.examwarning_link VALUES (114, 1);
INSERT INTO public.examwarning_link VALUES (115, 2);
INSERT INTO public.examwarning_link VALUES (115, 1);
INSERT INTO public.examwarning_link VALUES (116, 1);
INSERT INTO public.examwarning_link VALUES (117, 2);
INSERT INTO public.examwarning_link VALUES (117, 1);
INSERT INTO public.examwarning_link VALUES (118, 2);
INSERT INTO public.examwarning_link VALUES (119, 2);
INSERT INTO public.examwarning_link VALUES (119, 1);
INSERT INTO public.examwarning_link VALUES (120, 2);
INSERT INTO public.examwarning_link VALUES (120, 1);
INSERT INTO public.examwarning_link VALUES (121, 2);
INSERT INTO public.examwarning_link VALUES (121, 1);
INSERT INTO public.examwarning_link VALUES (122, 2);
INSERT INTO public.examwarning_link VALUES (122, 1);
INSERT INTO public.examwarning_link VALUES (123, 2);
INSERT INTO public.examwarning_link VALUES (123, 1);
INSERT INTO public.examwarning_link VALUES (124, 2);
INSERT INTO public.examwarning_link VALUES (124, 1);
INSERT INTO public.examwarning_link VALUES (125, 1);
INSERT INTO public.examwarning_link VALUES (126, 1);
INSERT INTO public.examwarning_link VALUES (127, 1);
INSERT INTO public.examwarning_link VALUES (128, 1);
INSERT INTO public.examwarning_link VALUES (129, 1);
INSERT INTO public.examwarning_link VALUES (136, 3);
INSERT INTO public.examwarning_link VALUES (138, 1);
INSERT INTO public.examwarning_link VALUES (137, 3);
INSERT INTO public.examwarning_link VALUES (137, 2);


--
-- TOC entry 5665 (class 0 OID 25280)
-- Dependencies: 261
