diff --git a/app/models/study_json_record/processor_v2.rb b/app/models/study_json_record/processor_v2.rb index 0b32e2d5..d7009d6a 100644 --- a/app/models/study_json_record/processor_v2.rb +++ b/app/models/study_json_record/processor_v2.rb @@ -174,6 +174,24 @@ def study_data end def design_groups_data + return unless protocol_section + + ident = protocol_section['identificationModule'] + nct_id = ident['nctId'] + arms_intervention = key_check(protocol_section['armsInterventionsModule']) + arms_groups = key_check(arms_intervention['armGroups']) + return unless arms_groups + + collection = [] + arms_groups.each do |group| + collection << { + nct_id: nct_id, + group_type: group['type'], + title: group['label'], + description: group['description'] + } + end + collection end def interventions_data diff --git a/db/admin_structure.sql b/db/admin_structure.sql index f6ec9c21..f0251c14 100644 --- a/db/admin_structure.sql +++ b/db/admin_structure.sql @@ -16,20 +16,6 @@ SET row_security = off; CREATE SCHEMA ctgov; --- --- Name: public; Type: SCHEMA; Schema: -; Owner: - --- - -CREATE SCHEMA public; - - --- --- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON SCHEMA public IS 'standard public schema'; - - -- -- Name: support; Type: SCHEMA; Schema: -; Owner: - -- @@ -457,7 +443,8 @@ CREATE TABLE ctgov.design_groups ( nct_id character varying, group_type character varying, title character varying, - description text + description text, + group_intervention_names character varying[] DEFAULT '{}'::character varying[] ); @@ -650,6 +637,45 @@ CREATE VIEW ctgov.all_states AS GROUP BY facilities.nct_id; +-- +-- Name: attachments; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.attachments ( + id integer NOT NULL, + project_id integer, + file_name character varying, + content_type character varying, + file_contents bytea, + is_image boolean, + description text, + source text, + original_file_name character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: attachments_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.attachments_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.attachments_id_seq OWNED BY ctgov.attachments.id; + + -- -- Name: baseline_counts; Type: TABLE; Schema: ctgov; Owner: - -- @@ -1176,6 +1202,125 @@ CREATE VIEW ctgov.covid_19_studies AS WHERE ((search_results.name)::text = 'covid-19'::text)))); +-- +-- Name: data_definitions; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.data_definitions ( + id integer NOT NULL, + db_section character varying, + table_name character varying, + column_name character varying, + data_type character varying, + source character varying, + ctti_note text, + nlm_link character varying, + row_count integer, + enumerations json, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL, + db_schema character varying +); + + +-- +-- Name: data_definitions_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.data_definitions_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: data_definitions_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.data_definitions_id_seq OWNED BY ctgov.data_definitions.id; + + +-- +-- Name: datasets; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.datasets ( + id integer NOT NULL, + project_id integer, + schema_name character varying, + table_name character varying, + dataset_type character varying, + file_name character varying, + content_type character varying, + name character varying, + file_contents bytea, + url character varying, + made_available_on date, + description text, + source text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: datasets_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.datasets_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: datasets_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.datasets_id_seq OWNED BY ctgov.datasets.id; + + +-- +-- Name: db_user_activities; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.db_user_activities ( + id integer NOT NULL, + username character varying, + event_count integer, + when_recorded timestamp without time zone, + unit_of_time character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: db_user_activities_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.db_user_activities_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: db_user_activities_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.db_user_activities_id_seq OWNED BY ctgov.db_user_activities.id; + + -- -- Name: design_group_interventions; Type: TABLE; Schema: ctgov; Owner: - -- @@ -1380,6 +1525,43 @@ CREATE SEQUENCE ctgov.eligibilities_id_seq ALTER SEQUENCE ctgov.eligibilities_id_seq OWNED BY ctgov.eligibilities.id; +-- +-- Name: enumerations; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.enumerations ( + id integer NOT NULL, + table_name character varying, + column_name character varying, + column_value character varying, + value_count integer, + value_percent numeric, + description character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: enumerations_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.enumerations_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: enumerations_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.enumerations_id_seq OWNED BY ctgov.enumerations.id; + + -- -- Name: facilities_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - -- @@ -1469,6 +1651,110 @@ CREATE SEQUENCE ctgov.facility_investigators_id_seq ALTER SEQUENCE ctgov.facility_investigators_id_seq OWNED BY ctgov.facility_investigators.id; +-- +-- Name: faqs; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.faqs ( + id integer NOT NULL, + project_id integer, + question character varying, + answer text, + citation character varying, + url character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: faqs_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.faqs_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: faqs_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.faqs_id_seq OWNED BY ctgov.faqs.id; + + +-- +-- Name: file_downloads; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.file_downloads ( + id integer NOT NULL, + file_record_id integer, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + + +-- +-- Name: file_downloads_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.file_downloads_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: file_downloads_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.file_downloads_id_seq OWNED BY ctgov.file_downloads.id; + + +-- +-- Name: health_checks; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.health_checks ( + id integer NOT NULL, + query text, + cost character varying, + actual_time double precision, + row_count integer, + description character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: health_checks_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.health_checks_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: health_checks_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.health_checks_id_seq OWNED BY ctgov.health_checks.id; + + -- -- Name: id_information_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - -- @@ -1728,6 +2014,43 @@ CREATE SEQUENCE ctgov.milestones_id_seq ALTER SEQUENCE ctgov.milestones_id_seq OWNED BY ctgov.milestones.id; +-- +-- Name: notices; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.notices ( + id integer NOT NULL, + body character varying, + user_id integer, + title character varying, + send_emails boolean, + emails_sent_at timestamp without time zone, + visible boolean, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + + +-- +-- Name: notices_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.notices_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: notices_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.notices_id_seq OWNED BY ctgov.notices.id; + + -- -- Name: outcome_analyses; Type: TABLE; Schema: ctgov; Owner: - -- @@ -2027,12 +2350,65 @@ ALTER SEQUENCE ctgov.pending_results_id_seq OWNED BY ctgov.pending_results.id; -- --- Name: provided_documents; Type: TABLE; Schema: ctgov; Owner: - +-- Name: projects; Type: TABLE; Schema: ctgov; Owner: - -- -CREATE TABLE ctgov.provided_documents ( +CREATE TABLE ctgov.projects ( id integer NOT NULL, - nct_id character varying, + status character varying, + start_date date, + completion_date date, + schema_name character varying, + data_available boolean, + migration_file_name character varying, + name character varying, + year integer, + aact_version character varying, + brief_summary character varying, + investigators character varying, + organizations character varying, + url character varying, + description text, + protocol text, + issues text, + study_selection_criteria text, + submitter_name character varying, + contact_info character varying, + contact_url character varying, + email character varying, + image bytea, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: projects_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.projects_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: projects_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.projects_id_seq OWNED BY ctgov.projects.id; + + +-- +-- Name: provided_documents; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.provided_documents ( + id integer NOT NULL, + nct_id character varying, document_type character varying, has_protocol boolean, has_icf boolean, @@ -2062,6 +2438,114 @@ CREATE SEQUENCE ctgov.provided_documents_id_seq ALTER SEQUENCE ctgov.provided_documents_id_seq OWNED BY ctgov.provided_documents.id; +-- +-- Name: public_announcements; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.public_announcements ( + id integer NOT NULL, + description character varying, + is_sticky boolean +); + + +-- +-- Name: public_announcements_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.public_announcements_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: public_announcements_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.public_announcements_id_seq OWNED BY ctgov.public_announcements.id; + + +-- +-- Name: publications; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.publications ( + id integer NOT NULL, + project_id integer, + pub_type character varying, + journal_name character varying, + title character varying, + url character varying, + citation character varying, + pmid character varying, + pmcid character varying, + doi character varying, + publication_date date, + abstract text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: publications_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.publications_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: publications_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.publications_id_seq OWNED BY ctgov.publications.id; + + +-- +-- Name: releases; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.releases ( + id integer NOT NULL, + title character varying, + subtitle character varying, + released_on date, + body text, + created_at timestamp without time zone, + updated_at timestamp without time zone +); + + +-- +-- Name: releases_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.releases_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: releases_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.releases_id_seq OWNED BY ctgov.releases.id; + + -- -- Name: reported_event_totals; Type: TABLE; Schema: ctgov; Owner: - -- @@ -2316,6 +2800,42 @@ CREATE SEQUENCE ctgov.retractions_id_seq ALTER SEQUENCE ctgov.retractions_id_seq OWNED BY ctgov.retractions.id; +-- +-- Name: saved_queries; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.saved_queries ( + id integer NOT NULL, + title character varying, + description character varying, + sql character varying, + public boolean, + user_id integer, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: saved_queries_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.saved_queries_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: saved_queries_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.saved_queries_id_seq OWNED BY ctgov.saved_queries.id; + + -- -- Name: search_results_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - -- @@ -2460,6 +2980,237 @@ CREATE SEQUENCE ctgov.study_searches_id_seq ALTER SEQUENCE ctgov.study_searches_id_seq OWNED BY ctgov.study_searches.id; +-- +-- Name: use_case_attachments; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.use_case_attachments ( + id integer NOT NULL, + use_case_id integer, + file_name character varying, + content_type character varying, + file_contents bytea, + is_image boolean, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: use_case_attachments_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.use_case_attachments_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: use_case_attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.use_case_attachments_id_seq OWNED BY ctgov.use_case_attachments.id; + + +-- +-- Name: use_case_datasets; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.use_case_datasets ( + id integer NOT NULL, + use_case_id integer, + dataset_type character varying, + name character varying, + description text +); + + +-- +-- Name: use_case_datasets_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.use_case_datasets_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: use_case_datasets_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.use_case_datasets_id_seq OWNED BY ctgov.use_case_datasets.id; + + +-- +-- Name: use_case_publications; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.use_case_publications ( + id integer NOT NULL, + use_case_id integer, + name character varying, + url character varying +); + + +-- +-- Name: use_case_publications_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.use_case_publications_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: use_case_publications_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.use_case_publications_id_seq OWNED BY ctgov.use_case_publications.id; + + +-- +-- Name: use_cases; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.use_cases ( + id integer NOT NULL, + status character varying, + completion_date date, + title character varying, + year integer, + brief_summary character varying, + investigators character varying, + organizations character varying, + url character varying, + detailed_description text, + protocol text, + issues text, + study_selection_criteria text, + submitter_name character varying, + contact_info character varying, + email character varying, + image bytea, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: use_cases_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.use_cases_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: use_cases_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.use_cases_id_seq OWNED BY ctgov.use_cases.id; + + +-- +-- Name: user_events; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.user_events ( + id integer NOT NULL, + email character varying, + event_type character varying, + description text, + file_names character varying, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +-- +-- Name: user_events_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.user_events_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: user_events_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.user_events_id_seq OWNED BY ctgov.user_events.id; + + +-- +-- Name: users; Type: TABLE; Schema: ctgov; Owner: - +-- + +CREATE TABLE ctgov.users ( + id integer NOT NULL, + email character varying DEFAULT ''::character varying NOT NULL, + encrypted_password character varying DEFAULT ''::character varying NOT NULL, + reset_password_token character varying, + reset_password_sent_at timestamp without time zone, + remember_created_at timestamp without time zone, + sign_in_count integer DEFAULT 0 NOT NULL, + current_sign_in_at timestamp without time zone, + last_sign_in_at timestamp without time zone, + current_sign_in_ip character varying, + last_sign_in_ip character varying, + first_name character varying, + last_name character varying, + username character varying, + confirmation_token character varying, + confirmed_at timestamp without time zone, + confirmation_sent_at timestamp without time zone, + db_activity integer, + last_db_activity timestamp without time zone, + admin boolean DEFAULT false +); + + +-- +-- Name: users_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - +-- + +CREATE SEQUENCE ctgov.users_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - +-- + +ALTER SEQUENCE ctgov.users_id_seq OWNED BY ctgov.users.id; + + -- -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - -- @@ -2870,6 +3621,13 @@ CREATE SEQUENCE support.verifiers_id_seq ALTER SEQUENCE support.verifiers_id_seq OWNED BY support.verifiers.id; +-- +-- Name: attachments id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.attachments ALTER COLUMN id SET DEFAULT nextval('ctgov.attachments_id_seq'::regclass); + + -- -- Name: baseline_counts id; Type: DEFAULT; Schema: ctgov; Owner: - -- @@ -2933,6 +3691,27 @@ ALTER TABLE ONLY ctgov.conditions ALTER COLUMN id SET DEFAULT nextval('ctgov.con ALTER TABLE ONLY ctgov.countries ALTER COLUMN id SET DEFAULT nextval('ctgov.countries_id_seq'::regclass); +-- +-- Name: data_definitions id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.data_definitions ALTER COLUMN id SET DEFAULT nextval('ctgov.data_definitions_id_seq'::regclass); + + +-- +-- Name: datasets id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.datasets ALTER COLUMN id SET DEFAULT nextval('ctgov.datasets_id_seq'::regclass); + + +-- +-- Name: db_user_activities id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.db_user_activities ALTER COLUMN id SET DEFAULT nextval('ctgov.db_user_activities_id_seq'::regclass); + + -- -- Name: design_group_interventions id; Type: DEFAULT; Schema: ctgov; Owner: - -- @@ -2972,42 +3751,70 @@ ALTER TABLE ONLY ctgov.detailed_descriptions ALTER COLUMN id SET DEFAULT nextval -- Name: documents id; Type: DEFAULT; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.documents ALTER COLUMN id SET DEFAULT nextval('ctgov.documents_id_seq'::regclass); +ALTER TABLE ONLY ctgov.documents ALTER COLUMN id SET DEFAULT nextval('ctgov.documents_id_seq'::regclass); + + +-- +-- Name: drop_withdrawals id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.drop_withdrawals ALTER COLUMN id SET DEFAULT nextval('ctgov.drop_withdrawals_id_seq'::regclass); + + +-- +-- Name: eligibilities id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.eligibilities ALTER COLUMN id SET DEFAULT nextval('ctgov.eligibilities_id_seq'::regclass); + + +-- +-- Name: enumerations id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.enumerations ALTER COLUMN id SET DEFAULT nextval('ctgov.enumerations_id_seq'::regclass); + + +-- +-- Name: facilities id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.facilities ALTER COLUMN id SET DEFAULT nextval('ctgov.facilities_id_seq'::regclass); -- --- Name: drop_withdrawals id; Type: DEFAULT; Schema: ctgov; Owner: - +-- Name: facility_contacts id; Type: DEFAULT; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.drop_withdrawals ALTER COLUMN id SET DEFAULT nextval('ctgov.drop_withdrawals_id_seq'::regclass); +ALTER TABLE ONLY ctgov.facility_contacts ALTER COLUMN id SET DEFAULT nextval('ctgov.facility_contacts_id_seq'::regclass); -- --- Name: eligibilities id; Type: DEFAULT; Schema: ctgov; Owner: - +-- Name: facility_investigators id; Type: DEFAULT; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.eligibilities ALTER COLUMN id SET DEFAULT nextval('ctgov.eligibilities_id_seq'::regclass); +ALTER TABLE ONLY ctgov.facility_investigators ALTER COLUMN id SET DEFAULT nextval('ctgov.facility_investigators_id_seq'::regclass); -- --- Name: facilities id; Type: DEFAULT; Schema: ctgov; Owner: - +-- Name: faqs id; Type: DEFAULT; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.facilities ALTER COLUMN id SET DEFAULT nextval('ctgov.facilities_id_seq'::regclass); +ALTER TABLE ONLY ctgov.faqs ALTER COLUMN id SET DEFAULT nextval('ctgov.faqs_id_seq'::regclass); -- --- Name: facility_contacts id; Type: DEFAULT; Schema: ctgov; Owner: - +-- Name: file_downloads id; Type: DEFAULT; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.facility_contacts ALTER COLUMN id SET DEFAULT nextval('ctgov.facility_contacts_id_seq'::regclass); +ALTER TABLE ONLY ctgov.file_downloads ALTER COLUMN id SET DEFAULT nextval('ctgov.file_downloads_id_seq'::regclass); -- --- Name: facility_investigators id; Type: DEFAULT; Schema: ctgov; Owner: - +-- Name: health_checks id; Type: DEFAULT; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.facility_investigators ALTER COLUMN id SET DEFAULT nextval('ctgov.facility_investigators_id_seq'::regclass); +ALTER TABLE ONLY ctgov.health_checks ALTER COLUMN id SET DEFAULT nextval('ctgov.health_checks_id_seq'::regclass); -- @@ -3073,6 +3880,13 @@ ALTER TABLE ONLY ctgov.mesh_terms ALTER COLUMN id SET DEFAULT nextval('ctgov.mes ALTER TABLE ONLY ctgov.milestones ALTER COLUMN id SET DEFAULT nextval('ctgov.milestones_id_seq'::regclass); +-- +-- Name: notices id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.notices ALTER COLUMN id SET DEFAULT nextval('ctgov.notices_id_seq'::regclass); + + -- -- Name: outcome_analyses id; Type: DEFAULT; Schema: ctgov; Owner: - -- @@ -3129,6 +3943,13 @@ ALTER TABLE ONLY ctgov.participant_flows ALTER COLUMN id SET DEFAULT nextval('ct ALTER TABLE ONLY ctgov.pending_results ALTER COLUMN id SET DEFAULT nextval('ctgov.pending_results_id_seq'::regclass); +-- +-- Name: projects id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.projects ALTER COLUMN id SET DEFAULT nextval('ctgov.projects_id_seq'::regclass); + + -- -- Name: provided_documents id; Type: DEFAULT; Schema: ctgov; Owner: - -- @@ -3136,6 +3957,27 @@ ALTER TABLE ONLY ctgov.pending_results ALTER COLUMN id SET DEFAULT nextval('ctgo ALTER TABLE ONLY ctgov.provided_documents ALTER COLUMN id SET DEFAULT nextval('ctgov.provided_documents_id_seq'::regclass); +-- +-- Name: public_announcements id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.public_announcements ALTER COLUMN id SET DEFAULT nextval('ctgov.public_announcements_id_seq'::regclass); + + +-- +-- Name: publications id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.publications ALTER COLUMN id SET DEFAULT nextval('ctgov.publications_id_seq'::regclass); + + +-- +-- Name: releases id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.releases ALTER COLUMN id SET DEFAULT nextval('ctgov.releases_id_seq'::regclass); + + -- -- Name: reported_event_totals id; Type: DEFAULT; Schema: ctgov; Owner: - -- @@ -3185,6 +4027,13 @@ ALTER TABLE ONLY ctgov.result_groups ALTER COLUMN id SET DEFAULT nextval('ctgov. ALTER TABLE ONLY ctgov.retractions ALTER COLUMN id SET DEFAULT nextval('ctgov.retractions_id_seq'::regclass); +-- +-- Name: saved_queries id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.saved_queries ALTER COLUMN id SET DEFAULT nextval('ctgov.saved_queries_id_seq'::regclass); + + -- -- Name: search_results id; Type: DEFAULT; Schema: ctgov; Owner: - -- @@ -3220,6 +4069,48 @@ ALTER TABLE ONLY ctgov.study_references ALTER COLUMN id SET DEFAULT nextval('ctg ALTER TABLE ONLY ctgov.study_searches ALTER COLUMN id SET DEFAULT nextval('ctgov.study_searches_id_seq'::regclass); +-- +-- Name: use_case_attachments id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_case_attachments ALTER COLUMN id SET DEFAULT nextval('ctgov.use_case_attachments_id_seq'::regclass); + + +-- +-- Name: use_case_datasets id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_case_datasets ALTER COLUMN id SET DEFAULT nextval('ctgov.use_case_datasets_id_seq'::regclass); + + +-- +-- Name: use_case_publications id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_case_publications ALTER COLUMN id SET DEFAULT nextval('ctgov.use_case_publications_id_seq'::regclass); + + +-- +-- Name: use_cases id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_cases ALTER COLUMN id SET DEFAULT nextval('ctgov.use_cases_id_seq'::regclass); + + +-- +-- Name: user_events id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.user_events ALTER COLUMN id SET DEFAULT nextval('ctgov.user_events_id_seq'::regclass); + + +-- +-- Name: users id; Type: DEFAULT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.users ALTER COLUMN id SET DEFAULT nextval('ctgov.users_id_seq'::regclass); + + -- -- Name: active_storage_attachments id; Type: DEFAULT; Schema: support; Owner: - -- @@ -3297,6 +4188,14 @@ ALTER TABLE ONLY support.study_xml_records ALTER COLUMN id SET DEFAULT nextval(' ALTER TABLE ONLY support.verifiers ALTER COLUMN id SET DEFAULT nextval('support.verifiers_id_seq'::regclass); +-- +-- Name: attachments attachments_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.attachments + ADD CONSTRAINT attachments_pkey PRIMARY KEY (id); + + -- -- Name: baseline_counts baseline_counts_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3369,6 +4268,30 @@ ALTER TABLE ONLY ctgov.countries ADD CONSTRAINT countries_pkey PRIMARY KEY (id); +-- +-- Name: data_definitions data_definitions_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.data_definitions + ADD CONSTRAINT data_definitions_pkey PRIMARY KEY (id); + + +-- +-- Name: datasets datasets_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.datasets + ADD CONSTRAINT datasets_pkey PRIMARY KEY (id); + + +-- +-- Name: db_user_activities db_user_activities_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.db_user_activities + ADD CONSTRAINT db_user_activities_pkey PRIMARY KEY (id); + + -- -- Name: design_group_interventions design_group_interventions_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3433,6 +4356,14 @@ ALTER TABLE ONLY ctgov.eligibilities ADD CONSTRAINT eligibilities_pkey PRIMARY KEY (id); +-- +-- Name: enumerations enumerations_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.enumerations + ADD CONSTRAINT enumerations_pkey PRIMARY KEY (id); + + -- -- Name: facilities facilities_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3457,6 +4388,30 @@ ALTER TABLE ONLY ctgov.facility_investigators ADD CONSTRAINT facility_investigators_pkey PRIMARY KEY (id); +-- +-- Name: faqs faqs_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.faqs + ADD CONSTRAINT faqs_pkey PRIMARY KEY (id); + + +-- +-- Name: file_downloads file_downloads_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.file_downloads + ADD CONSTRAINT file_downloads_pkey PRIMARY KEY (id); + + +-- +-- Name: health_checks health_checks_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.health_checks + ADD CONSTRAINT health_checks_pkey PRIMARY KEY (id); + + -- -- Name: id_information id_information_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3529,6 +4484,14 @@ ALTER TABLE ONLY ctgov.milestones ADD CONSTRAINT milestones_pkey PRIMARY KEY (id); +-- +-- Name: notices notices_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.notices + ADD CONSTRAINT notices_pkey PRIMARY KEY (id); + + -- -- Name: outcome_analyses outcome_analyses_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3593,6 +4556,14 @@ ALTER TABLE ONLY ctgov.pending_results ADD CONSTRAINT pending_results_pkey PRIMARY KEY (id); +-- +-- Name: projects projects_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.projects + ADD CONSTRAINT projects_pkey PRIMARY KEY (id); + + -- -- Name: provided_documents provided_documents_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3601,6 +4572,30 @@ ALTER TABLE ONLY ctgov.provided_documents ADD CONSTRAINT provided_documents_pkey PRIMARY KEY (id); +-- +-- Name: public_announcements public_announcements_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.public_announcements + ADD CONSTRAINT public_announcements_pkey PRIMARY KEY (id); + + +-- +-- Name: publications publications_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.publications + ADD CONSTRAINT publications_pkey PRIMARY KEY (id); + + +-- +-- Name: releases releases_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.releases + ADD CONSTRAINT releases_pkey PRIMARY KEY (id); + + -- -- Name: reported_event_totals reported_event_totals_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3657,6 +4652,14 @@ ALTER TABLE ONLY ctgov.retractions ADD CONSTRAINT retractions_pkey PRIMARY KEY (id); +-- +-- Name: saved_queries saved_queries_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.saved_queries + ADD CONSTRAINT saved_queries_pkey PRIMARY KEY (id); + + -- -- Name: search_results search_results_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3697,6 +4700,54 @@ ALTER TABLE ONLY ctgov.study_searches ADD CONSTRAINT study_searches_pkey PRIMARY KEY (id); +-- +-- Name: use_case_attachments use_case_attachments_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_case_attachments + ADD CONSTRAINT use_case_attachments_pkey PRIMARY KEY (id); + + +-- +-- Name: use_case_datasets use_case_datasets_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_case_datasets + ADD CONSTRAINT use_case_datasets_pkey PRIMARY KEY (id); + + +-- +-- Name: use_case_publications use_case_publications_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_case_publications + ADD CONSTRAINT use_case_publications_pkey PRIMARY KEY (id); + + +-- +-- Name: use_cases use_cases_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.use_cases + ADD CONSTRAINT use_cases_pkey PRIMARY KEY (id); + + +-- +-- Name: user_events user_events_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.user_events + ADD CONSTRAINT user_events_pkey PRIMARY KEY (id); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.users + ADD CONSTRAINT users_pkey PRIMARY KEY (id); + + -- -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -3913,6 +4964,62 @@ CREATE INDEX index_conditions_on_downcase_name ON ctgov.conditions USING btree ( CREATE INDEX index_conditions_on_name ON ctgov.conditions USING btree (name); +-- +-- Name: index_ctgov.use_case_datasets_on_dataset_type; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX "index_ctgov.use_case_datasets_on_dataset_type" ON ctgov.use_case_datasets USING btree (dataset_type); + + +-- +-- Name: index_ctgov.use_case_datasets_on_name; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX "index_ctgov.use_case_datasets_on_name" ON ctgov.use_case_datasets USING btree (name); + + +-- +-- Name: index_ctgov.use_cases_on_completion_date; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX "index_ctgov.use_cases_on_completion_date" ON ctgov.use_cases USING btree (completion_date); + + +-- +-- Name: index_ctgov.use_cases_on_organizations; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX "index_ctgov.use_cases_on_organizations" ON ctgov.use_cases USING btree (organizations); + + +-- +-- Name: index_ctgov.use_cases_on_year; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX "index_ctgov.use_cases_on_year" ON ctgov.use_cases USING btree (year); + + +-- +-- Name: index_ctgov.users_on_confirmation_token; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE UNIQUE INDEX "index_ctgov.users_on_confirmation_token" ON ctgov.users USING btree (confirmation_token); + + +-- +-- Name: index_ctgov.users_on_email; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE UNIQUE INDEX "index_ctgov.users_on_email" ON ctgov.users USING btree (email); + + +-- +-- Name: index_ctgov.users_on_reset_password_token; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE UNIQUE INDEX "index_ctgov.users_on_reset_password_token" ON ctgov.users USING btree (reset_password_token); + + -- -- Name: index_design_group_interventions_on_design_group_id; Type: INDEX; Schema: ctgov; Owner: - -- @@ -4207,6 +5314,48 @@ CREATE INDEX index_overall_officials_on_affiliation ON ctgov.overall_officials U CREATE INDEX index_overall_officials_on_nct_id ON ctgov.overall_officials USING btree (nct_id); +-- +-- Name: index_projects_on_completion_date; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX index_projects_on_completion_date ON ctgov.projects USING btree (completion_date); + + +-- +-- Name: index_projects_on_data_available; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX index_projects_on_data_available ON ctgov.projects USING btree (data_available); + + +-- +-- Name: index_projects_on_investigators; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX index_projects_on_investigators ON ctgov.projects USING btree (investigators); + + +-- +-- Name: index_projects_on_organizations; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX index_projects_on_organizations ON ctgov.projects USING btree (organizations); + + +-- +-- Name: index_projects_on_start_date; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX index_projects_on_start_date ON ctgov.projects USING btree (start_date); + + +-- +-- Name: index_projects_on_year; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX index_projects_on_year ON ctgov.projects USING btree (year); + + -- -- Name: index_reported_events_on_event_type; Type: INDEX; Schema: ctgov; Owner: - -- @@ -4256,6 +5405,13 @@ CREATE INDEX index_result_contacts_on_organization ON ctgov.result_contacts USIN CREATE INDEX index_result_groups_on_result_type ON ctgov.result_groups USING btree (result_type); +-- +-- Name: index_saved_queries_on_user_id; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX index_saved_queries_on_user_id ON ctgov.saved_queries USING btree (user_id); + + -- -- Name: index_search_results_on_nct_id_and_name; Type: INDEX; Schema: ctgov; Owner: - -- @@ -4522,6 +5678,14 @@ CREATE INDEX "index_support.study_xml_records_on_nct_id" ON support.study_xml_re CREATE TRIGGER category_insert_trigger INSTEAD OF INSERT ON ctgov.categories FOR EACH ROW EXECUTE FUNCTION ctgov.category_insert_function(); +-- +-- Name: saved_queries fk_rails_add691a365; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- + +ALTER TABLE ONLY ctgov.saved_queries + ADD CONSTRAINT fk_rails_add691a365 FOREIGN KEY (user_id) REFERENCES ctgov.users(id); + + -- -- Name: active_storage_attachments fk_rails_0276932754; Type: FK CONSTRAINT; Schema: support; Owner: - -- @@ -4558,19 +5722,27 @@ ALTER TABLE ONLY support.file_records -- PostgreSQL database dump complete -- -SET search_path TO ctgov,support,public; +SET search_path TO ctgov, support, public; INSERT INTO "schema_migrations" (version) VALUES +('20160214191640'), ('20160630191037'), ('20160910000000'), ('20160911000000'), +('20160912000000'), ('20161011000000'), ('20161030000000'), ('20170411000122'), +('20180226142044'), +('20180427144951'), +('20180813174540'), +('20181108174440'), +('20181208174440'), ('20181212000000'), ('20190115184850'), ('20190115204850'), ('20190301204850'), +('20190321174440'), ('20191125205210'), ('20200217214455'), ('20200217220919'), @@ -4588,6 +5760,9 @@ INSERT INTO "schema_migrations" (version) VALUES ('20210526192804'), ('20210601063550'), ('20211027133828'), +('20211027220743'), +('20211102194357'), +('20211109190158'), ('20220202152642'), ('20220207182529'), ('20220212033048'), @@ -4607,15 +5782,18 @@ INSERT INTO "schema_migrations" (version) VALUES ('20220928162956'), ('20220928175111'), ('20220930181441'), +('20221018210501'), ('20221122213435'), ('20221219165747'), ('20230102193531'), +('20230131123222'), ('20230214200400'), ('20230216205237'), ('20230416235053'), ('20230628231316'), ('20230629000057'), ('20230720150513'), -('20231012015547'); +('20231012015547'), +('20231213221008'); diff --git a/db/public_structure.sql b/db/public_structure.sql index f6ec9c21..916838ae 100644 --- a/db/public_structure.sql +++ b/db/public_structure.sql @@ -16,20 +16,6 @@ SET row_security = off; CREATE SCHEMA ctgov; --- --- Name: public; Type: SCHEMA; Schema: -; Owner: - --- - -CREATE SCHEMA public; - - --- --- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON SCHEMA public IS 'standard public schema'; - - -- -- Name: support; Type: SCHEMA; Schema: -; Owner: - -- @@ -4558,7 +4544,7 @@ ALTER TABLE ONLY support.file_records -- PostgreSQL database dump complete -- -SET search_path TO ctgov,support,public; +SET search_path TO ctgov, support, public; INSERT INTO "schema_migrations" (version) VALUES ('20160630191037'), diff --git a/db/structure.sql b/db/structure.sql index cd30a046..f93f91b0 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -39,6 +39,27 @@ CREATE FUNCTION ctgov.category_insert_function() RETURNS trigger $$; +-- +-- Name: count_estimate(text); Type: FUNCTION; Schema: ctgov; Owner: - +-- + +CREATE FUNCTION ctgov.count_estimate(query text) RETURNS integer + LANGUAGE plpgsql + AS $$ + DECLARE + rec record; + ROWS INTEGER; + BEGIN + FOR rec IN EXECUTE 'EXPLAIN ' || query LOOP + ROWS := SUBSTRING(rec."QUERY PLAN" FROM ' rows=([[:digit:]]+)'); + EXIT WHEN ROWS IS NOT NULL; + END LOOP; + + RETURN ROWS; + END + $$; + + -- -- Name: ids_for_org(character varying); Type: FUNCTION; Schema: ctgov; Owner: - -- @@ -64,6 +85,7 @@ CREATE FUNCTION ctgov.ids_for_org(character varying) RETURNS TABLE(nct_id charac CREATE FUNCTION ctgov.ids_for_term(character varying) RETURNS TABLE(nct_id character varying) LANGUAGE sql AS $_$ + SELECT DISTINCT nct_id FROM browse_conditions WHERE downcase_mesh_term like lower($1) UNION SELECT DISTINCT nct_id FROM browse_interventions WHERE downcase_mesh_term like lower($1) @@ -82,6 +104,7 @@ CREATE FUNCTION ctgov.ids_for_term(character varying) RETURNS TABLE(nct_id chara CREATE FUNCTION ctgov.study_summaries_for_condition(character varying) RETURNS TABLE(nct_id character varying, title text, recruitment character varying, were_results_reported boolean, conditions text, interventions text, gender character varying, age text, phase character varying, enrollment integer, study_type character varying, sponsors text, other_ids text, study_first_submitted_date date, start_date date, completion_month_year character varying, last_update_submitted_date date, verification_month_year character varying, results_first_submitted_date date, acronym character varying, primary_completion_month_year character varying, outcome_measures text, disposition_first_submitted_date date, allocation character varying, intervention_model character varying, observational_model character varying, primary_purpose character varying, time_perspective character varying, masking character varying, masking_description text, intervention_model_description text, subject_masked boolean, caregiver_masked boolean, investigator_masked boolean, outcomes_assessor_masked boolean, number_of_facilities integer) LANGUAGE sql AS $_$ + SELECT DISTINCT s.nct_id, s.brief_title, s.overall_status, @@ -126,6 +149,7 @@ CREATE FUNCTION ctgov.study_summaries_for_condition(character varying) RETURNS T d.investigator_masked, d.outcomes_assessor_masked, cv.number_of_facilities + FROM studies s INNER JOIN browse_conditions bc ON s.nct_id = bc.nct_id and bc.downcase_mesh_term like lower($1) LEFT OUTER JOIN calculated_values cv ON s.nct_id = cv.nct_id @@ -136,7 +160,9 @@ CREATE FUNCTION ctgov.study_summaries_for_condition(character varying) RETURNS T LEFT OUTER JOIN all_id_information id ON s.nct_id = id.nct_id LEFT OUTER JOIN all_design_outcomes o ON s.nct_id = o.nct_id LEFT OUTER JOIN designs d ON s.nct_id = d.nct_id + UNION + SELECT DISTINCT s.nct_id, s.brief_title, s.overall_status, @@ -181,6 +207,7 @@ CREATE FUNCTION ctgov.study_summaries_for_condition(character varying) RETURNS T d.investigator_masked, d.outcomes_assessor_masked, cv.number_of_facilities + FROM studies s INNER JOIN conditions bc ON s.nct_id = bc.nct_id and bc.downcase_name like lower($1) LEFT OUTER JOIN calculated_values cv ON s.nct_id = cv.nct_id @@ -191,7 +218,9 @@ CREATE FUNCTION ctgov.study_summaries_for_condition(character varying) RETURNS T LEFT OUTER JOIN all_id_information id ON s.nct_id = id.nct_id LEFT OUTER JOIN all_design_outcomes o ON s.nct_id = o.nct_id LEFT OUTER JOIN designs d ON s.nct_id = d.nct_id + UNION + SELECT DISTINCT s.nct_id, s.brief_title, s.overall_status, @@ -236,6 +265,7 @@ CREATE FUNCTION ctgov.study_summaries_for_condition(character varying) RETURNS T d.investigator_masked, d.outcomes_assessor_masked, cv.number_of_facilities + FROM studies s INNER JOIN keywords k ON s.nct_id = k.nct_id and k.downcase_name like lower($1) LEFT OUTER JOIN calculated_values cv ON s.nct_id = cv.nct_id @@ -246,6 +276,7 @@ CREATE FUNCTION ctgov.study_summaries_for_condition(character varying) RETURNS T LEFT OUTER JOIN all_id_information id ON s.nct_id = id.nct_id LEFT OUTER JOIN all_design_outcomes o ON s.nct_id = o.nct_id LEFT OUTER JOIN designs d ON s.nct_id = d.nct_id + ; $_$; @@ -656,7 +687,6 @@ CREATE TABLE ctgov.baseline_counts ( -- CREATE SEQUENCE ctgov.baseline_counts_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -706,7 +736,6 @@ CREATE TABLE ctgov.baseline_measurements ( -- CREATE SEQUENCE ctgov.baseline_measurements_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -737,7 +766,6 @@ CREATE TABLE ctgov.brief_summaries ( -- CREATE SEQUENCE ctgov.brief_summaries_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -757,7 +785,6 @@ ALTER SEQUENCE ctgov.brief_summaries_id_seq OWNED BY ctgov.brief_summaries.id; -- CREATE SEQUENCE ctgov.browse_conditions_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -777,7 +804,6 @@ ALTER SEQUENCE ctgov.browse_conditions_id_seq OWNED BY ctgov.browse_conditions.i -- CREATE SEQUENCE ctgov.browse_interventions_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -824,7 +850,6 @@ CREATE TABLE ctgov.calculated_values ( -- CREATE SEQUENCE ctgov.calculated_values_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -902,7 +927,6 @@ CREATE TABLE ctgov.central_contacts ( -- CREATE SEQUENCE ctgov.central_contacts_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -922,7 +946,6 @@ ALTER SEQUENCE ctgov.central_contacts_id_seq OWNED BY ctgov.central_contacts.id; -- CREATE SEQUENCE ctgov.conditions_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -942,7 +965,6 @@ ALTER SEQUENCE ctgov.conditions_id_seq OWNED BY ctgov.conditions.id; -- CREATE SEQUENCE ctgov.countries_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1179,7 +1201,6 @@ CREATE TABLE ctgov.design_group_interventions ( -- CREATE SEQUENCE ctgov.design_group_interventions_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1199,7 +1220,6 @@ ALTER SEQUENCE ctgov.design_group_interventions_id_seq OWNED BY ctgov.design_gro -- CREATE SEQUENCE ctgov.design_groups_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1219,7 +1239,6 @@ ALTER SEQUENCE ctgov.design_groups_id_seq OWNED BY ctgov.design_groups.id; -- CREATE SEQUENCE ctgov.design_outcomes_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1239,7 +1258,6 @@ ALTER SEQUENCE ctgov.design_outcomes_id_seq OWNED BY ctgov.design_outcomes.id; -- CREATE SEQUENCE ctgov.designs_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1259,7 +1277,6 @@ ALTER SEQUENCE ctgov.designs_id_seq OWNED BY ctgov.designs.id; -- CREATE SEQUENCE ctgov.detailed_descriptions_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1293,7 +1310,6 @@ CREATE TABLE ctgov.documents ( -- CREATE SEQUENCE ctgov.documents_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1331,7 +1347,6 @@ CREATE TABLE ctgov.drop_withdrawals ( -- CREATE SEQUENCE ctgov.drop_withdrawals_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1351,7 +1366,6 @@ ALTER SEQUENCE ctgov.drop_withdrawals_id_seq OWNED BY ctgov.drop_withdrawals.id; -- CREATE SEQUENCE ctgov.eligibilities_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1371,7 +1385,6 @@ ALTER SEQUENCE ctgov.eligibilities_id_seq OWNED BY ctgov.eligibilities.id; -- CREATE SEQUENCE ctgov.facilities_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1407,7 +1420,6 @@ CREATE TABLE ctgov.facility_contacts ( -- CREATE SEQUENCE ctgov.facility_contacts_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1440,7 +1452,6 @@ CREATE TABLE ctgov.facility_investigators ( -- CREATE SEQUENCE ctgov.facility_investigators_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1460,7 +1471,6 @@ ALTER SEQUENCE ctgov.facility_investigators_id_seq OWNED BY ctgov.facility_inves -- CREATE SEQUENCE ctgov.id_information_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1492,7 +1502,6 @@ CREATE TABLE ctgov.intervention_other_names ( -- CREATE SEQUENCE ctgov.intervention_other_names_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1512,7 +1521,6 @@ ALTER SEQUENCE ctgov.intervention_other_names_id_seq OWNED BY ctgov.intervention -- CREATE SEQUENCE ctgov.interventions_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1543,7 +1551,6 @@ CREATE TABLE ctgov.ipd_information_types ( -- CREATE SEQUENCE ctgov.ipd_information_types_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1563,7 +1570,6 @@ ALTER SEQUENCE ctgov.ipd_information_types_id_seq OWNED BY ctgov.ipd_information -- CREATE SEQUENCE ctgov.keywords_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1595,7 +1601,6 @@ CREATE TABLE ctgov.links ( -- CREATE SEQUENCE ctgov.links_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1627,7 +1632,6 @@ CREATE TABLE ctgov.mesh_headings ( -- CREATE SEQUENCE ctgov.mesh_headings_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1661,7 +1665,6 @@ CREATE TABLE ctgov.mesh_terms ( -- CREATE SEQUENCE ctgov.mesh_terms_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1699,7 +1702,6 @@ CREATE TABLE ctgov.milestones ( -- CREATE SEQUENCE ctgov.milestones_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1740,10 +1742,7 @@ CREATE TABLE ctgov.outcome_analyses ( method_description text, estimate_description text, groups_description text, - other_analysis_description text, - ci_upper_limit_raw character varying, - ci_lower_limit_raw character varying, - p_value_raw character varying + other_analysis_description text ); @@ -1752,7 +1751,6 @@ CREATE TABLE ctgov.outcome_analyses ( -- CREATE SEQUENCE ctgov.outcome_analyses_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1785,7 +1783,6 @@ CREATE TABLE ctgov.outcome_analysis_groups ( -- CREATE SEQUENCE ctgov.outcome_analysis_groups_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1821,7 +1818,6 @@ CREATE TABLE ctgov.outcome_counts ( -- CREATE SEQUENCE ctgov.outcome_counts_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1859,9 +1855,7 @@ CREATE TABLE ctgov.outcome_measurements ( dispersion_value_num numeric, dispersion_lower_limit numeric, dispersion_upper_limit numeric, - explanation_of_na text, - dispersion_upper_limit_raw character varying, - dispersion_lower_limit_raw character varying + explanation_of_na text ); @@ -1870,7 +1864,6 @@ CREATE TABLE ctgov.outcome_measurements ( -- CREATE SEQUENCE ctgov.outcome_measurements_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1911,7 +1904,6 @@ CREATE TABLE ctgov.outcomes ( -- CREATE SEQUENCE ctgov.outcomes_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1931,7 +1923,6 @@ ALTER SEQUENCE ctgov.outcomes_id_seq OWNED BY ctgov.outcomes.id; -- CREATE SEQUENCE ctgov.overall_officials_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1955,7 +1946,10 @@ CREATE TABLE ctgov.participant_flows ( nct_id character varying, recruitment_details text, pre_assignment_details text, - units_analyzed character varying + units_analyzed character varying, + drop_withdraw_comment character varying, + reason_comment character varying, + count_units integer ); @@ -1964,7 +1958,6 @@ CREATE TABLE ctgov.participant_flows ( -- CREATE SEQUENCE ctgov.participant_flows_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1997,7 +1990,6 @@ CREATE TABLE ctgov.pending_results ( -- CREATE SEQUENCE ctgov.pending_results_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2033,7 +2025,6 @@ CREATE TABLE ctgov.provided_documents ( -- CREATE SEQUENCE ctgov.provided_documents_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2070,7 +2061,6 @@ CREATE TABLE ctgov.reported_event_totals ( -- CREATE SEQUENCE ctgov.reported_event_totals_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2115,7 +2105,6 @@ CREATE TABLE ctgov.reported_events ( -- CREATE SEQUENCE ctgov.reported_events_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2151,7 +2140,6 @@ CREATE TABLE ctgov.responsible_parties ( -- CREATE SEQUENCE ctgov.responsible_parties_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2186,7 +2174,6 @@ CREATE TABLE ctgov.result_agreements ( -- CREATE SEQUENCE ctgov.result_agreements_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2221,7 +2208,6 @@ CREATE TABLE ctgov.result_contacts ( -- CREATE SEQUENCE ctgov.result_contacts_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2255,7 +2241,6 @@ CREATE TABLE ctgov.result_groups ( -- CREATE SEQUENCE ctgov.result_groups_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2307,7 +2292,6 @@ ALTER SEQUENCE ctgov.retractions_id_seq OWNED BY ctgov.retractions.id; -- CREATE SEQUENCE ctgov.search_results_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2327,7 +2311,6 @@ ALTER SEQUENCE ctgov.search_results_id_seq OWNED BY ctgov.search_results.id; -- CREATE SEQUENCE ctgov.sponsors_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2342,40 +2325,6 @@ CREATE SEQUENCE ctgov.sponsors_id_seq ALTER SEQUENCE ctgov.sponsors_id_seq OWNED BY ctgov.sponsors.id; --- --- Name: study_records; Type: TABLE; Schema: ctgov; Owner: - --- - -CREATE TABLE ctgov.study_records ( - id bigint NOT NULL, - nct_id character varying, - type character varying, - content json, - sha character varying, - created_at timestamp(6) without time zone NOT NULL, - updated_at timestamp(6) without time zone NOT NULL -); - - --- --- Name: study_records_id_seq; Type: SEQUENCE; Schema: ctgov; Owner: - --- - -CREATE SEQUENCE ctgov.study_records_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - --- --- Name: study_records_id_seq; Type: SEQUENCE OWNED BY; Schema: ctgov; Owner: - --- - -ALTER SEQUENCE ctgov.study_records_id_seq OWNED BY ctgov.study_records.id; - - -- -- Name: study_references; Type: TABLE; Schema: ctgov; Owner: - -- @@ -2394,7 +2343,6 @@ CREATE TABLE ctgov.study_references ( -- CREATE SEQUENCE ctgov.study_references_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -2431,7 +2379,6 @@ CREATE TABLE ctgov.study_searches ( -- CREATE SEQUENCE ctgov.study_searches_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -3185,13 +3132,6 @@ ALTER TABLE ONLY ctgov.search_results ALTER COLUMN id SET DEFAULT nextval('ctgov ALTER TABLE ONLY ctgov.sponsors ALTER COLUMN id SET DEFAULT nextval('ctgov.sponsors_id_seq'::regclass); --- --- Name: study_records id; Type: DEFAULT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.study_records ALTER COLUMN id SET DEFAULT nextval('ctgov.study_records_id_seq'::regclass); - - -- -- Name: study_references id; Type: DEFAULT; Schema: ctgov; Owner: - -- @@ -3659,14 +3599,6 @@ ALTER TABLE ONLY ctgov.sponsors ADD CONSTRAINT sponsors_pkey PRIMARY KEY (id); --- --- Name: study_records study_records_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.study_records - ADD CONSTRAINT study_records_pkey PRIMARY KEY (id); - - -- -- Name: study_references study_references_pkey; Type: CONSTRAINT; Schema: ctgov; Owner: - -- @@ -3787,6 +3719,160 @@ ALTER TABLE ONLY support.verifiers ADD CONSTRAINT verifiers_pkey PRIMARY KEY (id); +-- +-- Name: baseline_counts_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX baseline_counts_nct_idx ON ctgov.baseline_counts USING btree (nct_id); + + +-- +-- Name: baseline_measurements_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX baseline_measurements_nct_idx ON ctgov.baseline_measurements USING btree (nct_id); + + +-- +-- Name: brief_summaries_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX brief_summaries_nct_idx ON ctgov.brief_summaries USING btree (nct_id); + + +-- +-- Name: browse_conditions_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX browse_conditions_nct_idx ON ctgov.browse_conditions USING btree (nct_id); + + +-- +-- Name: browse_interventions_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX browse_interventions_nct_idx ON ctgov.browse_interventions USING btree (nct_id); + + +-- +-- Name: calculated_values_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX calculated_values_nct_idx ON ctgov.calculated_values USING btree (nct_id); + + +-- +-- Name: categories_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX categories_nct_idx ON ctgov.search_results USING btree (nct_id); + + +-- +-- Name: central_contacts_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX central_contacts_nct_idx ON ctgov.central_contacts USING btree (nct_id); + + +-- +-- Name: conditions_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX conditions_nct_idx ON ctgov.conditions USING btree (nct_id); + + +-- +-- Name: countries_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX countries_nct_idx ON ctgov.countries USING btree (nct_id); + + +-- +-- Name: design_group_interventions_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX design_group_interventions_nct_idx ON ctgov.design_group_interventions USING btree (nct_id); + + +-- +-- Name: design_groups_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX design_groups_nct_idx ON ctgov.design_groups USING btree (nct_id); + + +-- +-- Name: design_outcomes_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX design_outcomes_nct_idx ON ctgov.design_outcomes USING btree (nct_id); + + +-- +-- Name: designs_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX designs_nct_idx ON ctgov.designs USING btree (nct_id); + + +-- +-- Name: detailed_descriptions_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX detailed_descriptions_nct_idx ON ctgov.detailed_descriptions USING btree (nct_id); + + +-- +-- Name: documents_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX documents_nct_idx ON ctgov.documents USING btree (nct_id); + + +-- +-- Name: drop_withdrawals_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX drop_withdrawals_nct_idx ON ctgov.drop_withdrawals USING btree (nct_id); + + +-- +-- Name: eligibilities_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX eligibilities_nct_idx ON ctgov.eligibilities USING btree (nct_id); + + +-- +-- Name: facilities_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX facilities_nct_idx ON ctgov.facilities USING btree (nct_id); + + +-- +-- Name: facility_contacts_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX facility_contacts_nct_idx ON ctgov.facility_contacts USING btree (nct_id); + + +-- +-- Name: facility_investigators_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX facility_investigators_nct_idx ON ctgov.facility_investigators USING btree (nct_id); + + +-- +-- Name: id_information_nct_idx; Type: INDEX; Schema: ctgov; Owner: - +-- + +CREATE INDEX id_information_nct_idx ON ctgov.id_information USING btree (nct_id); + + -- -- Name: index_baseline_counts_on_nct_id; Type: INDEX; Schema: ctgov; Owner: - -- @@ -4648,13 +4734,6 @@ CREATE INDEX index_studies_on_study_first_submitted_qc_date ON ctgov.studies USI CREATE INDEX index_studies_on_study_type ON ctgov.studies USING btree (study_type); --- --- Name: index_study_records_on_nct_id_and_type; Type: INDEX; Schema: ctgov; Owner: - --- - -CREATE UNIQUE INDEX index_study_records_on_nct_id_and_type ON ctgov.study_records USING btree (nct_id, type); - - -- -- Name: index_study_references_on_nct_id; Type: INDEX; Schema: ctgov; Owner: - -- @@ -4677,627 +4756,269 @@ CREATE INDEX index_study_references_on_reference_type ON ctgov.study_references -- --- Name: index_study_searches_on_query_and_grouping; Type: INDEX; Schema: ctgov; Owner: - +-- Name: intervention_other_names_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE UNIQUE INDEX index_study_searches_on_query_and_grouping ON ctgov.study_searches USING btree (query, "grouping"); +CREATE INDEX intervention_other_names_nct_idx ON ctgov.intervention_other_names USING btree (nct_id); -- --- Name: index_active_storage_attachments_uniqueness; Type: INDEX; Schema: support; Owner: - +-- Name: interventions_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE UNIQUE INDEX index_active_storage_attachments_uniqueness ON support.active_storage_attachments USING btree (record_type, record_id, name, blob_id); +CREATE INDEX interventions_nct_idx ON ctgov.interventions USING btree (nct_id); -- --- Name: index_file_records_on_load_event_id; Type: INDEX; Schema: support; Owner: - +-- Name: ipd_information_types_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX index_file_records_on_load_event_id ON support.file_records USING btree (load_event_id); +CREATE INDEX ipd_information_types_nct_idx ON ctgov.ipd_information_types USING btree (nct_id); -- --- Name: index_support.active_storage_attachments_on_blob_id; Type: INDEX; Schema: support; Owner: - +-- Name: keywords_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.active_storage_attachments_on_blob_id" ON support.active_storage_attachments USING btree (blob_id); +CREATE INDEX keywords_nct_idx ON ctgov.keywords USING btree (nct_id); -- --- Name: index_support.active_storage_blobs_on_key; Type: INDEX; Schema: support; Owner: - +-- Name: links_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE UNIQUE INDEX "index_support.active_storage_blobs_on_key" ON support.active_storage_blobs USING btree (key); +CREATE INDEX links_nct_idx ON ctgov.links USING btree (nct_id); -- --- Name: index_support.load_events_on_event_type; Type: INDEX; Schema: support; Owner: - +-- Name: milestones_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.load_events_on_event_type" ON support.load_events USING btree (event_type); +CREATE INDEX milestones_nct_idx ON ctgov.milestones USING btree (nct_id); -- --- Name: index_support.load_events_on_status; Type: INDEX; Schema: support; Owner: - +-- Name: outcome_analyses_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.load_events_on_status" ON support.load_events USING btree (status); +CREATE INDEX outcome_analyses_nct_idx ON ctgov.outcome_analyses USING btree (nct_id); -- --- Name: index_support.load_issues_on_load_event_id; Type: INDEX; Schema: support; Owner: - +-- Name: outcome_analysis_groups_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.load_issues_on_load_event_id" ON support.load_issues USING btree (load_event_id); +CREATE INDEX outcome_analysis_groups_nct_idx ON ctgov.outcome_analysis_groups USING btree (nct_id); -- --- Name: index_support.sanity_checks_on_check_type; Type: INDEX; Schema: support; Owner: - +-- Name: outcome_counts_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.sanity_checks_on_check_type" ON support.sanity_checks USING btree (check_type); +CREATE INDEX outcome_counts_nct_idx ON ctgov.outcome_counts USING btree (nct_id); -- --- Name: index_support.sanity_checks_on_column_name; Type: INDEX; Schema: support; Owner: - +-- Name: outcome_measurements_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.sanity_checks_on_column_name" ON support.sanity_checks USING btree (column_name); +CREATE INDEX outcome_measurements_nct_idx ON ctgov.outcome_measurements USING btree (nct_id); -- --- Name: index_support.sanity_checks_on_load_event_id; Type: INDEX; Schema: support; Owner: - +-- Name: outcomes_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.sanity_checks_on_load_event_id" ON support.sanity_checks USING btree (load_event_id); +CREATE INDEX outcomes_nct_idx ON ctgov.outcomes USING btree (nct_id); -- --- Name: index_support.sanity_checks_on_nct_id; Type: INDEX; Schema: support; Owner: - +-- Name: overall_officials_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.sanity_checks_on_nct_id" ON support.sanity_checks USING btree (nct_id); +CREATE INDEX overall_officials_nct_idx ON ctgov.overall_officials USING btree (nct_id); -- --- Name: index_support.sanity_checks_on_table_name; Type: INDEX; Schema: support; Owner: - +-- Name: participant_flows_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.sanity_checks_on_table_name" ON support.sanity_checks USING btree (table_name); +CREATE INDEX participant_flows_nct_idx ON ctgov.participant_flows USING btree (nct_id); -- --- Name: index_support.study_xml_records_on_created_study_at; Type: INDEX; Schema: support; Owner: - --- - -CREATE INDEX "index_support.study_xml_records_on_created_study_at" ON support.study_xml_records USING btree (created_study_at); - - --- --- Name: index_support.study_xml_records_on_nct_id; Type: INDEX; Schema: support; Owner: - +-- Name: pending_results_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE INDEX "index_support.study_xml_records_on_nct_id" ON support.study_xml_records USING btree (nct_id); +CREATE INDEX pending_results_nct_idx ON ctgov.pending_results USING btree (nct_id); -- --- Name: categories category_insert_trigger; Type: TRIGGER; Schema: ctgov; Owner: - +-- Name: provided_documents_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -CREATE TRIGGER category_insert_trigger INSTEAD OF INSERT ON ctgov.categories FOR EACH ROW EXECUTE FUNCTION ctgov.category_insert_function(); +CREATE INDEX provided_documents_nct_idx ON ctgov.provided_documents USING btree (nct_id); -- --- Name: baseline_counts baseline_counts_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: reported_event_totals_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.baseline_counts - ADD CONSTRAINT baseline_counts_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX reported_event_totals_nct_idx ON ctgov.reported_event_totals USING btree (nct_id); -- --- Name: baseline_counts baseline_counts_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: reported_events_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.baseline_counts - ADD CONSTRAINT baseline_counts_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); +CREATE INDEX reported_events_nct_idx ON ctgov.reported_events USING btree (nct_id); -- --- Name: baseline_measurements baseline_measurements_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: responsible_parties_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.baseline_measurements - ADD CONSTRAINT baseline_measurements_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX responsible_parties_nct_idx ON ctgov.responsible_parties USING btree (nct_id); -- --- Name: baseline_measurements baseline_measurements_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: result_agreements_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.baseline_measurements - ADD CONSTRAINT baseline_measurements_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); +CREATE INDEX result_agreements_nct_idx ON ctgov.result_agreements USING btree (nct_id); -- --- Name: brief_summaries brief_summaries_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: result_contacts_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.brief_summaries - ADD CONSTRAINT brief_summaries_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX result_contacts_nct_idx ON ctgov.result_contacts USING btree (nct_id); -- --- Name: browse_conditions browse_conditions_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: result_groups_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.browse_conditions - ADD CONSTRAINT browse_conditions_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX result_groups_nct_idx ON ctgov.result_groups USING btree (nct_id); -- --- Name: browse_interventions browse_interventions_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: sponsors_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.browse_interventions - ADD CONSTRAINT browse_interventions_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX sponsors_nct_idx ON ctgov.sponsors USING btree (nct_id); -- --- Name: calculated_values calculated_values_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: studies_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.calculated_values - ADD CONSTRAINT calculated_values_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX studies_nct_idx ON ctgov.studies USING btree (nct_id); -- --- Name: central_contacts central_contacts_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: study_references_nct_idx; Type: INDEX; Schema: ctgov; Owner: - -- -ALTER TABLE ONLY ctgov.central_contacts - ADD CONSTRAINT central_contacts_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX study_references_nct_idx ON ctgov.study_references USING btree (nct_id); -- --- Name: conditions conditions_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.conditions - ADD CONSTRAINT conditions_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: countries countries_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.countries - ADD CONSTRAINT countries_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: design_group_interventions design_group_interventions_design_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.design_group_interventions - ADD CONSTRAINT design_group_interventions_design_group_id_fkey FOREIGN KEY (design_group_id) REFERENCES ctgov.design_groups(id); - - --- --- Name: design_group_interventions design_group_interventions_intervention_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.design_group_interventions - ADD CONSTRAINT design_group_interventions_intervention_id_fkey FOREIGN KEY (intervention_id) REFERENCES ctgov.interventions(id); - - --- --- Name: design_group_interventions design_group_interventions_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.design_group_interventions - ADD CONSTRAINT design_group_interventions_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: design_groups design_groups_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.design_groups - ADD CONSTRAINT design_groups_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: design_outcomes design_outcomes_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.design_outcomes - ADD CONSTRAINT design_outcomes_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: designs designs_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.designs - ADD CONSTRAINT designs_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: detailed_descriptions detailed_descriptions_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.detailed_descriptions - ADD CONSTRAINT detailed_descriptions_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: documents documents_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.documents - ADD CONSTRAINT documents_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: drop_withdrawals drop_withdrawals_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.drop_withdrawals - ADD CONSTRAINT drop_withdrawals_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: drop_withdrawals drop_withdrawals_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.drop_withdrawals - ADD CONSTRAINT drop_withdrawals_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); - - --- --- Name: eligibilities eligibilities_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.eligibilities - ADD CONSTRAINT eligibilities_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: facilities facilities_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.facilities - ADD CONSTRAINT facilities_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: facility_contacts facility_contacts_facility_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.facility_contacts - ADD CONSTRAINT facility_contacts_facility_id_fkey FOREIGN KEY (facility_id) REFERENCES ctgov.facilities(id); - - --- --- Name: facility_contacts facility_contacts_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.facility_contacts - ADD CONSTRAINT facility_contacts_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: facility_investigators facility_investigators_facility_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.facility_investigators - ADD CONSTRAINT facility_investigators_facility_id_fkey FOREIGN KEY (facility_id) REFERENCES ctgov.facilities(id); - - --- --- Name: facility_investigators facility_investigators_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.facility_investigators - ADD CONSTRAINT facility_investigators_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: id_information id_information_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.id_information - ADD CONSTRAINT id_information_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: intervention_other_names intervention_other_names_intervention_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.intervention_other_names - ADD CONSTRAINT intervention_other_names_intervention_id_fkey FOREIGN KEY (intervention_id) REFERENCES ctgov.interventions(id); - - --- --- Name: intervention_other_names intervention_other_names_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.intervention_other_names - ADD CONSTRAINT intervention_other_names_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: interventions interventions_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.interventions - ADD CONSTRAINT interventions_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: ipd_information_types ipd_information_types_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.ipd_information_types - ADD CONSTRAINT ipd_information_types_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: keywords keywords_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.keywords - ADD CONSTRAINT keywords_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: links links_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.links - ADD CONSTRAINT links_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: milestones milestones_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.milestones - ADD CONSTRAINT milestones_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: milestones milestones_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.milestones - ADD CONSTRAINT milestones_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); - - --- --- Name: outcome_analyses outcome_analyses_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_analyses - ADD CONSTRAINT outcome_analyses_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: outcome_analyses outcome_analyses_outcome_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_analyses - ADD CONSTRAINT outcome_analyses_outcome_id_fkey FOREIGN KEY (outcome_id) REFERENCES ctgov.outcomes(id); - - --- --- Name: outcome_analysis_groups outcome_analysis_groups_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_analysis_groups - ADD CONSTRAINT outcome_analysis_groups_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: outcome_analysis_groups outcome_analysis_groups_outcome_analysis_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_analysis_groups - ADD CONSTRAINT outcome_analysis_groups_outcome_analysis_id_fkey FOREIGN KEY (outcome_analysis_id) REFERENCES ctgov.outcome_analyses(id); - - --- --- Name: outcome_analysis_groups outcome_analysis_groups_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_analysis_groups - ADD CONSTRAINT outcome_analysis_groups_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); - - --- --- Name: outcome_counts outcome_counts_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_counts - ADD CONSTRAINT outcome_counts_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: outcome_counts outcome_counts_outcome_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_counts - ADD CONSTRAINT outcome_counts_outcome_id_fkey FOREIGN KEY (outcome_id) REFERENCES ctgov.outcomes(id); - - --- --- Name: outcome_counts outcome_counts_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_counts - ADD CONSTRAINT outcome_counts_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); - - --- --- Name: outcome_measurements outcome_measurements_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_measurements - ADD CONSTRAINT outcome_measurements_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: outcome_measurements outcome_measurements_outcome_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_measurements - ADD CONSTRAINT outcome_measurements_outcome_id_fkey FOREIGN KEY (outcome_id) REFERENCES ctgov.outcomes(id); - - --- --- Name: outcome_measurements outcome_measurements_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcome_measurements - ADD CONSTRAINT outcome_measurements_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); - - --- --- Name: outcomes outcomes_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.outcomes - ADD CONSTRAINT outcomes_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: overall_officials overall_officials_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.overall_officials - ADD CONSTRAINT overall_officials_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: participant_flows participant_flows_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - --- - -ALTER TABLE ONLY ctgov.participant_flows - ADD CONSTRAINT participant_flows_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); - - --- --- Name: pending_results pending_results_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_active_storage_attachments_uniqueness; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.pending_results - ADD CONSTRAINT pending_results_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE UNIQUE INDEX index_active_storage_attachments_uniqueness ON support.active_storage_attachments USING btree (record_type, record_id, name, blob_id); -- --- Name: provided_documents provided_documents_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_file_records_on_load_event_id; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.provided_documents - ADD CONSTRAINT provided_documents_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX index_file_records_on_load_event_id ON support.file_records USING btree (load_event_id); -- --- Name: reported_event_totals reported_event_totals_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.active_storage_attachments_on_blob_id; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.reported_event_totals - ADD CONSTRAINT reported_event_totals_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.active_storage_attachments_on_blob_id" ON support.active_storage_attachments USING btree (blob_id); -- --- Name: reported_events reported_events_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.active_storage_blobs_on_key; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.reported_events - ADD CONSTRAINT reported_events_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE UNIQUE INDEX "index_support.active_storage_blobs_on_key" ON support.active_storage_blobs USING btree (key); -- --- Name: reported_events reported_events_result_group_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.load_events_on_event_type; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.reported_events - ADD CONSTRAINT reported_events_result_group_id_fkey FOREIGN KEY (result_group_id) REFERENCES ctgov.result_groups(id); +CREATE INDEX "index_support.load_events_on_event_type" ON support.load_events USING btree (event_type); -- --- Name: responsible_parties responsible_parties_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.load_events_on_status; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.responsible_parties - ADD CONSTRAINT responsible_parties_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.load_events_on_status" ON support.load_events USING btree (status); -- --- Name: result_agreements result_agreements_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.load_issues_on_load_event_id; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.result_agreements - ADD CONSTRAINT result_agreements_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.load_issues_on_load_event_id" ON support.load_issues USING btree (load_event_id); -- --- Name: result_contacts result_contacts_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.sanity_checks_on_check_type; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.result_contacts - ADD CONSTRAINT result_contacts_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.sanity_checks_on_check_type" ON support.sanity_checks USING btree (check_type); -- --- Name: result_groups result_groups_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.sanity_checks_on_column_name; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.result_groups - ADD CONSTRAINT result_groups_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.sanity_checks_on_column_name" ON support.sanity_checks USING btree (column_name); -- --- Name: retractions retractions_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.sanity_checks_on_load_event_id; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.retractions - ADD CONSTRAINT retractions_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.sanity_checks_on_load_event_id" ON support.sanity_checks USING btree (load_event_id); -- --- Name: search_results search_results_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.sanity_checks_on_nct_id; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.search_results - ADD CONSTRAINT search_results_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.sanity_checks_on_nct_id" ON support.sanity_checks USING btree (nct_id); -- --- Name: sponsors sponsors_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.sanity_checks_on_table_name; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.sponsors - ADD CONSTRAINT sponsors_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.sanity_checks_on_table_name" ON support.sanity_checks USING btree (table_name); -- --- Name: studies studies_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.study_xml_records_on_created_study_at; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.studies - ADD CONSTRAINT studies_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.study_xml_records_on_created_study_at" ON support.study_xml_records USING btree (created_study_at); -- --- Name: study_references study_references_nct_id_fkey; Type: FK CONSTRAINT; Schema: ctgov; Owner: - +-- Name: index_support.study_xml_records_on_nct_id; Type: INDEX; Schema: support; Owner: - -- -ALTER TABLE ONLY ctgov.study_references - ADD CONSTRAINT study_references_nct_id_fkey FOREIGN KEY (nct_id) REFERENCES ctgov.studies(nct_id); +CREATE INDEX "index_support.study_xml_records_on_nct_id" ON support.study_xml_records USING btree (nct_id); -- diff --git a/spec/models/study_json_record/processor_v2_spec.rb b/spec/models/study_json_record/processor_v2_spec.rb index 8f1280a9..60fbd59f 100644 --- a/spec/models/study_json_record/processor_v2_spec.rb +++ b/spec/models/study_json_record/processor_v2_spec.rb @@ -317,6 +317,38 @@ end end + describe '#design_groups_data' do + it 'should use JSON API to generate data that will be inserted into the design groups table' do + expected_data = { + nct_id: "NCT04207047", + group_type: "EXPERIMENTAL", + title: "Group A", + description: "Group A (up to n=5): Genius exposure 1-3 hours before tissue resection", + }, + { + nct_id: "NCT04207047", + group_type: "EXPERIMENTAL", + title: "Group B", + description: "Group B (up to n=5): Genius exposure 30+7 days, 14+3 days, and 7+3 days before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.", + }, + { + nct_id: "NCT04207047", + group_type: "EXPERIMENTAL", + title: "Group C", + description: "Group C (up to n=5): Genius exposure 90+14 days, 60+10 days, and 30+7 days before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.", + }, + { + nct_id: "NCT04207047", + group_type: "EXPERIMENTAL", + title: "Group D", + description: "Group D (up to n=10): Genius, LaseMD, LaseMD FLEX, eCO2 and/or PicoPlus exposure 14+3 days, 7+3 days, and 1-3 hours before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.", + } + hash = JSON.parse(File.read('spec/support/json_data/NCT04207047.json')) + processor = StudyJsonRecord::ProcessorV2.new(hash) + expect(processor.design_groups_data).to eq(expected_data) + end + end + describe '#brief_summary_data' do it 'should test brief_summary_data' do expected_data = { diff --git a/spec/support/json_data/NCT04207047.json b/spec/support/json_data/NCT04207047.json new file mode 100644 index 00000000..ad92bbc8 --- /dev/null +++ b/spec/support/json_data/NCT04207047.json @@ -0,0 +1,259 @@ +{ + "protocolSection": { + "identificationModule": { + "nctId": "NCT04207047", + "orgStudyIdInfo": { + "id": "L18006" + }, + "organization": { + "fullName": "LUTRONIC Corporation", + "class": "INDUSTRY" + }, + "briefTitle": "Histologic Evaluation of Tissue Following Lutronic System Exposure", + "officialTitle": "Histologic Evaluation of Tissue Following Lutronic System Exposure" + }, + "statusModule": { + "statusVerifiedDate": "2019-12", + "overallStatus": "UNKNOWN", + "lastKnownStatus": "ACTIVE_NOT_RECRUITING", + "expandedAccessInfo": { + "hasExpandedAccess": false + }, + "startDateStruct": { + "date": "2018-10-02", + "type": "ACTUAL" + }, + "primaryCompletionDateStruct": { + "date": "2018-10-31", + "type": "ACTUAL" + }, + "completionDateStruct": { + "date": "2020-03-31", + "type": "ESTIMATED" + }, + "studyFirstSubmitDate": "2019-12-17", + "studyFirstSubmitQcDate": "2019-12-18", + "studyFirstPostDateStruct": { + "date": "2019-12-20", + "type": "ACTUAL" + }, + "lastUpdateSubmitDate": "2019-12-18", + "lastUpdatePostDateStruct": { + "date": "2019-12-20", + "type": "ACTUAL" + } + }, + "sponsorCollaboratorsModule": { + "responsibleParty": { + "type": "SPONSOR" + }, + "leadSponsor": { + "name": "LUTRONIC Corporation", + "class": "INDUSTRY" + } + }, + "oversightModule": { + "oversightHasDmc": false, + "isFdaRegulatedDrug": false, + "isFdaRegulatedDevice": true, + "isUnapprovedDevice": true, + "isUsExport": false + }, + "descriptionModule": { + "briefSummary": "Enrollment of up to 25 subjects; subjects enrolled may be greater than subjects receiving test spot exposure visits. No pre-treatment medication prior to test spot exposure. Up to 6 tattoo points will be applied to each side of the abdomen immediately before or after test spot exposures to map and locate exposed spots on the excised pannis. Tattoos in the area to be resected will be placed to outline the test spot exposure areas. Photographs of exposed sites may be taken at investigator's discretion.", + "detailedDescription": "Enrolled subjects who qualify will be assigned to one of four groups depending on the time of their screening appointment and scheduled abdominoplasty. Test spot exposures will take place prior to abdominoplasty resections at the following possible time points (by group):\n\n* Group A (up to n=5): Genius exposure 1-3 hours before tissue resection\n* Group B (up to n=5): Genius exposure 30+7 days, 14+3 days, and 7+3 days before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.\n* Group C (up to n=5): Genius exposure 90+14 days, 60+10 days, and 30+7 days before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.\n* Group D (up to n=10): Genius, LaseMD, LaseMD FLEX, eCO2 and/or PicoPlus exposure 14+3 days, 7+3 days, and 1-3 hours before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.\n\nSubjects receive test spot exposures at sites on the abdomen that will be resected during abdominoplasty. The area of the test spots will be approximately 2 x 2 cm2 but may be appropriately adjusted for fit within the resected tissue area. Subject pain during exposure will be monitored and recorded using a 0-10 Numeric Rating Scale.\n\nActivities related to the abdominoplasty procedure are considered outside the scope of this study and will not be recorded or reported on during this study. The subject will be exited from the study prior to abdominoplasty procedures after all study related procedures with the exception of tissue preparation of excised tissue are complete. Tissue preparation of excised tissue will be completed after the subject has been exited from the study." + }, + "conditionsModule": { + "conditions": [ + "Abdominoplasty" + ] + }, + "designModule": { + "studyType": "INTERVENTIONAL", + "phases": [ + "NA" + ], + "designInfo": { + "allocation": "NON_RANDOMIZED", + "interventionModel": "SINGLE_GROUP", + "primaryPurpose": "TREATMENT", + "maskingInfo": { + "masking": "NONE" + } + }, + "enrollmentInfo": { + "count": 3, + "type": "ACTUAL" + } + }, + "armsInterventionsModule": { + "armGroups": [ + { + "label": "Group A", + "type": "EXPERIMENTAL", + "description": "Group A (up to n=5): Genius exposure 1-3 hours before tissue resection", + "interventionNames": [ + "Device: Genius" + ] + }, + { + "label": "Group B", + "type": "EXPERIMENTAL", + "description": "Group B (up to n=5): Genius exposure 30+7 days, 14+3 days, and 7+3 days before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.", + "interventionNames": [ + "Device: Genius" + ] + }, + { + "label": "Group C", + "type": "EXPERIMENTAL", + "description": "Group C (up to n=5): Genius exposure 90+14 days, 60+10 days, and 30+7 days before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.", + "interventionNames": [ + "Device: Genius" + ] + }, + { + "label": "Group D", + "type": "EXPERIMENTAL", + "description": "Group D (up to n=10): Genius, LaseMD, LaseMD FLEX, eCO2 and/or PicoPlus exposure 14+3 days, 7+3 days, and 1-3 hours before tissue resection. All test spot exposure visits will have a follow-up visit at 7+3 days after the test spot exposure visit.", + "interventionNames": [ + "Device: Genius", + "Device: eC02", + "Device: PicoPlus", + "Device: LaseMD", + "Device: LaseMD Flex" + ] + } + ], + "interventions": [ + { + "type": "DEVICE", + "name": "Genius", + "description": "The Infini Radiofrequency System (K121481) is the predicate device. It is a minimally invasive radiofrequency device that employs a bipolar microneedle electrode system indicated for use in dermatologic and general surgical procedures for electrocoagulation and hemostasis, and the percutaneous treatment of facial wrinkles.\n\nThe Genius system is substantially equivalent to the Infini device with a digitally controlled direct drive mechanism for needle insertion and an improved needle design for easier needle insertion. The active tip of the Genius system is the substantially equivalent to the Infini device. The handpiece of the Genius system has also been redesigned to be lighter and more ergonomic.", + "armGroupLabels": [ + "Group A", + "Group B", + "Group C", + "Group D" + ] + }, + { + "type": "DEVICE", + "name": "eC02", + "description": "The eCO2 Laser System (K091115) is indicated for use in dermatological procedures requiring ablation (removal), resurfacing and coagulation of soft tissue. Additionally, the 120 micron and 300 micron spot sizes are used in the treatment of wrinkles; rhytides, furrows, fine lines, textural irregularities, pigmented lesions and vascular dyschromia. The fractional 90 degree BellaV handpiece is intended to provide fractional CO2 treatment of skin and is not yet cleared.", + "armGroupLabels": [ + "Group D" + ] + }, + { + "type": "DEVICE", + "name": "PicoPlus", + "description": "The PICOPLUS Laser System (K173700) is indicated for use in surgical and aesthetic applications in the medical specialties of dermatology and general and plastic surgery as follows:", + "armGroupLabels": [ + "Group D" + ] + }, + { + "type": "DEVICE", + "name": "LaseMD", + "description": "The LaseMD Laser System (K171009) is a 1927 factional thulium laser indicated for use in dermatological procedures requiring the coagulation of soft tissue, treatment of actinic keratosis, and treatment of benign pigmented lesions such as, but not limited to lentigos (age spots), solar lentigos (sun spots) and ephiledes (freckles). The cleared LaseMD system is a 5W system.", + "armGroupLabels": [ + "Group D" + ] + }, + { + "type": "DEVICE", + "name": "LaseMD Flex", + "description": "There are two new versions of the LaseMD system to be used in this study that are uncleared and investigational use only. The only change from the cleared system to the one of the LaseMD systems to be used in this study is that the watts have been increased to 20W and a new tip configuration with a larger 250+ um spot size. The other LaseMD system to be used in this study is the LaseMD FLEX. It also has 20W with larger spot size, a modified flat-top beam profile (as opposed to a Gaussian beam profile) and a faster scan rate. All other technical specifications remain the same as the cleared device.", + "armGroupLabels": [ + "Group D" + ] + } + ] + }, + "outcomesModule": { + "primaryOutcomes": [ + { + "measure": "Primary Outcome", + "description": "Demonstrate that complete re-epithelialization occurs at the treatment sites within two weeks post treatment.", + "timeFrame": "14 days" + } + ], + "secondaryOutcomes": [ + { + "measure": "Secondary Outcome", + "description": "Demonstrate vacuolization and coagulation in the skin immediate post treatment.", + "timeFrame": "2 hours" + } + ] + }, + "eligibilityModule": { + "eligibilityCriteria": "Inclusion Criteria:\n\n1. Male or female, age 18 years and older.\n2. Subject in good health.\n3. Fitzpatrick Skin Type I to VI. Protocol Number: L18006 v5.0 11192018 Page 8 of 52\n4. Abdominoplasty surgery planned and scheduled.\n5. Understands and accepts the obligation not to undergo any other procedures in the areas to be treated/exposed to Genius test spots until abdominoplasty.\n6. Willingness and ability to comply with protocol requirements, including returning for follow-up visits and abstaining from exclusionary procedures for the duration of the study.\n7. Subjects of childbearing potential must have a negative urine pregnancy test result and must not be lactating at the Screening Visit and be willing and able to use an acceptable method of birth control (e.g. barrier methods used with a spermicidal agent, hormonal methods, IUD, surgical sterilization, abstinence) during the study. Women will not be considered of childbearing potential if one of the following conditions is documented on the medical history:\n\n 1. Postmenopausal for at least 12 months prior to study;\n 2. Without a uterus and/or both ovaries; or\n 3. Bilateral tubal ligation at least six months prior to study enrollment.\n8. Absence of physical or psychological conditions unacceptable to the investigator.\n9. Willingness and ability to provide written informed consent and HIPAA authorization prior to performance of any study-related procedure.\n\nExclusion Criteria:\n\n1. Poorly controlled medical condition that could compromise wound healing or increase risk of infection such as an impaired immune system due to immunosuppressive diseases such as AIDS and HIV, or use of immunosuppressive medications, radiation therapy, or chemotherapy.\n2. Subjects with sensitivity or allergy to gold.\n3. Subjects who are pregnant, nursing, or anticipate a pregnancy during the length of the trial.\n4. Subjects with current skin cancer or other malignant disease including pre-malignant moles.\n5. History of vascular disease.\n6. History of bleeding disorders.\n7. History of skin disorders, keloid scarring, and/or abnormal wound healing.\n8. Presence of an active skin condition or infection in the exposure area such as sores, Psoriasis, eczema, rash, severe active inflammatory acne or oral herpes simplex breakout.\n9. Open wounds or lesions in the exposure area.\n10. Subjects with implanted medical devices: pacemaker, cardioverts, superficial metal within the exposure area, and other implantable devices or synthetic fillers within the exposure area.\n11. History of seizure disorders due to light (Group D).\n12. History of vitiligo, eczema, or psoriasis (Group D).\n13. History of pigmentary disorders, particularly tendency for hyper- or hypo-pigmentation (Group D).\n14. Excessive or recent significant tan in areas of test spot exposure (Group D).\n15. Inability to understand the protocol or to give informed consent.\n16. History of chronic drug or alcohol abuse.\n17. Concurrent enrollment in any study involving the use of investigational devices or drugs.\n18. History of surgical or cosmetic treatments in exposure area within the past six months.\n19. History or current use of the following medications:\n\n 1. Daily anticoagulants, aspirin, iron supplements, herbal supplements or ointments such as ginkgo, ginseng or garlic;\n 2. Topical retinoid in the exposure area within the past one week; and Protocol Number: L18006 v5.0 11192018 Page 9 of 52\n 3. Psychiatric drugs that in the investigators opinion would impair the subject from understanding the protocol requirements or understanding and signing the informed consent.\n\n -", + "healthyVolunteers": true, + "sex": "ALL", + "minimumAge": "18 Years", + "stdAges": [ + "ADULT", + "OLDER_ADULT" + ] + }, + "contactsLocationsModule": { + "locations": [ + { + "facility": "William LoVerme, MD", + "city": "Billerica", + "state": "Massachusetts", + "zip": "01821", + "country": "United States", + "geoPoint": { + "lat": 42.55843, + "lon": -71.26895 + } + } + ] + }, + "ipdSharingStatementModule": { + "ipdSharing": "NO" + } + }, + "derivedSection": { + "miscInfoModule": { + "versionHolder": "2023-11-28", + "modelPredictions": { + "bmiLimits": { + "minBmi": 0, + "maxBmi": 101 + } + } + }, + "interventionBrowseModule": { + "browseLeaves": [ + { + "id": "M9266", + "name": "Hemostatics", + "relevance": "LOW" + }, + { + "id": "M6764", + "name": "Dermatologic Agents", + "relevance": "LOW" + } + ], + "browseBranches": [ + { + "abbrev": "Coag", + "name": "Coagulants" + }, + { + "abbrev": "All", + "name": "All Drugs and Chemicals" + }, + { + "abbrev": "Derm", + "name": "Dermatologic Agents" + } + ] + } + }, + "hasResults": false + } \ No newline at end of file