OHDSI Home | Forums | Wiki | Github

Test querying of the OHDSI LAERTES database

I was advised to post my question (originally sent to the LAERTES developers directly) to this forum.

From: Peng, Xiaoping

Sent: Friday, November 13, 2015 5:21 PM

Subject: RE: FW: Your new OHDSI LAERTES postgresql database read-only
account

HI
Richard,

It does
but then you get entries that don’t have hoi_concept_id = 500000801
necessarily.

I’ll
copy and paste this thread to the OHDSI forum later.

Lili

From: Richard Boyce [mailto:rdb20@pitt.edu]

Sent: Friday, November 13, 2015 5:19 PM

Subject: Re: FW: Your new OHDSI LAERTES postgresql database read-only
account

This simplifies
things a bit and I thing still works…

select rxnorm_drug, drug, hoi_concept_id, hoi_concept_name, hoi, snomed_hoi

from public.drug_hoi_relationship relationship

join public.lu_ref_set_hoi_def ref_set on ref_set.condition_concept_id =
relationship.hoi

where hoi in

(select condition_concept_id from public.lu_ref_set_hoi_def

where hoi_concept_id = 500000801)

order by drug;

Lili - to help archive our discussions, would you please ask any new questions
on the OHDSI forums (http://forums.ohdsi.org/c/developers)?
Please use LAERTES in the subject line.

thanks,

-Rich

On 11/13/2015 04:15 PM, Peng, Xiaoping wrote:

Actually I got the query to work:

/OMOP acute myocardial infarction 1/

select rxnorm_drug, drug, hoi_concept_id, hoi_concept_name, hoi, snomed_hoi

from public.drug_hoi_relationship relationship

join public.lu_ref_set_hoi_def ref_set on ref_set.condition_concept_id =
relationship.hoi

where hoi in

(select condition_concept_id from public.lu_ref_set_hoi_def

where hoi_concept_id in (500000801))

and hoi_concept_id = 500000801

order by drug;

From: Peng, Xiaoping

Sent: Friday, November 13, 2015 1:57 PM

Subject: Re: FW: Your new OHDSI LAERTES postgresql database read-only
account

Hi Erica,

Thanks for the explanation.
Right now I’m trying to write a query that answers the question:

What drugs/medications are
associated with acute myocardial infarction?

I’m using concept_id = 500000801 for
Acute myocardial infarction 1. Based on

http://omop.org/hoi) the description for this
condition is “Broad definition with hospitalization”.

So I write the query to pull the drugs
from the DRUG_EVIDENCE_RELATIONSHIP table, as follows:

SELECT drug, hoi, * from
public.concept concept

join public.drug_hoi_relationship relationship on concept.concept_id =
relationship.hoi

where concept_id = 500000801;

But my search turns up nothing.
I had also tried including 500000801 in quotations marks, ‘500000801’, but
still I get no results.

Do you have any ideas on how
I should edit my query to pull the drugs related to this HOI?

thank you,

Lili

t