Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove plottable_data #24

Open
eatyourpeas opened this issue Feb 11, 2024 · 0 comments
Open

remove plottable_data #24

eatyourpeas opened this issue Feb 11, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@eatyourpeas
Copy link
Member

The Measurement class returns a python object with 7 nested elements:
birth_data
measurement_dates
child_observation_value
measurement_calculated_values
bone_age
events_data
The 6th is plottable_data which has nested within it centile_data and sds_data, which in turn have nested inside them one each of chronological_decimal_age_data and corrected_decimal_age_data. The only really difference is that the decimal ages are mapped to x (depending on whether chronological or corrected) and the observation_value in the centiles, or the sds (again depending on chronological or corrected), maps to y . All the other parts are elsewhere in the object and were added there for convenience. It meant that the chart component could pull out all the elements it needed from the plottable_data object when plotting, rather than mapping different bits first.

In fact though it makes for a slightly complicated structure and it is not very DRY.

Removing plottable_data would be neater, and would make the API response object leaner and possibly faster (though arguably unlikely noticeably).

To implement this we would have to:

  1. bump the major version, since there maybe people out there that rely on this for their own chart implementations
  2. refactor the chart component to accommodate the change
@eatyourpeas eatyourpeas added enhancement New feature or request question Further information is requested labels Feb 11, 2024
@eatyourpeas eatyourpeas self-assigned this Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant