DSM data

From CCMDB Wiki
Revision as of 14:03, 15 March 2017 by Ttenbergen (talk | contribs) (m)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This article is about the data in the L Labs Flowsheet DSM table and how it is aggregated from the DSM Lab Extract via Instructions for importing a batch of DSM Data using DSM Labs Consistency check.accdb.

The data in DSM Lab Extract contains one or more lines per any test performed for patients who are in our unit at any point in their stay. For L Labs Flowsheet DSM table we want a count of only the tests we decided to include (see [[]]), and only for the period where they were on our unit.

Date constraint

The DSM dump includes Collected Date/Time, Arrived Date/Time and Test Arrived Date/Time. I use CollectedDate if available, and ArrivedDate otherwise. This decision was based not so much on what would actually be 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]

Lab type constraint

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.