L TmpV2 table: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
mNo edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
L_TmpV2 table in [[CCMDB.accdb]] and [[Centralized_data.mdb]] contains data that is either intermittent or just not currently accommodated in the rest of the database. All data that is stored in this table can be found at [[Projects]].
{{DISPLAYTITLE:L_TmpV2 table}}L_TmpV2 table in [[CCMDB.accdb]] and [[Centralized_data.accdb]] contains data that is either intermittent or just not currently accommodated in the rest of the database. All data that is stored in this table can be found at [[Projects]].


=== Entity–attribute–value model ===
=== Entity–attribute–value model ===
The data stored in this table is similar to the [https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model Entity–attribute–value model], but with the twist that it has different fields for different data types. The design was chosen because it allows us to add a new item quickly without having to change our [[sending]] functionality. A nice side effect is efficient storage without the bloat of adding new fields to tables and of having to retain fields that are no longer used. Having said that, the structure is is not intuitive to people who have only encountered flat files or relational data before.
See [[Entity–attribute–value model of the L Tmp V2 table]]


The table has fields to accommodate dates, integers, reals/floating point variables, text or booleans. It can accommodate one of each of these per line, such that if two variables of the same data type are needed, two lines need to be entered. The table was set up this way to accommodate any possible combination of data, but this flexibility comes at the expense of some inefficiencies in data-entry.  
=== Linking ===
This table is linked to [[L_Log table]] by [[D_ID]]. See [[CCMDB Data Structure]] for more info.


{{TT | add/link to better documentation for the auto-generation of lines in this table when a new record is generated. }}
===Data Structure===
 
To see the most up-to-date data structure of this table, see most up-to-date [[CCMDB data.mdb]] in [[Regional Server]]\data\Master. The fields are used differently depending on project, see [[Projects]] for a list and the individual project pages for field usage.  
It is linked to [[L_Log table]] by [[D_ID]].
 
====Data Structure====
To see the most up-to-date data structure of this table, see most up-to-date ccmdb_data.mdb in [[Regional Server]]\data\Master [[CCMDB.accdb]].


{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
! Field Name !! position !! type !! description
! Field Name !! position !! type !! description
|-
|-
| Serial ||1 || Number || unique identifier of patient
| Tmp_ID ||1 || AutoNumber (Long integer)|| unique identifier of tmp entry
|-
|-
| Site ||2 || dropdown-limited text || Hospital where the patient was admitted
| Pat_ID/[[D_ID]] ||2 || ||  
|-
|-
| Location ||3 || dropdown-limited text || Ward the patient was admitted to
| Project ||3 || text () || name of the [[Projects|Project]], corresponds to [[s_tmp]].Study
|-
| collected ||4 || Date/Time || date the variable was collected
|-  
|-  
| Project ||5 || dropdown-limited text ||  
| Item ||4 || text () || value in project, or [[Dropdown-like user experience for tmp projects |dropdown]], corresponds to [[s_tmp]].value
|-  
|-  
| Item  ||6 || Text || Project-Item identifier
| obsdate ||5 || Date/Time || automatically entered date of collection, see [[Separation of date and time fields]]
|-  
|-  
| DtTm_var ||7 || Date/Time || date/time variable collected, if needed
| obstime ||6 || Date/Time || automatically entered time of collection, see [[Separation of date and time fields]]
|-  
|-  
| int_var ||8 || number || integer variable, if collected
| date_var ||7 || Date/Time || date, if collected, specified in [[s_tmp]].date_var_label, see [[Separation of date and time fields]]
|-  
|-  
| float_var ||9 || number || float/real variable, if collected
| time_var ||8 || Date/Time || time, if collected, specified in [[s_tmp]].time_var_label, see [[Separation of date and time fields]]
|-
| int_var ||9 || number (long integer) || integer variable, if collected, specified in [[s_tmp]].int_var_label
|-  
|-  
| bool_var ||10 || Yes/No || boolean variable, if collected
| float_var ||9 || number (double) || float/real variable, if collected, specified in [[s_tmp]].float_var_label
|-  
|-  
| comment_var ||11 || Text || comment variable, if collected
| bool_var ||10 || Yes/No || boolean variable, if collected, specified in [[s_tmp]].bool_var_label
|-  
|-
| Instruction ||12 || dropdown-limited text || Instruction as given in the dropdown [[S_Tmp]]
| comment_var ||11 || Text || comment variable, if collected, not specified in [[s_tmp]] since generally permitted as free text comment
|-
| data_sent ||13 || Date/Time || Date/Time the patient was sent
|}
|}
== why separate? ==
See [[separation of date and time fields]]
== Related articles ==
{{Related Articles}}


<noinclude>
<noinclude>
Line 48: Line 49:
[[Category:Data structure]]
[[Category:Data structure]]
[[Category:L_TmpV2 Data | *]]
[[Category:L_TmpV2 Data | *]]
[[Category:TmpV2 | *]]
[[Category:Tmp Project Infrastructure | *]]
[[Category:L TmpV2 table | *]]
[[Category:L TmpV2 table | *]]
[[Category:L Table]]
[[Category:L Table]]
</noinclude>
</noinclude>

Latest revision as of 22:58, 23 October 2025

L_TmpV2 table in CCMDB.accdb and Centralized_data.accdb contains data that is either intermittent or just not currently accommodated in the rest of the database. All data that is stored in this table can be found at Projects.

Entity–attribute–value model

See Entity–attribute–value model of the L Tmp V2 table

Linking

This table is linked to L_Log table by D_ID. See CCMDB Data Structure for more info.

Data Structure

To see the most up-to-date data structure of this table, see most up-to-date CCMDB data.mdb in Regional Server\data\Master. The fields are used differently depending on project, see Projects for a list and the individual project pages for field usage.

Field Name position type description
Tmp_ID 1 AutoNumber (Long integer) unique identifier of tmp entry
Pat_ID/D_ID 2
Project 3 text () name of the Project, corresponds to s_tmp.Study
Item 4 text () value in project, or dropdown, corresponds to s_tmp.value
obsdate 5 Date/Time automatically entered date of collection, see Separation of date and time fields
obstime 6 Date/Time automatically entered time of collection, see Separation of date and time fields
date_var 7 Date/Time date, if collected, specified in s_tmp.date_var_label, see Separation of date and time fields
time_var 8 Date/Time time, if collected, specified in s_tmp.time_var_label, see Separation of date and time fields
int_var 9 number (long integer) integer variable, if collected, specified in s_tmp.int_var_label
float_var 9 number (double) float/real variable, if collected, specified in s_tmp.float_var_label
bool_var 10 Yes/No boolean variable, if collected, specified in s_tmp.bool_var_label
comment_var 11 Text comment variable, if collected, not specified in s_tmp since generally permitted as free text comment

why separate?

See separation of date and time fields

Related articles

Related articles: