Populate linking pairs: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
mNo edit summary
m documentation cleanup after yesterday's update
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:
* be sure you have completed [[Pre-linking checks]]
* be sure you have completed [[Pre-linking checks]]
* click the "populate linking_pairs" button on the main screen
* click the "populate linking_pairs" button on the main screen
**2019-Feb-07:  NOTE:  takes ~08 minutes to run
** this takes ~3 minutes to run (as of 2021-08-04)
* After this is done, move on to [[Correcting suspect links]]
* After this is done, move on to [[Correcting suspect links]]


== Implementation ==
== 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]].
{{Collapsable
| always= click expand to see implementation details
| full= 


The process considers the output of
Because MS Access SQL doesn't have functionality to compare data in a "current" to a "next" record this is implemented as an iterative process in VBA in Module ''linking'' Sub ''populate_linking_pairs'' which populates the [[linking_pairs table]].
::SELECT L_PHI.PHIN, L_Log.Arrive_DtTm, L_Log.D_ID, IIf(Not IsNull([accept_dttm]),[accept_dttm],[arrive_dttm]) AS adm
::FROM L_Log INNER JOIN L_PHI ON L_Log.D_ID = L_PHI.D_ID
::ORDER BY L_PHI.PHIN, IIf(Not IsNull([accept_dttm]),[accept_dttm],[arrive_dttm]);


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.
The process considers the output of [[Query linking_pairs_preList]], which contains records that are not in [[linking_pairs table]], and that have more than one instance of a [[PHIN]]. After these are linked, if there are any non-sequential entries in linking pairs, these are deleted by [[Query linking_pairs_out_of_sequence/linking_pairs_out_of_sequence_deleter]], and then their entries are recreated. That happens until all are sequential.  


=== 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)
}}
== Related articles ==
== Related articles ==
{{Related Articles}}
{{Related Articles}}


[[Category:Data Processing]]
[[Category:Data Processing]]
[[Category:Multiple encounter longitudinal consistency check|*]]
[[Category:Multiple Encounter linking]]
[[Category:Multiple Encounter linking]]
[[Category:Centralized data front end.accdb]]

Latest revision as of 08:40, 4 August 2021

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
    • this takes ~3 minutes to run (as of 2021-08-04)
  • After this is done, move on to Correcting suspect links

Implementation

click expand to see implementation details   

Because MS Access SQL doesn't have functionality to compare data in a "current" to a "next" record this is implemented as an iterative process in VBA in Module linking Sub populate_linking_pairs which populates the linking_pairs table.

The process considers the output of Query linking_pairs_preList, which contains records that are not in linking_pairs table, and that have more than one instance of a PHIN. After these are linked, if there are any non-sequential entries in linking pairs, these are deleted by Query linking_pairs_out_of_sequence/linking_pairs_out_of_sequence_deleter, and then their entries are recreated. That happens until all are sequential.

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)

Related articles

Related articles: