uc-cdis / data-portal

Windmill: data portal for metadata submission and query
Apache License 2.0
27 stars 44 forks source link

Chore/update get clinical trial metadata function #1540

Closed jarvisraymond-uchicago closed 2 months ago

jarvisraymond-uchicago commented 3 months ago

Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/HP-1510

Dev Notes Validated by checking metadata after submission for study HDP01285,

Quantifying How Cocaine Users Respond to Fentanyl Contamination in Cocaine.

The new API endpoint for this study using NCT05045625 and clinicalTrialFieldsToFetch is: https://clinicaltrials.gov/api/v2/studies/NCT05045625?fields=NCTId|OfficialTitle|BriefTitle|Acronym|StudyType|OverallStatus|StartDate|StartDateType|CompletionDate|CompletionDateType|IsFDARegulatedDrug|IsFDARegulatedDevice|IsPPSD|BriefSummary|DetailedDescription|Condition|DesignAllocation|DesignPrimaryPurpose|Phase|DesignInterventionModel|EnrollmentCount|EnrollmentType|DesignObservationalModel|InterventionType|PrimaryOutcomeMeasure|SecondaryOutcomeMeasure|OtherOutcomeMeasure|Gender|GenderBased|MaximumAge|MinimumAge|IPDSharing|IPDSharingTimeFrame|IPDSharingAccessCriteria|IPDSharingURL|SeeAlsoLinkURL|AvailIPDURL|AvailIPDId|AvailIPDComment

Using the new endpoint, after submission the MDS metadata response now contains values from new endpoint under the key "clinicaltrials_gov" https://preprod.healdata.org/mds/metadata/HDP01285

image

Loading Bug If the user enters inputs data into the form before the studies are available, those inputs are cleared once the studies become available due to the form re-rendering. This has been addressed by adding a spinner until the studies are available, preventing the user from inputting data. Before: output After: output

Improvements

Bugfix

Deployment changes