Skip to content

[candidate_list] Remove "Latest Visit Status" column? #7093

Closed
@driusan

Description

@driusan

From what I can see in the code, the column "Latest Visit Status" on the candidate_list contains the result of max(s.Current_stage) AS LatestVisitStatus (grouped by CandID). This means that the column contains the highest (alphabetically) of the set 'Not Started', 'Screening', 'Visit', 'Approval', 'Subject', 'Recycling Bin' (the valid options of Current_stage in the session table) that the candidate has for any session. ie. if a candidate has sessions with values of "Not Started", then "Visit", then a last visit of "Approval" the value of "Latest Visit Status" will be "Visit".

It's not clear how that is supposed to be meaningful or what relation it has to the "Latest Visit Status". It seems to be the result of someone not understanding how "max" works on enums when writing the query.

Given that it doesn't work and no one has noticed, it seems like the column isn't really used and should be removed to free up space in an already excessively large table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Category: BugPR or issue that aims to report or fix a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions