        df.gtu_province_tag_indexed as provinces_array,
        df.gtu_others_tag_value::varchar as location,
        df.gtu_others_tag_indexed as location_array,
-       case when trim(df.gtu_code) in ('', '/', '0', '0/') then '' else 'Code: ' || trim(df.gtu_code) end as location_code,
-       case when df.gtu_from_date_mask >= 32 then 'Sampling dates: ' || to_char(df.gtu_from_date, 'DD/MM/YYYY') else '' end || case when df.gtu_to_date_mask >= 32 then ' - ' || to_char(df.gtu_to_date, 'DD/MM/YYYY') else '' end as gtu_date,
-       case when df.gtu_location is not null then 'Lat.Long.: ' || trunc((ST_Y(ST_Centroid(geometry(df.gtu_location))))::numeric, 6) || '/' || trunc((ST_X(ST_Centroid(geometry(df.gtu_location))))::numeric, 6) else '' end as lat_long,
-       case when df.gtu_elevation is not null then 'Elevation: ' || trunc(df.gtu_elevation::numeric,2) || 'm' || case when df.gtu_elevation_accuracy is not null then ' +- ' || trunc(df.gtu_elevation_accuracy::numeric,2) || 'm' else '' end else '' end as elevation,
-       (select 'Coll.: ' || array_to_string(array_agg(people_list), ' - ') 
-        from (select trim(formated_name) as people_list 
+       case when trim(df.gtu_code) in ('', '/', '0', '0/') then '' else trim(df.gtu_code) end as location_code,
+       case when df.gtu_from_date_mask >= 32 then to_char(df.gtu_from_date, 'DD/MM/YYYY') else '' end || case when df.gtu_to_date_mask >= 32 then ' - ' || to_char(df.gtu_to_date, 'DD/MM/YYYY') else '' end as gtu_date,
+       case when df.gtu_location is not null then trunc((ST_Y(ST_Centroid(geometry(df.gtu_location))))::numeric, 6) || '/' || trunc((ST_X(ST_Centroid(geometry(df.gtu_location))))::numeric, 6) else '' end as lat_long,
+       case when df.gtu_elevation is not null then trunc(df.gtu_elevation::numeric,2) || ' m' || case when df.gtu_elevation_accuracy is not null then ' +- ' || trunc(df.gtu_elevation_accuracy::numeric,2) || ' m' else '' end else '' end as elevation,
+       (select array_to_string(array_agg(people_list), ', ')
+        from (select distinct trim(family_name) as people_list
               from catalogue_people as cp inner join people as peo on cp.people_ref = peo.id 
-              where cp.people_type = 'collector' and cp.referenced_relation = 'specimens' and cp.record_id = df.spec_ref order by cp.order_by
+              where cp.people_type = 'collector'
+                and cp.referenced_relation = 'specimens'
+                and cp.record_id = df.spec_ref
+                and peo.family_name NOT IN ('Unknown', '/')
+/*              order by cp.order_by*/
              ) as x
        )::varchar as collectors,
-       (select 'Dét.: ' || array_to_string(array_agg(people_list), ' - ') 
-        from (select trim(formated_name) as people_list 
+       (select array_to_string(array_agg(people_list), ', ')
+        from (select distinct trim(family_name) as people_list 
               from (catalogue_people as cp inner join people as peo on cp.people_ref = peo.id) inner join identifications as ident on cp.record_id = ident.id and cp.referenced_relation = 'identifications' and cp.people_type = 'identifier' 
-              where ident.referenced_relation = 'specimens' and ident.record_id = df.spec_ref order by cp.order_by
+              where ident.referenced_relation = 'specimens'
+                and ident.record_id = df.spec_ref
+                and peo.family_name NOT IN ('Unknown', '/')
+                and ident.notion_date = (select max(notion_date)
+                                         from identifications as idt
+                                         where idt.referenced_relation = ident.referenced_relation
+                                           and idt.record_id = ident.record_id
+                                        )
+/*              order by cp.order_by*/
              ) as x
        )::varchar as identifiers,
-       (select 'Don.: ' || array_to_string(array_agg(people_list), ' - ')
-        from (select trim(formated_name) as people_list
+       (select array_to_string(array_agg(people_list), ', ')
+        from (select distinct trim(family_name) as people_list
+              from (catalogue_people as cp inner join people as peo on cp.people_ref = peo.id) inner join identifications as ident on cp.record_id = ident.id and cp.referenced_relation = 'identifications' and cp.people_type = 'identifier'
+              where ident.referenced_relation = 'specimen_parts'
+                and ident.record_id = df.spec_ref
+                and peo.family_name NOT IN ('Unknown', '/')
+                and ident.notion_date = (select max(notion_date)
+                                         from identifications as idt
+                                         where idt.referenced_relation = ident.referenced_relation
+                                           and idt.record_id = ident.record_id
+                                        )
+/*              order by cp.order_by*/
+             ) as x
+       )::varchar as part_identifiers,
+       (select array_to_string(array_agg(people_list), ', ')
+        from (select distinct trim(family_name) as people_list
               from catalogue_people as cp inner join people as peo on cp.people_ref = peo.id
-              where cp.people_type = 'donator' and cp.referenced_relation = 'specimens' and cp.record_id = df.spec_ref order by cp.order_by
+              where cp.people_type = 'donator'
+                and cp.referenced_relation = 'specimens'
+                and cp.record_id = df.spec_ref
+                and peo.family_name NOT IN ('Unknown', '/')
+/*              order by cp.order_by*/
              ) as x
        )::varchar as donators,
        coalesce(df.ig_num, '-') as ig_num,
        df.ig_num_indexed as ig_num_indexed,
        convert_to_integer(coalesce(ig_num, '-')) as ig_numeric,
-       case when df.part_count_min <> df.part_count_max and df.part_count_min is not null and df.part_count_max is not null then 'Count: ' || df.part_count_min || ' - ' || df.part_count_max else case when df.part_count_min is not null then 'Count: ' || df.part_count_min else '' end end as specimen_number,
-       case when exists(select 1 from comments where (referenced_relation = 'specimens' and record_id = df.spec_ref) or (referenced_relation = 'specimen_parts' and record_id = df.part_ref)) then 'Comm.?: Y' else 'Comm.?: N' end as comments
+       case when df.part_count_min <> df.part_count_max and df.part_count_min is not null and df.part_count_max is not null then df.part_count_min || ' - ' || df.part_count_max else case when df.part_count_min is not null then df.part_count_min::text else '' end end as specimen_number,
+       df.room as part_room,
+       df.row as part_row,
+       df.shelf as part_shelf,
+       df.container as part_container,
+       df.sub_container as part_sub_container,
+       case when exists(select 1 from comments where (referenced_relation = 'specimens' and record_id = df.spec_ref) or (referenced_relation = 'specimen_parts' and record_id = df.part_ref)) then 'Y' else 'N' end as comments
 from darwin_flat as df
 where part_ref is not null;
 

                          where referenced_relation = 'taxonomy' and record_id = df.taxon_ref and group_name = 'rename'
                         )
       )::varchar as current_name,
       case when df.acquisition_category is not null and trim(df.acquisition_category) !='' then 'Acq.: ' || df.acquisition_category else '' end as acquisition_category,
       df.gtu_ref as gtu_ref,
       df.gtu_country_tag_value::varchar as countries,
       df.gtu_country_tag_indexed as countries_array,

              case when df.individual_stage in ('undefined', 'unknown', 'not stated') then '' else ', ' || df.individual_stage end 
              || 
              case when coalesce(df.container_storage, '') in ('unknown', '/', '') then '' || case when coalesce(df.sub_container_storage, '') in ('unknown', '/', '')  then '' else ', ' || df.sub_container_storage end else ', ' || df.container_storage || case when coalesce(df.sub_container_storage, '') in ('unknown', '/', '') or df.sub_container_storage = df.container_storage then '' else ' - ' || df.sub_container_storage end end
            )) as item,*/
       array[fullToIndex(df.part)] as part,
       array[fullToIndex(df.individual_type)] as type,
       df.individual_sex as sex,
