OHDSI Home | Forums | Wiki | Github

Cohort Generation in Atlas with Generation status Failed


(Swanshi Saxena) #1

Hi,

I am getting generation status as failed while generating cohort in Atlas. I am using Atlas 2.4.3 with webAPI 2.4.3 version. Cohort is created using sample data named as ‘Warfarin New Users 65 or Older at Index with Prior Atrial Fibrillation’.

cohort_generation_info table is loaded with below fail_message:

java.util.concurrent.ExecutionException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [CREATE TEMP TABLE Codesets (codeset_id int NOT NULL,
concept_id bigint NOT NULL
)
; INSERT INTO Codesets (codeset_id, concept_id)
SELECT 1 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from public.CONCEPT where concept_id in (313217)and invalid_reason is null
UNION select c.concept_id
from public.CONCEPT c
join public.CONCEPT_ANCESTOR ca on c.concept_id = ca.descendant_concept_id
and ca.ancestor_concept_id in (313217)
and c.invalid_reason is null
UNION
select distinct cr.concept_id_1 as concept_id
FROM
(
select concept_id from public.CONCEPT where concept_id in (313217)and invalid_reason is null
UNION select c.concept_id
from public.CONCEPT c
join public.CONCEPT_ANCESTOR ca on c.concept_id = ca.descendant_concept_id
and ca.ancestor_concept_id in (313217)
and c.invalid_reason is null

) C
join public.concept_relationship cr on C.concept_id = cr.concept_id_2 and cr.relationship_id = ‘Maps to’ and cr.invalid_reason IS NULL

) I
) C; INSERT INTO Codesets (codeset_id, concept_id)
SELECT 2 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from public.CONCEPT where concept_id in (1310149)and invalid_reason is null

) I
) C; INSERT INTO Codesets (codeset_id, concept_id)
SELECT 3 as codeset_id, c.concept_id FROM (select distinct I.concept_id FROM
(
select concept_id from public.CONCEPT where concept_id in (441139)and invalid_reason is null

) I
) C; CREATE TEMP TABLE qualified_events

AS
WITH primary_events (event_id, person_id, start_date, end_date, op_start_date, op_end_date, visit_occurrence_id) AS (
– Begin Primary Events
select P.ordinal as event_id, P.person_id, P.start_date, P.end_date, op_start_date, op_end_date, cast(P.visit_occurrence_id as bigint) as visit_occurrence_id
FROM
(
select E.

It seems that there is some configuration issue at database level.

Please advice on how to proceed further on this.

Thanks
Swanshi


t