ahcis-rds / study_finder

StudyFinder is a flexible and configurable application to pull studies from clinicaltrials.gov and augment the data from alternate datasources such as a clinical trials management system.
MIT License
17 stars 4 forks source link

Fix null 'healthy volunteers' flag on ct.gov imports. #129

Closed machinehum closed 3 years ago

machinehum commented 3 years ago
  1. Remove the ability to defer elasticsearch indexing during ct.gov l…oad. This was coded to rely on a separate, non-ES::Model class (BaseTrial) which was a path for subtle bugs (e.g., callbacks added to Trial would not be called as expected on trials added via the ct.gov importer if it was set to defer indexing, as it's not using the Trial model at all in that case, but rather BaseTrial). If/when a use case arises, we can re-implement index deferral in a cleaner way; the amount of data that would be required for it to be a meaningful difference on a daily batch job is enormous.

  2. Remove the BaseTrial class, as that deferral was the only thing it was used for.

  3. Re-factor to remove dependencies on VwStudyFinderTrialGroups and VwGroupTrialCount. These were each used solely to power a single method in another class, and in both cases using standard relations are simple and performant.

  4. Remove those two 'Vw*" classes, add migrations to drop the db views.

  5. Add tests for Group model to test new implementation of study_count.