Skip to content

Commit 342813a

Browse files
authored
Change ehr date to file_timestamp (#4073)
1 parent 87ae3de commit 342813a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rdr_service/workflow_management/ppsc/data_feed_queries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def insert_ehr_receipt(project: str, src_operational_dataset: str, destination_d
188188
SELECT DISTINCT
189189
p.id,
190190
0 as ignore_flag,
191-
participant_ehr.last_seen,
191+
participant_ehr.file_timestamp,
192192
CURRENT_TIMESTAMP() AS created,
193193
CURRENT_TIMESTAMP() AS modified
194194
FROM `{project}.{src_operational_dataset}.ppsc_participant` p
@@ -201,7 +201,7 @@ def insert_ehr_receipt(project: str, src_operational_dataset: str, destination_d
201201
SELECT 1
202202
FROM `{project}.{destination_dataset}.datafeed_input_ehr` t
203203
WHERE t.participant_id = p.id
204-
AND t.event_date_time = participant_ehr.last_seen
204+
AND t.event_date_time = participant_ehr.file_timestamp
205205
AND t.ignore_flag = 0
206206
)
207207
;

tests/workflow_tests/test_data/ppsc_data_feed_test_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
SELECT DISTINCT
207207
p.id,
208208
0 as ignore_flag,
209-
participant_ehr.last_seen,
209+
participant_ehr.file_timestamp,
210210
CURRENT_TIMESTAMP() AS created,
211211
CURRENT_TIMESTAMP() AS modified
212212
FROM `test.rdr_operational_datastream.ppsc_participant` p
@@ -219,7 +219,7 @@
219219
SELECT 1
220220
FROM `test.rdr_operational_datastream.datafeed_input_ehr` t
221221
WHERE t.participant_id = p.id
222-
AND t.event_date_time = participant_ehr.last_seen
222+
AND t.event_date_time = participant_ehr.file_timestamp
223223
AND t.ignore_flag = 0
224224
)
225225
;

0 commit comments

Comments
 (0)