Activity #4207
closedModule #3537: Design
Module #4206: Custom Measurement & Analysis Wizard – UI and Database Design
Create backend database objects
100%
Description
https://drive.google.com/drive/folders/1MQlEcFfdPA4CtT8dowx4OJk5xwKnzSxl
Execution Flow for Running an Analysis
1. Query analysis_measurements to get list of measurements that belong to a given analysis (e.g., Downs, Steiner).
2. For each measurement, retrieve its type_id (linking to measurement_types) and its args_json (input bindings). Apply any per-analysis overrides from analysis_measurements.
3. Evaluate Measurement - Use the appropriate evaluator function based on measurement_types. evaluator (e.g., fun_angle_lines for ANGLE_LINES). Pass in the inputs from args_json, resolving landmark coordinates or dependent measurement values as needed. Evaluators are implemented once as reusable functions (shared across analyses).
4. Write computed values to the analysis_results (or results) table. Store numeric result and unit, and also the inputs_snapshot (coordinates/values actually used) for audit.
5. For reporting, query analysis_results to consolidate all results for an analysis run. Join with metadata from measurements and measurement_types to display names, units, classifications, and interpretations.