OHDSI Home | Forums | Wiki | Github

EVENT_ID and EVENT_FIELD_CONCEPT_ID

Hi guys!I need you help.Thankas at first!
I am a little confuded about event id and event field concept id.My question is:
1.What do event id and event field concept id mean?What is the difference?
2.How can I use them connecting different tables like Observation table and Measurement table?Should I use them both or just a single one?
Thanks again!

@Vines:

This is to dynamically point to records in a different table, which SQL is not good at. You can’t have a SQL expression pointing to tables and field, only explicit names. We therefore use record numbers and Vocabulary Concepts. The Event ID is the record number of the table. The Event Field Concept ID is the Concept that points to a field in a table.

Let’s say patient 123 has a record of “ingrown toenail” on the 25th of August. It’s the 278th record in the CONDITION_OCCURRENCE table, and in there in the CONDITION_CONCEPT_ID it has a Concept ID for the toenail. Then you got:

EVENT_ID=278
EVENT_FIELD_CONCEPT_ID=1147129

Thanks for answering my questiones.
1.From your answer, event_id is a record number.So event_id doesn’t have to be unique,if I understood correctly. But I find a observation_event_id(1147761) in the Athena,it confused me.Is the meaning of event_id different from table to table?And I can’t find another event_id for some reason in the Athena.
2.Does every single fielf of every single table has its own event_field_concept_id? From my searching the Athena , I found it has.It agrees with what you said.But I also find a observation.obs_event_field_concept_id (1147764) in the Athena,the other table havn’t got the event_field_concept_id.The observation table also has a observation_concept_id(1147167). So,which one should I choose as event_field_concept_id?

Ok. Let’s go slowly.

  1. The event_id are unique for each table. They are a record counter, as you said. So, you cannot have two records with event_id=3.

  2. Athena does not know actual event_id values. Athena is a reference table for all OMOP CDM instances, not for any event_ids.

  3. 1147761 is a Concept that stands for the field observation.observation_event_id. It’s a reference to that field. And as you said there is a Concept for every single table and every single field in the OMOP CDM.

  4. In OBSERVATION you have:

  • observation_id: This is the event_id, the record counter
  • observation_concept_id: This is the actual observation, referred to by it’s Concept ID
  • observation_event_id: This is a reference to another table this observation relates to
  • obs_event_field_concept_id: This is a reference to a field in another table this observation relates to.

Thanks a lot.You are so kind! I literally understand what you mean,but l am not sure whtether it’s correct or not.I will give you an example,please correct it for me.
For example,I want to connect observation_concept_id of a record (record number is 123456 and observation_concept_id is 234567 in the observation table) to a measurement table.I think the observation_id is 123456,I will put 123456 into measurement_event_id and 234567 into measurement_event_field_id.Does it work?

I am a little confused. Where do you see a measurement_event_id?

Oh,I am sorry I didn’t realise this problem.Let me make it agian.I have a "How many years did you smoke up to now [PhenX] (id:40770349) to record into the Observation table .And the the value is in the Measurement table.So I want to put the measurement self-increased id(record number) into the “Observation_event_id” field,and the “measurement.value_as_number” id 1147575 into the “Observation_event_field_id” field.Am I right now?

In your example, you do not need a measurement record. Just record your question-answer pair with one observation record like this (if the answer is 5 years):

observation_id person_id observation_concept_id observation_date value_as_number
123456 9876 40770349 2010-11-01 5

As Christian mentioned, the event_id is meant to linking two distinct records to each other. In this case you have just one observation, namely of the years that someone is smoking.

t