Code Monkey home page Code Monkey logo

clinical-trials-search's People

Contributors

blairlearn avatar bryanpizzillo avatar keithpif avatar lukad03 avatar luwe-gov avatar michael-balint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clinical-trials-search's Issues

Flesh out errors when /clinical-trial/<id> endpoint returns no hit

Currently, if a client hits the /clinical-trial/<id> endpoint and no trial matching the specification is found, the only thing returned is an empty set ({ }). This should probably be fleshed out a bit, although given that this endpoint normally returns a simple protocol object, it's hard to know what else you'd return.

Perhaps it would make more sense to keep the response an empty set, but also set the HTTP status code to 404 to indicate that truly, no resource was found with that identifier.

Filtering on Nested Objects should be a Nested Filter

The API was designed such that multiple filters against a single field are union operations (OR), and filters against multiple fields are intersections (AND). These operations make work correctly when it is against the fields of trials. For example, finding all lung cancer trials in New York city.

However, this raises issues with certain types of nested objects, specifically the trial sites. For example, when looking for trial sites that are in Springfield, Illinois the API will match any trial that has a study site with city = Springfield and also having a site with state = Illinois, but nothing constrains the match to those study sites that have BOTH city = Springfield AND state = illinois.

A real world example, trial NCT02496585, has two trial sites, one in New York, NY and one in Basking Ridge, NJ. I can submit a query that looks for any trial with State = NJ and City = New+york and this trial will match.

See the link below for an example:
https://clinicaltrialsapi.cancer.gov/clinical-trials?nct_id=NCT02496585&sites.org.state_or_province=nj&sites.org.city=New+york

When performing filters against multiple fields within a nested object, the API should use the nested filter functionality of ElasticSearch.

CCR protocols don't always have our protocol ID in ccr_id field

We've found a few examples where our CCR protocols' ID numbers aren't in the ccr_id field of the API responses; I presume that this is a problem with the underlying data, but somehow we'd like to figure out how to solve this.

Examples:

Without a dependable field in which to find our CCR identifier, it's harder to search for our protocols via the API. It looks like all (or nearly all?) the time, our identifier will show up in protocol_id... but we're not sure if that's true 100% of the time. And then most-but-not-all of the time, the ccr_id field is also populated with it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.