Note: We no longer publish the latest version of our code here. We primarily use a kumc-bmi github organization. The heron ETL repository, in particular, is not public. Peers in the informatics community should see MultiSiteDev for details on requesting access.

source: heron_load/patient_nums/insert_deid_patient_mapping.sql @ 0:42ad7288920a

heron-michigan tip
Last change on this file since 0:42ad7288920a was 0:42ad7288920a, checked in by Matt Hoag <mhoag@…>, 6 years ago

Merge with demo_concepts_3800

File size: 675 bytes
Line 
1/**************
2 * Script 3: ID
3 **************
4 * Insert into the deid patient mapping table from the id database to the deid
5 * database.
6 *
7 * This script makes no user visible changes.
8 */
9 
10--Connected to Night heron
11select 1 as connected from nightherondata.encounter_mapping where 0 = 1;
12
13insert into only_needed_mappings@deid
14select patient_set_coll_id,
15       result_instance_id,
16       set_index,
17       patient_num,
18       backup_id,
19       query_instance_id,
20       current_patient_num,
21       cpnum_mod,
22       max_current_patient_num
23from ONLY_NEEDED_MAPPINGS;
24
25--Continue to Script 4: update_patient_numbers_in_patient_set_collection.sql on the deid database
Note: See TracBrowser for help on using the repository browser.