Open WiseIndian opened 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:
To do: debug the "insert_units script in the dedicated file.
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.
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.