Dropdown-like user experience for tmp projects: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
Created page with "This page explains how to set up a new tmp project that works like a dropdown or selection box. The Entity–attribute–value model of the L Tmp V2 table provides a mechanism to store temporary data. It always stores a '''project''' and an '''item''', and can store other data types as well as detailed in L_TmpV2 table. The generic GUI in Patient Viewer Tab Tmp implements the project and item fields as drop-downs, where en..."
 
No edit summary
Line 5: Line 5:
The generic GUI in [[Patient Viewer Tab Tmp]] implements the project and item fields as drop-downs, where entering a "project" value updates the dropdown options available in the item field. The initial intent (which remains an alternative use) was to allow several values per product (like gadget shape and gadget colour), but it turns out this also allows us to use the "item" as a dropdown value for the "project" it belongs to.  
The generic GUI in [[Patient Viewer Tab Tmp]] implements the project and item fields as drop-downs, where entering a "project" value updates the dropdown options available in the item field. The initial intent (which remains an alternative use) was to allow several values per product (like gadget shape and gadget colour), but it turns out this also allows us to use the "item" as a dropdown value for the "project" it belongs to.  


To set up a dropdown, enter multiple lines in the [[s_tmp table]] that have the same value for "study" (corresponds to "project") and the options in the "value" (corresponds to "item") field. Collectors can then enter a project and then an item.
To set up a dropdown, enter multiple lines in the [[s_tmp table]] that have the same value for "study" (corresponds to "project") and the options in the "value" (corresponds to "item") field. The dropdown list can be sorted by entering a sort index in [[s_tmp]].order. Collectors can then enter a project and then an item.  
 
This can be combined with [[Automatic Generation of TMP entries]] to add an item "not entered yet" when new admissions are entered.  


{{Ex|
{{Ex|
Line 21: Line 19:
The second options would feel like a dropdown to the collector.  
The second options would feel like a dropdown to the collector.  
}}
}}
This can be combined with [[Automatic Generation of TMP entries#using tmp entries to generate a dropdown-like user experience for temporary projects]] to add an item "not entered yet" when new admissions are entered. [[Data Integrity Checks]] can be added to disallow sending with "not yet entered".


== Related articles ==  
== Related articles ==  

Revision as of 22:49, 23 October 2025

This page explains how to set up a new tmp project that works like a dropdown or selection box.

The Entity–attribute–value model of the L Tmp V2 table provides a mechanism to store temporary data. It always stores a project and an item, and can store other data types as well as detailed in L_TmpV2 table.

The generic GUI in Patient Viewer Tab Tmp implements the project and item fields as drop-downs, where entering a "project" value updates the dropdown options available in the item field. The initial intent (which remains an alternative use) was to allow several values per product (like gadget shape and gadget colour), but it turns out this also allows us to use the "item" as a dropdown value for the "project" it belongs to.

To set up a dropdown, enter multiple lines in the s_tmp table that have the same value for "study" (corresponds to "project") and the options in the "value" (corresponds to "item") field. The dropdown list can be sorted by entering a sort index in s_tmp.order. Collectors can then enter a project and then an item.

Example:   

Let's say you want to collect a gadget colour and a gadget shape. You could set this up as

  • Project gadget, item colour, write the colour in the comment field
  • Project gadget, item shape, write the shape in the comment field

or you could set it up as

  • Project gadget_colour
    • items "red", "green", etc
  • Project gadget_shape
    • items "round", "flat", etc

The second options would feel like a dropdown to the collector.

This can be combined with Automatic Generation of TMP entries#using tmp entries to generate a dropdown-like user experience for temporary projects to add an item "not entered yet" when new admissions are entered. Data Integrity Checks can be added to disallow sending with "not yet entered".

Related articles

Related articles: