Lab identification in the DSM data: Difference between revisions
Ttenbergen (talk | contribs) |
Ttenbergen (talk | contribs) →Start of date range: Changed to use Admit DtTm |
||
Line 11: | Line 11: | ||
=== Start of date range === | === Start of date range === | ||
The Lab_DtTm is compared to the admit time of the patient as follows: | The Lab_DtTm is compared to the admit time of the patient as follows: | ||
* <code>" WHERE ([ | * <code>" WHERE ([Admit_DtTm]<=" & LabDtTm_str & ") AND (" & LabDtTm_str & "<=nz([Dispo_DtTm],now())) "</code> | ||
** ie we start the range with the [[ | ** ie we start the range with the [[Admit DtTm]] | ||
{{DJ | | {{DJ | | ||
* We should change this; however, do we only change it going forward or do we also re-import back data? Julie is about to re-import back data until 2019-01-01, so maybe we should reimport back data for all that far? | * We should change this; however, do we only change it going forward or do we also re-import back data? Julie is about to re-import back data until 2019-01-01, so maybe we should reimport back data for all that far? | ||
Line 19: | Line 19: | ||
**** Yes going forward. also this time using first service dttm. --[[User:JMojica|JMojica]] 16:36, 2022 February 16 (CST) | **** Yes going forward. also this time using first service dttm. --[[User:JMojica|JMojica]] 16:36, 2022 February 16 (CST) | ||
***** As in, use the ''Admit DtTm'' with the definition we have decided in there, right? [[User:Ttenbergen|Ttenbergen]] 19:48, 2022 February 17 (CST) | ***** As in, use the ''Admit DtTm'' with the definition we have decided in there, right? [[User:Ttenbergen|Ttenbergen]] 19:48, 2022 February 17 (CST) | ||
****** I have changed this to use the new [[Admit DtTm]]; if that addresses this issue, pls delete, otherwise explain. [[User:Ttenbergen|Ttenbergen]] 14:06, 2022 June 1 (CDT) | |||
}} | }} | ||
=== date constraints === | === date constraints === |
Revision as of 13:06, 2022 June 1
This article describes how labs are identified in the DSM Lab Extract during importing.
Matching
Each lab is imported with a value.
Lab_DtTm
The field Lab_DtTm in L_Labs_DSM table is generated as follows from the inconsistenly populated fields in the export:
LabDtTm_str = "CDate(Nz([COLLECTEDDATE], [arriveddate])) + CDate(Nz([CollectedTime], [LabarrivedTime]))"
- ie use collected dttm if available, else use arrived dttm
Start of date range
The Lab_DtTm is compared to the admit time of the patient as follows:
" WHERE ([Admit_DtTm]<=" & LabDtTm_str & ") AND (" & LabDtTm_str & "<=nz([Dispo_DtTm],now())) "
- ie we start the range with the Admit DtTm
|
date constraints
the data we would want to use, but instead on which data was consistently available. Not all these columns are always filled.
[Arrive_DtTm]<=CDate(Nz([COLLECTEDDATE],[arriveddate]))+CDate(Nz([CollectedTime],[LabarrivedTime]))
CDate(Nz([COLLECTEDDATE],[arriveddate]))+CDate(Nz([CollectedTime],[LabarrivedTime]))<=[Dispo_DtTm]
counts
We originally did labs as counts, but now store them with results. A count of them can be viewed using query L_Labs_Flowsheet_DSM_sum.
individual record
Most of the lab tests we count are one DSM line per lab done, and the best way to identify them was based on the TESTCODE column in the DSM Lab Extract. hat column is compared to table s_mapping_lab by query 2_D_counts_test_appender to populate table L_Labs_Flowsheet_DSM.
group of records
Some other lab tests lead to multiple results and are reported as a group of lines per lab done. The best way to identify them was based on the GRPTEST column in the DSM Lab Extract. That column is compared to table s_group by query 2_D_counts_group_appender to populate table L_Labs_Flowsheet_DSM.
The s_mapping_lab table in Instructions for importing a batch of DSM Data defines which labs will be counted as which tests. On every run of Instructions for importing a batch of DSM Data, there is a check to find out if any new labs are in the new data that are not in the table. During testing, most times included a few new labs. For these new labs it would need to be decided if they are a type we collect before finishing the import.
Updates / new lab Name or Labels in DSM
The import process checks for values not previously seen on each import. If there are new ones it adds them to the list and alerts the user to decide if they should count toward one of the labs we collect.
Related articles
Related articles: |