Populate linking pairs: Difference between revisions
Ttenbergen (talk | contribs) mNo edit summary |
Ttenbergen (talk | contribs) m (→Algorithm) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
Because MS Access doesn't have functionality to compare data in a "current" to a "next" record this is implemented as an iterative process in Module ''linking'' Sub ''populate_linking_pairs'' which populates the [[linking_pairs table]]. | Because MS Access doesn't have functionality to compare data in a "current" to a "next" record this is implemented as an iterative process in Module ''linking'' Sub ''populate_linking_pairs'' which populates the [[linking_pairs table]]. | ||
The process considers the output of | The process considers the output of [[Query linking_pairs_preList]]. | ||
For any line that has the same PHIN as the previous line it generates a record in [[linking_pairs table]] of the two D_IDs. | For any line that has the same PHIN as the previous line it generates a record in [[linking_pairs table]] of the two D_IDs. | ||
Line 37: | Line 34: | ||
Clean our only those pairs that are questionable: | Clean our only those pairs that are questionable: | ||
* find all records whose pairs have non-consecutive (admit dttms) | * find all records whose pairs have non-consecutive (admit dttms) | ||
** need to admit this with the old style admit dttm included so the | ** need to admit this with the old style admit dttm included so the wholesale recreation will still work | ||
* remove all pairs related to those patients (ie have same PHIN)(easier than figuring out which to remove) | * remove all pairs related to those patients (ie have same PHIN)(easier than figuring out which to remove) | ||
* remove all pairs where a pair-less profile is present for the same phin | * remove all pairs where a pair-less profile is present for the same phin | ||
** this would include old single encounters (57% of our records are single encounters) | |||
Run the populate linking code, but run it only for profiles that aren't in pairs | Run the populate linking code, but run it only for profiles that aren't in pairs | ||
* run the linking pairs updater only for profiles that don't have | * run the linking pairs updater only for profiles that don't have | ||
Second draft. | |||
* Find every D_ID not in [[Linking pairs table]], and delete all other/existing records from [[Linking pairs table]] for that PHIN | |||
* Delete all [[Linking pairs table]] that have non-consecutive admit dttms | |||
* re-populate [[Linking pairs table]] considering only D_IDs not already in [[Linking pairs table]] | |||
== Related articles == | == Related articles == | ||
Line 48: | Line 51: | ||
[[Category:Data Processing]] | [[Category:Data Processing]] | ||
[[Category:Multiple Encounter linking]] | [[Category:Multiple Encounter linking]] | ||
[[Category:Centralized data front end.accdb]] |
Revision as of 15:10, 2021 July 28
As part of vetting CFE needs to pair up any records for the consecutive/continuous admission of a patient.
Instructions
- be sure you have completed Pre-linking checks
- click the "populate linking_pairs" button on the main screen
- 2019-Feb-07: NOTE: takes ~08 minutes to run
- After this is done, move on to Correcting suspect links
Implementation
Because MS Access doesn't have functionality to compare data in a "current" to a "next" record this is implemented as an iterative process in Module linking Sub populate_linking_pairs which populates the linking_pairs table.
The process considers the output of Query linking_pairs_preList.
For any line that has the same PHIN as the previous line it generates a record in linking_pairs table of the two D_IDs.
2021-07 review
The iterating is the slow part, so how can we reduce it; eg by shifting some of the work into queries
Scenarios
Two things will make a record require a pairs update:
- a new record is added (the >95% case)
- an older record(s) is changed, requiring a re-alignment (the <2% case)
- a collector catches up with backlog, and 2 records that had already been linked 1-3 need to be re-linked to 1-2-3 (the 3% case)
Algorithm
Clean our only those pairs that are questionable:
- find all records whose pairs have non-consecutive (admit dttms)
- need to admit this with the old style admit dttm included so the wholesale recreation will still work
- remove all pairs related to those patients (ie have same PHIN)(easier than figuring out which to remove)
- remove all pairs where a pair-less profile is present for the same phin
- this would include old single encounters (57% of our records are single encounters)
Run the populate linking code, but run it only for profiles that aren't in pairs
- run the linking pairs updater only for profiles that don't have
Second draft.
- Find every D_ID not in Linking pairs table, and delete all other/existing records from Linking pairs table for that PHIN
- Delete all Linking pairs table that have non-consecutive admit dttms
- re-populate Linking pairs table considering only D_IDs not already in Linking pairs table