Closed dustymc closed 3 years ago
I plan to work on this - but it's going to be a week or so before I get to it...
There is denormalization between these parts and http://arctos.database.museum/info/ctDocumentation.cfm?table=ctanatomical_direction
create table temp_prt_ana (p varchar);
CREATE OR REPLACE function temp_test() returns void AS $body$
DECLARE
r record;
p record;
begin
for r in (select anatomical_direction from ctanatomical_direction) loop
for p in (select distinct part_name from ctspecimen_part_name where part_name like '%' || r.anatomical_direction || '%') loop
insert into temp_prt_ana(p) values(p.part_name);
end loop;
end loop;
end;
$body$
LANGUAGE PLPGSQL
SECURITY DEFINER
;
select temp_test();
select * from temp_prt_ana;
drop table temp_prt_ana;
drop function temp_test;
skeleton, postcranial
skeleton, postcranial (70% ethanol)
skeleton, postcranial (DMSO)
skeleton, postcranial (dry)
skeleton, postcranial (ethanol)
skeleton, postcranial (ethanol/glycerin)
skeleton, postcranial (frozen)
skeleton, postcranial (glycerin)
skeleton, postcranial, mounted
whole organism, postcranial (ethanol)
whole organism, postcranial (ethanol, formalin-fixed)
whole organism, postcranial (formalin)
centrum, caudal
neural arch, caudal
rib, caudal
vertebra, caudal
denticle, rostral
skeleton, appendicular
skeleton, axial
centrum, cervical
neural arch, cervical
rib, cervical
vertebra, cervical
vertebra, thoracic
vertebra, lumbar
rib, dorsal
swab, dorsal
centrum, dorsal
vertebra, dorsal
forelimb
forelimb (dry)
foot, hind
hindgut content (70% ethanol)
hindgut content (ethanol)
hindlimb
hindlimb (dry)
hindlimb (frozen)
hindquarters (latex vascular injection)
podial, hind
flower
mandible, upper
sternal
metatarsal
tarsal
Upping priority for all code table messes, lest they invite more mess.
Sigh
I'm going to close this as a duplicate of #3708
Some stuff that jumped out at me while I was looking at parts:
@campmlc you created all of those. They seem entirely redundant with existing parts - "whole organism" or "tissue" perhaps - and derived_from. Can they be somehow made more consistent, or better described, or something?
There are a fair number of "body part[s]" (I don't think we have any non-body parts....) and "body" which are probably redundant with "whole organism" or perhaps "unknown" - anything that can be done about that?
These aren't used - anyone have immediate plans for them, or can I delete?
These are used 10 or fewer times - can any of them be merged with more "popular" parts?