Make chart category grouping case-insensitive

Issue #493 resolved
David Platten created an issue

My charts of median DAP per requested procedure name group the requested procedure in a case-sensitive way. I have a "XR Chest" category with data from some rooms, and also a "XR CHEST" category with some other rooms. I'd like these to be grouped together in a case-insensitive way.

Comments (12)

  1. David Platten reporter

    Amended chart code so that y-axis categories are case-insensitive. This now means that rooms with data for XR CHEST and other rooms with data for XR chest are both shown under the same chart category of xr chest. This fixes issue #493 for me.

    → <<cset abde963d2105>>

  2. David Platten reporter

    @edmcdonagh, the code that I've added to fix this issue makes all the chart categories lower case so that, for example, doses from "XR Chest" are combined with "XR CHEST" to determine the mean, median or count. The resulting category will display as "xr chest".

    It may be that some users won't want this behaviour - they may sometimes want to retain the case sensitivity of the categories. Do you think this might be the case? If it is then I can change how I've addressed this issue by adding a charting option along the lines of "Make chart categories case insensitive" that can be switched on or off. This will involve adding a new database field, and so require a database migration.

  3. David Platten reporter
    • changed status to open

    Maybe this should be implemented as a chart option that the user can switch on or off.

  4. Ed McDonagh

    There are several changes to the database models between 0.7.4 and 0.8.0 so don't let that put you off. So far, I don't think there is anything that won't auto-migrate, so we're ok.

  5. David Platten reporter

    I've just realised that my previous commit was very inelegant, and am just sorting out a much more concise way of achieving the same thing.

  6. Log in to comment