{"id":16543255,"url":"https://github.com/sanders41/clintrial_queries","last_synced_at":"2026-03-07T06:32:56.275Z","repository":{"id":103489386,"uuid":"113927133","full_name":"sanders41/clintrial_queries","owner":"sanders41","description":"A set of queries that I have found useful at times with using Clintrial. Most are for querying Clintrial's metadata tables.","archived":false,"fork":false,"pushed_at":"2021-01-01T13:35:22.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-01T01:53:33.693Z","etag":null,"topics":["oracle","sql"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanders41.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-12T01:19:19.000Z","updated_at":"2021-01-01T13:35:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0686287-9fcc-4175-926d-7bf068027a6b","html_url":"https://github.com/sanders41/clintrial_queries","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanders41/clintrial_queries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanders41%2Fclintrial_queries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanders41%2Fclintrial_queries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanders41%2Fclintrial_queries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanders41%2Fclintrial_queries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanders41","download_url":"https://codeload.github.com/sanders41/clintrial_queries/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanders41%2Fclintrial_queries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oracle","sql"],"created_at":"2024-10-11T18:59:46.320Z","updated_at":"2026-03-07T06:32:56.238Z","avatar_url":"https://github.com/sanders41.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clintrial Queries\nThese queries are some that I have found useful at times with using Clintrial. Most are for querying Clintrial's\nmetadata tables.\n\n* **protocol_derivations.sql** - Gets a list of all derivations and their associated metadata \n(if it is compiled, last modified date, description, etc.) for a protocol. Change `WHERE protocol = 'ENTER PROTOCOL NAME'` \nto the name of the protocol you want to use.\n\n* **protocol_item_count.sql** - Gets a count of items for a specific protocol. Change \n`WHERE protocol = 'ENTER PROTOCOL NAME'` to the name of the protocol you want to use. \n`WHERE panel NOT LIKE 'VCT_%` removes Clintrials VCT system panels from the count.\n\n* **protocol_items.sql** - Gets a list of all the items and associated metadata (panel, SAS name,\ndata type, etc.) in a protocol. Change \"ENTER PROTOCOL NAME\" in \n`WHERE protocol = 'ENTER PROTOCOL NAME'` to the name of the protocol you want to use.\n\n* **protocol_item_count_year.sql** - Gets a count of items in each protocol for the specified year.\nChange the year in `WHERE create_date LIKE '%2018'` to the year you wan to use. `WHERE panel NOT LIKE 'VCT_%`\nremoves Clintrials VCT system panels from the count.\n\n* **protocol_page_section_items.sql** - Gets a list of all pages sections and the field names with\ntheir associated metadata for a protocol. Change `WHERE protocol = 'ENTER PROTOCOL NAME'` to the name \nof the protocol you want to use.\n\n* **protocol_page_sections.sql** - Gets a list of all pages sections and associated metadata (associated\npanel, has repeats, desctiption, etc) for a protocol. Change `WHERE protocol = 'ENTER PROTOCOL NAME'` \nto the name of the protocol you want to use.\n\n* **protocol_panel_count_year.sql** - Gets a count of panels in each protocol for the specified year. Change\nthe year in `WHERE create_date LIKE '%2018'` to the year you want to use. `WHERE panel NOT LIKE 'VCT_%`\nremoves Clintrials VCT system panels from the count.\n\n* **protocol_panels.sql** - Gets a list of all the panels in a protocol with associated metadata (panel type,\ndesctiption, if it is installed, etc.). Change \"ENTER PROTOCOL NAME\" in \n`WHERE protocol = 'ENTER PROTOCOL NAME'` to the name of the protocol you want to use.\n\n* **protocol_rules.sql** - Gets a list of all rules and their associated metadata (if it is compiled, \nif the message is derived, message text, etc.) for a protocol. Change `WHERE protocol = 'ENTER PROTOCOL NAME'` \nto the name of the protocol you want to use.\n\n* **protocol_templates.sql** - Gets a list of all the page templates in a protocol with associated metadata \nChange \"ENTER PROTOCOL NAME\" in `WHERE protocol = 'ENTER PROTOCOL NAME'` to the name of the protocol \nyou want to use.\n\n* **protocols.sql** - Gets a list of all protocols and the associated metadata.\n\n* **protocols_created_in_year.sql** - Gets a lost of all protocols and associated metadata created in\na certain year. Change the 2017 in `WHERE created_date LIKE '%2017'` to the year for which you want\nto search.\n\n* **table_names.sql** - Gets a list of all table names for a specific user. Change `WHERE owner= 'CTSDD'`\nto the name of the user you want to use. user_names.sql can be used to get a list of all available users.\n\n* **user_names.sql** - This one is not Clintrial specific but Oracle related instead. It gets a list\nof all Oracle users. For each protocol Clintrial creates a new user with the name of the protocol, so\nusing this query will give a list of all Oracle users, and will also contain all Clintrial protocols. in\naddition Clintrial stores meta data under certain users so this query can be used to find these.\nClintrial users generally start with either CT or CTS (for example CTSDD is a user), so you can find \nthese users and explor what is in them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanders41%2Fclintrial_queries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanders41%2Fclintrial_queries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanders41%2Fclintrial_queries/lists"}