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

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
 
(One intermediate revision by the same user not shown)
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.  
See the [[s_tmp table]] for examples.


{{Ex|
{{Ex|
Line 21: Line 21:
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".\
== implementation ==
This is driven by some code that updates the dropdown source for the item combobox when the project combobox triggers a change event. This happens both in [[Patient Viewer Tab Tmp]] and in [[TmpV2 editor]] form.


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