4. Clinical Trials
Once you join Qreli, we will see 5 apps in your account that will help you learn how to build quickly:
|
Simple forms-based flow to collect data. Gentle intro to Qreli. |
|
Intro to computations - loops and decisions, or using AI coding. |
|
How to use OpenAI to generate text and images. Learn how to use APIs. |
|
Find clinical trials in NIH's database. Learn how to use tables with details. |
|
More samples: calculator, graphs, sending Gmail, work with Excel/CSV etc. |
This app will help you learn how to display information in tables, including click-through details.
Flow
The structure is straightforward.
We start by asking the users to enters/select the condition, study status, phase, distance from their location, and last change made to the study (to ascertain recency):
In the Results step, before showing any information we retrieve it by calling NIH's API with our data:
and preparing a message to display on top of the table, depending on whether we retrieved any records or not:
To display the information, we pass to the table element (learn how to use here) the data object retrieved ${V.get_trials}{studies}
and choose the columns we want to display (e.g. protocolSection.identificationModule.briefTitle
) , as well as format them: ${E.Text}{substr('CELL',0,40)}...
(in this case, we just show the first 40 characters of whatever we retrieve).
To create the drill-through detail, we define an Actions column, which uses an id from the data (protocolSection.identificationModule.nctId
) to pass to the detail modal page:
We use the detail page to make another API call and retrieve the specific details about the study selected:
Then, we simply display the few datapoints we chose / mapped.
Note that we only did the mapping for convenience; anywhere in Qreli, you can always use the full datapoint with no mapping, e.g. ${V.sData}{protocolSection.statusModule.overallStatus}
instead of ${V.sData}{overallStatus}
.