IHSD
.IHS_2023
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
IHS_2023.PR_INSERT_FITBIT_INTRADAY_HRV
Parameters
Name
Type
Mode
Definition
procedure PR_INSERT_FITBIT_INTRADAY_HRV (program_start_date varchar2 := '2023-04-01') -- use AUTHID CURRENT_USER to execute with the privileges and -- schema context of the calling user AUTHID CURRENT_USER AS begin -------------------------------------------------------- -- Data insertion for Table fitbit_hrv -------------------------------------------------------- insert into fitbit_hrv ( RECORD_DATE ,RMSSD ,COVERAGE ,HF ,LF ,PARTICIPANTIDENTIFIER ) --only insert new records: select to_date(RECORD_DATE, 'yyyy-mm-dd"T"hh24:mi:ss."000"') as RECORD_DATE ,RMSSD ,COVERAGE ,HF ,LF ,s.PARTICIPANTIDENTIFIER from stg_fitbit_hrv s join STUDYPARTICIPANTS p on s.PARTICIPANTIDENTIFIER = p.PARTICIPANTIDENTIFIER where length(s.PARTICIPANTIDENTIFIER) >= 13 and substr(s.RECORD_DATE, 1, 10) >= program_start_date and s.RMSSD is not null minus select RECORD_DATE ,RMSSD ,COVERAGE ,HF ,LF ,PARTICIPANTIDENTIFIER from fitbit_hrv ; commit; end;