Skip to content

Code to assign "Answer Options" in correct order is flaky #63

@lithomson

Description

@lithomson

The file bridge.callback.grid has a function _assign_units_answer_options that is not reliable.

This function makes sure that "Answer Options" are numbered correctly.
It's only possible to apply to newer versions of ARC, where the *_units field is available.

Example:

  1. This is okay in ARC:
        Variable / Field Name   Field Label             Choices
        demog_height            Height
        demog_height_units	    Height (select units)	1, cm | 2, in

Select cm , in
Answer Options: 1, cm | 2, in

  1. This needs to be corrected:
        Variable / Field Name	Field Label                         Choices
        labs_glucose	        Random blood glucose
        labs_glucose_units      Random blood glucose (select units) 1, mmol/L | 2, mg/dL | 3, g/L

Select mmol/L, g/L
Answer Options (without this function): 1, mmol/L | 2, g/L
Required Answer Options: 1, mmol/L | 3, g/L
I.e. the numbering needs to be preserved.

This relies heavily on matching data between columns in ARC and is problematic for data discrepancies, and translations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions