Automatic Generation of TMP entries: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Potential Change}}
[[CCMDB.mdb]] has the following mechanisms to facilitate or automate the generation of entries in the [[L TmpV2 table]] to facilitate [[Tmp Project Collection]] under the [[Entity–attribute–value model of the L Tmp V2 table]].  
Whenever we run a project using TMP tab entries, data collectors have to generate one or more lines before they can actually enter data. This results in extra steps.


We have at least one project for which we automatically generate an entry: [[Postal code collection]]. Whenever a new patient is entered, a "Postal Code" line is generated in the TMP tab and the collector can just fill in the PC, doesn't need to make a line first.  
== entries generated at record creation time ==
[[Adding a patient]] triggers [[Sub add_automatic_tmp_entries]], which adds a tmp entry for each record in [[s_tmp table]] that matches the new admission based on
* s_tmp.hosp =  s_dispo.[[Site]]
* s_tmp.program = s_dispo.[[Program]]
* active = true
* auto_add_at_patient_creation = true


'''We could add functionality to generate lines automatically for other projects. '''
To restrict ability to edit those from the data collector GUI in [[Patient Viewer Tab Tmp]] set the applicable parameter in [[s_tmp table]] to true:
* '''auto_cant_add_manually'''
* '''auto_cant_edit'''


== Left to do ==
=== using tmp entries to generate a dropdown-like user experience for temporary projects ===
# add the "line making" to the Form_PatientList.cb_addPt_Click()
This can be used in conjunction with [[Dropdown-like user experience for tmp projects]] to create a number of entries you want collectors to action.
# To make this work right, those projects that use the item dropdown would need to have a line "fill in" added that the program would have to reject when checking off the tmp tab.
Let's say you want to add a project "colour" with options "red" and "green". To make it easy for collectors to enter this, you could automatically generate a [[s_tmp]].value entry "not yet entered" with auto_add_at_patient_creation = true.
After entering a new admission, the collector will see an entry "colour"-"not yet entered", where the "not yet entered" is a dropdown box with options "green" and "red".  


== [[CCMDB.mdb_Change_Log_2012#ver_2012-11-16]]==
[[Data Integrity Checks]] can be added to disallow sending with "not yet entered".
* added/changed entries in s_tmp to autogenerate lines
** for postal code, just checked "auto_add_at_patient_creation"
** for Overstay had to create generic lines collectors can change to acceptable lines
*
Need to:
* confirm overstay will not let bad data through with these changes


== [[CCMDB.mdb_Change_Log_2012#ver_2012-10-19]] ==
== entries generated programmatically ==
Added relevant columns to [[S Tmp]] because they were needed for another change implemented in
Tmp entries can be generated or updated in VBA using [[Function GenerUpdate_tmp_entry]].


== [[S_Tmp]] table usage ==
== Related articles ==  
* '''auto_add_at_patient_creation''' - if true then the line is auto-added at patient creation time if applicable for a location '''(not yet implemented)'''
{{Related Articles}}
* '''auto_cant_add_manually''' - entry can't be ''added'' manually, ie. will show up in dropdowns
* '''auto_cant_edit''' - entry will not be visible in tmp tab to be ''edited'' manually




[[Category: TmpV2]]
[[Category:Tmp Project Infrastructure]]
[[Category:CCMDB.accdb]]

Latest revision as of 22:49, 23 October 2025

CCMDB.mdb has the following mechanisms to facilitate or automate the generation of entries in the L TmpV2 table to facilitate Tmp Project Collection under the Entity–attribute–value model of the L Tmp V2 table.

entries generated at record creation time

Adding a patient triggers Sub add_automatic_tmp_entries, which adds a tmp entry for each record in s_tmp table that matches the new admission based on

  • s_tmp.hosp = s_dispo.Site
  • s_tmp.program = s_dispo.Program
  • active = true
  • auto_add_at_patient_creation = true

To restrict ability to edit those from the data collector GUI in Patient Viewer Tab Tmp set the applicable parameter in s_tmp table to true:

  • auto_cant_add_manually
  • auto_cant_edit

using tmp entries to generate a dropdown-like user experience for temporary projects

This can be used in conjunction with Dropdown-like user experience for tmp projects to create a number of entries you want collectors to action. Let's say you want to add a project "colour" with options "red" and "green". To make it easy for collectors to enter this, you could automatically generate a s_tmp.value entry "not yet entered" with auto_add_at_patient_creation = true. After entering a new admission, the collector will see an entry "colour"-"not yet entered", where the "not yet entered" is a dropdown box with options "green" and "red".

Data Integrity Checks can be added to disallow sending with "not yet entered".

entries generated programmatically

Tmp entries can be generated or updated in VBA using Function GenerUpdate_tmp_entry.

Related articles

Related articles: