Skip to content
Bryan Pizzillo edited this page Jan 29, 2021 · 2 revisions

Design Notes

App Parameters

  • Normal Params
  • Title
    • Can contain replacement chars
  • Introtext
    • Can contain replacement chars
  • No Trials HTML
    • Can contain replacement chars
  • Metadescription
    • Can contain replacement chars
  • Listing Page Type
    • One of manual, disease, intervention
  • Query
    • This is a CTS query. Really only used for manual pages
  • itemsPerPage
    • Defaults to 25
  • View Page Pretty Url base
    • this is /clinicaltrials/
  • ctsApiBase
    • window.CDEConfig.ctsConfig.apiServer
  • lookupApiBase
    • window.CDEConfig.ctsConfig.dynamicListingApi

Routing/Views

  • Technically 6 routes (Manual, Disease-id, Disease-id-type, Disease-id-type-drugid, Intervention-id, Intervention-id-type)
  • 1 View per Route
  • App.js routes are determined based on the Listing Page Type
    • i.e. switch on the listing type, return <Routes> with only the needed patterns

Handling Lookups

  • Higher Order Component for Accessing the Lookup API
    • This wraps the view for the route, will fetch lookups and pass to view
    • if lookups not found handles 404
    • if codes were used, handles URL rewrite for ugly -> pretty

Queries

  • the query stuff should always add the following to any query:
    • current_trial_status
    • included_fields