UNPKG

28.2 kBJSONView Raw
1{"openapi":"3.0.0","info":{"title":"OpenTrials","version":"0.0.1","x-apisguru-categories":["open_data"],"x-logo":{"backgroundColor":"#FFFFFF","url":"https://avatars1.githubusercontent.com/u/13900836?s=200&v=4"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/opentrials/api/master/api/swagger/swagger.yaml","version":"2.0"}],"x-providerName":"opentrials.local"},"paths":{"/conditions/{id}":{"get":{"description":"Returns condition details","operationId":"getCondition","parameters":[{"description":"ID of the condition","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Condition"}}}},"404":{"description":"Condition not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["conditions"]},"x-swagger-router-controller":"conditions"},"/document_categories":{"get":{"description":"Returns document categories","operationId":"listDocumentCategories","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCategoryList"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["document_categories"]},"x-swagger-router-controller":"document_categories"},"/documents":{"get":{"description":"Returns documents","operationId":"listDocuments","parameters":[{"description":"The page number","in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}},{"description":"Number of items per page","in":"query","name":"per_page","schema":{"type":"integer","minimum":10,"maximum":100,"default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["documents"]},"x-swagger-router-controller":"documents"},"/documents/{id}":{"get":{"description":"Returns details of a document","operationId":"getDocument","parameters":[{"description":"ID of the document","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"404":{"description":"Document not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["documents"]},"x-swagger-router-controller":"documents"},"/fda_applications":{"get":{"description":"Returns FDA applications","operationId":"listFDAApplications","parameters":[{"description":"The page number","in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1}},{"description":"Number of items per page","in":"query","name":"per_page","schema":{"type":"integer","minimum":10,"maximum":100,"default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FDAApplicationList"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["fda_applications"]},"x-swagger-router-controller":"fda_applications"},"/fda_applications/{id}":{"get":{"description":"Returns an FDA application details","operationId":"getFDAApplication","parameters":[{"description":"ID of the FDA application","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FDAApplication"}}}},"404":{"description":"FDA application not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["fda_applications"]},"x-swagger-router-controller":"fda_applications"},"/interventions/{id}":{"get":{"description":"Returns intervention details","operationId":"getIntervention","parameters":[{"description":"ID of the intervention","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Intervention"}}}},"404":{"description":"Intervention not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["interventions"]},"x-swagger-router-controller":"interventions"},"/organisations/{id}":{"get":{"description":"Returns organisation details","operationId":"getOrganisation","parameters":[{"description":"ID of the organisation","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Organisation not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["organisations"]},"x-swagger-router-controller":"organisations"},"/persons/{id}":{"get":{"description":"Returns person details","operationId":"getPerson","parameters":[{"description":"ID of the person","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"404":{"description":"Person not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["persons"]},"x-swagger-router-controller":"persons"},"/publications/{id}":{"get":{"description":"Returns publication details","operationId":"getPublication","parameters":[{"description":"ID of the publication","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publication"}}}},"404":{"description":"Publication not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["publications"]},"x-swagger-router-controller":"publications"},"/search":{"get":{"description":"Returns trials based on a search query. By default, it'll search in all of a trial's attributes.\n- `q` is a [ElasticSearch query string](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) (e.g. `public_title:(depressive OR depression)`)\n- `page` can take a value between `1` and `100`\n- `per_page` can take a value between `10` and `100`","operationId":"searchTrials","parameters":[{"description":"The search query (follows the [ElasticSearch Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) syntax)","in":"query","name":"q","schema":{"type":"string"}},{"description":"The page number","in":"query","name":"page","schema":{"type":"integer","minimum":1,"maximum":100,"default":1}},{"description":"Number of items per page","in":"query","name":"per_page","schema":{"type":"integer","minimum":10,"maximum":100,"default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialSearchResults"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["trials"]},"x-swagger-router-controller":"search"},"/search/autocomplete/{in}":{"get":{"description":"Autocomplete search feature for supported database entities (`location`). It has the same options as a regular `search` operation, with an extra **required** `in` parameter indicating the entity type to search.","operationId":"autocomplete","parameters":[{"description":"The entity to search for","in":"path","name":"in","required":true,"schema":{"type":"string","enum":["location"]}},{"description":"The search query","in":"query","name":"q","schema":{"type":"string"}},{"description":"The page number","in":"query","name":"page","schema":{"type":"integer","minimum":1,"maximum":100,"default":1}},{"description":"Number of items per page","in":"query","name":"per_page","schema":{"type":"integer","minimum":10,"maximum":100,"default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutocompleteResults"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["search"]},"x-swagger-router-controller":"search"},"/search/fda_documents":{"get":{"description":"Search the FDA documents","operationId":"searchFDADocuments","parameters":[{"description":"The search query (follows the [ElasticSearch Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) syntax)","in":"query","name":"q","schema":{"type":"string"}},{"description":"Search query on the documents file's text (follows the [ElasticSearch Simple Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-simple-query-string-query.html#_simple_query_string_syntax) syntax)","in":"query","name":"text","schema":{"type":"string"}},{"description":"The page number","in":"query","name":"page","schema":{"type":"integer","minimum":1,"maximum":100,"default":1}},{"description":"Number of items per page","in":"query","name":"per_page","schema":{"type":"integer","minimum":10,"maximum":100,"default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FDADocumentSearchResults"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["search"]},"x-swagger-router-controller":"search"},"/sources":{"get":{"description":"Returns list of sources","operationId":"list","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceList"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["sources"]},"x-swagger-router-controller":"sources"},"/swagger.yaml":{"x-swagger-pipe":"swagger_raw"},"/trials/{id}":{"get":{"description":"Returns a trial's details and related entities (e.g. `conditions`).","operationId":"getTrial","parameters":[{"description":"ID of the trial","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trial"}}}},"404":{"description":"Trial not found"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["trials"]},"x-swagger-router-controller":"trials"},"/trials/{id}/records":{"get":{"description":"Returns a trial's raw records from its sources","operationId":"getRecords","parameters":[{"description":"ID of the trial","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordList"}}}},"404":{"description":"Trial not found"}},"tags":["trials"]},"x-swagger-router-controller":"trials"},"/trials/{trialId}/records/{id}":{"get":{"description":"Returns a trial's raw record from its sources","operationId":"getRecord","parameters":[{"description":"ID of the trial","in":"path","name":"trialId","required":true,"schema":{"type":"string"}},{"description":"ID of the trial's record","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Record"}}}},"404":{"description":"Trial not found"}},"tags":["trials"]},"x-swagger-router-controller":"trials"}},"servers":[{"url":"https://opentrials.local/v1"}],"components":{"schemas":{"AutocompleteResult":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"AutocompleteResults":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AutocompleteResult"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","items"],"type":"object"},"Condition":{"properties":{"id":{"description":"ID of the condition","type":"string"},"name":{"description":"Name of the condition","type":"string"},"url":{"description":"OpenTrials API URL of the condition","type":"string"}},"required":["id","name","url"],"type":"object"},"Discrepancies":{"description":"Object listing the Trial's discrepant fields","properties":{"gender":{"items":{"$ref":"#/components/schemas/DiscrepantFieldString"},"type":"array"},"has_published_results":{"items":{"$ref":"#/components/schemas/DiscrepantFieldBoolean"},"type":"array"},"recruitment_status":{"items":{"$ref":"#/components/schemas/DiscrepantFieldString"},"type":"array"},"status":{"items":{"$ref":"#/components/schemas/DiscrepantFieldString"},"type":"array"},"target_sample_size":{"items":{"$ref":"#/components/schemas/DiscrepantFieldInteger"},"type":"array"}},"type":"object"},"DiscrepancyFieldBase":{"properties":{"record_id":{"type":"string"},"source_name":{"type":"string"}},"required":["record_id","source_name"],"type":"object"},"DiscrepantFieldBoolean":{"allOf":[{"$ref":"#/components/schemas/DiscrepancyFieldBase"},{"properties":{"value":{"type":"boolean"}},"type":"object"}],"type":"object"},"DiscrepantFieldInteger":{"allOf":[{"$ref":"#/components/schemas/DiscrepancyFieldBase"},{"properties":{"value":{"type":"integer"}},"type":"object"}],"type":"object"},"DiscrepantFieldString":{"allOf":[{"$ref":"#/components/schemas/DiscrepancyFieldBase"},{"properties":{"value":{"type":"string"}},"type":"object"}],"type":"object"},"Document":{"properties":{"document_category":{"$ref":"#/components/schemas/DocumentCategory"},"fda_application":{"$ref":"#/components/schemas/FDAApplication"},"file":{"$ref":"#/components/schemas/File"},"id":{"description":"ID of the document","type":"string"},"name":{"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"source_url":{"description":"URL of origin for this document","type":"string"},"trials":{"items":{"$ref":"#/components/schemas/TrialSummary"},"type":"array"},"url":{"description":"OpenTrials API URL of the document","type":"string"}},"required":["id","name","url","document_category"],"type":"object"},"DocumentCategory":{"properties":{"group":{"description":"Name of document category","type":"string"},"id":{"type":"integer"},"name":{"description":"Name of document sub-category","type":"string"}},"required":["id","name"],"type":"object"},"DocumentCategoryList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentCategory"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","items"],"type":"object"},"DocumentList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentSummary"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","items"],"type":"object"},"DocumentSummary":{"properties":{"document_category":{"$ref":"#/components/schemas/DocumentCategory"},"fda_application":{"$ref":"#/components/schemas/FDAApplication"},"file":{"$ref":"#/components/schemas/FileSummary"},"id":{"type":"string"},"name":{"type":"string"},"source_id":{"description":"ID of the document's source","type":"string"},"source_url":{"description":"URL of origin for this document","type":"string"},"trials":{"items":{"$ref":"#/components/schemas/TrialSummary"},"type":"array"},"url":{"description":"OpenTrials API URL of the document","type":"string"}},"required":["id","name","url","document_category"],"type":"object"},"ErrorResponse":{"properties":{"message":{"type":"string"}},"required":["message"],"type":"object"},"FDAApplication":{"properties":{"active_ingredients":{"description":"Active ingredients contained in the drug","type":"string"},"drug_name":{"description":"Name of the drug","type":"string"},"fda_approvals":{"description":"Associated FDA approvals","items":{"$ref":"#/components/schemas/FDAApproval"},"type":"array"},"id":{"description":"FDA application ID","type":"string"},"organisation":{"$ref":"#/components/schemas/Organisation"},"type":{"description":"The FDA application type (e.g. \"NDA\", \"ANDA\", etc.)","type":"string"},"url":{"description":"OpenTrials API URL for this FDA application","type":"string"}},"required":["id","url"],"type":"object"},"FDAApplicationList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FDAApplication"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","items"],"type":"object"},"FDAApproval":{"properties":{"action_date":{"format":"date-time","type":"string"},"fda_application":{"$ref":"#/components/schemas/FDAApplication"},"id":{"description":"FDA approval ID","type":"string"},"notes":{"description":"Additional information about the FDA approval","type":"string"},"supplement_number":{"type":"integer"},"type":{"description":"Type of FDA approval","type":"string"}},"required":["id","action_date","supplement_number","type"],"type":"object"},"FDADocumentSearchResult":{"allOf":[{"$ref":"#/components/schemas/DocumentSummary"},{"properties":{"file":{"$ref":"#/components/schemas/File"}},"type":"object"}]},"FDADocumentSearchResults":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FDADocumentSearchResult"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","items"],"type":"object"},"File":{"allOf":[{"$ref":"#/components/schemas/FileSummary"},{"properties":{"pages":{"description":"Array with text of each of the file's pages","items":{"properties":{"num":{"description":"Page number","minimum":1,"type":"integer"},"text":{"type":"string"}},"required":["num","text"],"type":"object"},"type":"array"}},"type":"object"}],"type":"object"},"FileSummary":{"properties":{"documentcloud_id":{"type":"string"},"id":{"description":"ID of the file","type":"string"},"sha1":{"type":"string"},"source_url":{"description":"URL of origin for this file","type":"string"}},"type":"object"},"Intervention":{"properties":{"id":{"description":"ID of the intervention","type":"string"},"name":{"description":"Name of the intervention","type":"string"},"type":{"description":"Type of the intervention (drug / other)","enum":["drug","procedure","other"],"type":"string"},"url":{"description":"OpenTrials API URL of the intervention","type":"string"}},"required":["id","name","url"],"type":"object"},"Location":{"properties":{"id":{"description":"ID of the location","type":"string"},"name":{"description":"Name of the location","type":"string"},"type":{"description":"Type of the location (country / city / other)","enum":["country","city","other"],"type":"string"}},"required":["id","name"],"type":"object"},"Organisation":{"properties":{"id":{"description":"ID of the organisation","type":"string"},"name":{"description":"Name of the organisation","type":"string"},"url":{"description":"OpenTrials API URL of the organisation","type":"string"}},"required":["id","name","url"],"type":"object"},"Person":{"properties":{"id":{"description":"ID of the person","type":"string"},"name":{"description":"Name of the person","type":"string"},"url":{"description":"OpenTrials API URL of the person","type":"string"}},"required":["id","name","url"],"type":"object"},"Publication":{"properties":{"abstract":{"type":"string"},"authors":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"date":{"format":"date-time","type":"string"},"id":{"description":"ID of the publication","type":"string"},"journal":{"type":"string"},"slug":{"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"source_url":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"}},"required":["id","url","source","source_url","title","abstract"],"type":"object"},"PublicationSummary":{"properties":{"id":{"type":"string"},"source_id":{"type":"string"},"source_url":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["id","url","title","source_id","source_url"],"type":"object"},"Record":{"properties":{"created_at":{"description":"Date when the record was created","format":"date-time","type":"string"},"id":{"description":"ID of the record","type":"string"},"identifiers":{"description":"Object that maps the trial's sources ids with its identifiers.","type":"object"},"is_primary":{"description":"Is this record the primary source of data for its trial","type":"boolean"},"last_verification_date":{"description":"Date when the record's data was last verified by provider","format":"date-time","type":"string"},"public_title":{"description":"Title of the record","type":"string"},"recruitment_status":{"description":"Trial's recruitment status (e.g. recruiting, unknown etc.)","enum":["recruiting","not_recruiting","unknown","other"],"type":"string"},"source":{"$ref":"#/components/schemas/Source"},"source_id":{"description":"ID of the record's source","type":"string"},"source_url":{"description":"URL of the record's source (where it was collected from)","type":"string"},"status":{"description":"Trial's status (e.g. ongoing, withdrawn, complete etc.)","enum":["ongoing","withdrawn","suspended","terminated","complete","unknown","other"],"type":"string"},"trial_id":{"description":"ID of the trial referenced in the record","type":"string"},"trial_url":{"description":"OpenTrials API URL of the trial referenced in the record","type":"string"},"updated_at":{"description":"Date when the record was updated","format":"date-time","type":"string"},"url":{"description":"OpenTrials API URL of the record","type":"string"}},"required":["id","url","trial_id","trial_url","source","source_url","public_title","created_at","updated_at"],"type":"object"},"RecordList":{"items":{"$ref":"#/components/schemas/Record"},"type":"array"},"RecordSummary":{"properties":{"id":{"type":"string"},"is_primary":{"type":"boolean"},"last_verification_date":{"format":"date-time","type":"string"},"source_id":{"type":"string"},"url":{"type":"string"}},"required":["id","url","source_id"],"type":"object"},"RiskOfBias":{"properties":{"id":{"type":"string"},"risk_of_bias_criteria":{"items":{"$ref":"#/components/schemas/RiskOfBiasCriteria"},"type":"array"},"source_id":{"type":"string"},"source_url":{"type":"string"},"study_id":{"type":"string"}},"required":["id","source_id","source_url","study_id"],"type":"object"},"RiskOfBiasCriteria":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"value":{"enum":["yes","no","unknown"],"type":"string"}},"required":["id","name","value"],"type":"object"},"Source":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"source_url":{"description":"URL to source's website","type":"string"},"terms_and_conditions_url":{"type":"string"},"type":{"enum":["register","journal","other"],"type":"string"}},"required":["id","name"],"type":"object"},"SourceList":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"Trial":{"properties":{"age_range":{"properties":{"max_age":{"description":"Maximum participant age (e.g. \"12 Years\", \"1 Month\", \"15 Days\"). If unknown, it's `undefined`. If no limit, it's \"any\". If not applicable, it's \"N/A\".","type":"string"},"min_age":{"description":"Minimum participant age (e.g. \"12 Years\", \"1 Month\", \"15 Days\"). If unknown, it's `undefined`. If no limit, it's \"any\". If not applicable, it's \"N/A\".","type":"string"}},"type":"object"},"brief_summary":{"description":"Summary of the trial","type":"string"},"completion_date":{"description":"Date the trial was completed","format":"date-time","type":"string"},"conditions":{"description":"Conditions the trial refers to","items":{"$ref":"#/components/schemas/Condition"},"type":"array"},"discrepancies":{"description":"Discrepancies in trial's details between different sources","items":{"$ref":"#/components/schemas/Discrepancies"},"type":"object"},"documents":{"description":"Documents related to the trial","items":{"$ref":"#/components/schemas/DocumentSummary"},"type":"array"},"gender":{"description":"Gender of the subjects of the trial","enum":["both","male","female"],"type":"string"},"has_published_results":{"description":"Trial has its results published (true/false)","type":"boolean"},"id":{"description":"ID of the trial","type":"string"},"identifiers":{"description":"Object that maps the trial's sources ids with its identifiers.","type":"object"},"interventions":{"description":"Interventions related to the trial","items":{"$ref":"#/components/schemas/Intervention"},"type":"array"},"locations":{"description":"Locations related to the trial","items":{"$ref":"#/components/schemas/TrialLocation"},"type":"array"},"organisations":{"description":"Organisations related to the trial","items":{"$ref":"#/components/schemas/TrialOrganisation"},"type":"array"},"persons":{"description":"People related to the trial","items":{"$ref":"#/components/schemas/TrialPerson"},"type":"array"},"public_title":{"description":"Title of the trial","type":"string"},"publications":{"description":"Publications referring the trial","items":{"$ref":"#/components/schemas/PublicationSummary"},"type":"array"},"records":{"description":"(published) records of the trial","items":{"$ref":"#/components/schemas/RecordSummary"},"type":"array"},"recruitment_status":{"description":"Recruitment status of the trial","enum":["recruiting","not_recruiting","unknown","other"],"type":"string"},"registration_date":{"description":"Date the trial was registered","format":"date-time","type":"string"},"results_exemption_date":{"description":"Date when a certification of exemption has been filed for the trial","format":"date-time","type":"string"},"risks_of_bias":{"items":{"$ref":"#/components/schemas/RiskOfBias"},"type":"array"},"source_id":{"description":"ID of the trial's source","type":"string"},"sources":{"items":{"$ref":"#/components/schemas/Source"},"type":"object"},"status":{"description":"Completion status of the trial","enum":["ongoing","withdrawn","suspended","terminated","complete","unknown","other"],"type":"string"},"study_phase":{"description":"Phases of the study (e.g. `[\"Phase 2\"]` or `[\"Phase 1\", \"Phase 2\"]`)","items":{"type":"string"},"type":"array"},"target_sample_size":{"description":"Target sample size for the trial","minimum":0,"type":"integer"},"url":{"description":"Source URL (where the trial was collected from)","type":"string"}},"required":["id","url","public_title","locations","interventions","persons","organisations","records","publications","sources","risks_of_bias"],"type":"object"},"TrialLocation":{"allOf":[{"$ref":"#/components/schemas/Location"},{"properties":{"role":{"enum":["recruitment_countries","other"],"type":"string"}},"type":"object"}],"description":"Location of a trial","type":"object"},"TrialOrganisation":{"allOf":[{"$ref":"#/components/schemas/Organisation"},{"properties":{"role":{"enum":["primary_sponsor","sponsor","funder","other"],"type":"string"}},"type":"object"}],"type":"object"},"TrialPerson":{"allOf":[{"$ref":"#/components/schemas/Person"},{"properties":{"role":{"enum":["principal_investigator","public_queries","scientific_queries","other"],"type":"string"}},"type":"object"}],"description":"People related to a trial","type":"object"},"TrialSearchResults":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Trial"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","items"],"type":"object"},"TrialSummary":{"properties":{"id":{"description":"ID of the trial","type":"string"},"public_title":{"description":"Title of the record","type":"string"},"url":{"description":"OpenTrials API URL for this trial","type":"string"}},"required":["id","url","public_title"],"type":"object"}}}}
\No newline at end of file