BDSC-CDS / RDF-i2b2-converter

Apache License 2.0
0 stars 0 forks source link

Displaying the unit of measurement next to concepts in the ontology #1

Open WiseIndian opened 2 years ago

WiseIndian commented 2 years ago

The criteria selection should display the unit of measurements (g/L, mMol etc.) to avoid confusion (e.g. 1.8 m vs. 180 cm).

From what I understand the suggested idea is to display the unit next to each element present in the ontology (if a unit exist for that element).

A priori, only changes to the front end needs to be applied for this feature to be implemented. When an element is appended to the ontology, some processing needs to be done on the element. The unit needs to be extracted by checking the concept within the tree node of that element. If a concept is associated to that tree node a unit can be extracted from that element.

        let constraint = this.constraintService.generateConstraintFromTreeNode(node, node ? node.dropMode : null)
        let concept = (<ConceptConstraint>constraint).clone().concept
        return concept

After extracting that information we can create a tooltip which will appear when the user hovers over the ontology element. This tooltip would display the unit associated to that concept.

Fasjul commented 2 years ago

After discussion, units should be loaded directly in the i2b2 tables ("metadata_xml" column), either through a script editing the CSV file or a postgres script editing the DB row. This should be based on a lookup table of hardcoded units. (ex a JSON file {"Height":"cm", "Weight":"kg", etc...} Reasons for that:

Fasjul commented 2 years ago

To do: debug the "insert_units script in the dedicated file.