OHDSI Home | Forums | Wiki | Github

Surgeries (not procedures) in OMOP

Hi everyone,

I need to document surgeries in the OMOP CDM. I’m having a hard time understanding some basic notions.

In my case, a surgery defined as a collection of procedures (Anesthetic procedures, surgical procedures).
Each surgery has its own kind of specialty. If another procedure need to be made during the surgery and it is of a different specialty (when I say specialty - I mean something like “Urology”, ENT etc…) then we open a new surgery.

For example: A surgery with ID 33645 occures, with a specialty “Orthopedic” (i.e. the act. surgical dpt. and not the physical department of which the surgery occures) - the surgery is then finished and then immidiately afterwards the patient is having another surgery, with a different surgery with a different ID 33646 this time with a different staff with another specialty - “Plastics”.

My question is:

Where are the surgeries can be documented in OMOP (not the procedures), which have a lower level of granularity then procedures?

And I guess I can link surgeries to their corresponding procedures via FACT_RELATIONSHIP table.
Maybe in observation as well?

And another important question - In our case, what makes sense more:

  1. VISIT_DETAIL_ID can represent the surgery itself (in case of procedure occurrences) and then we know
    where the surgeries are documented.

  2. VISIT_DETAIL_ID can have more than one surgery (a patient can have a specific visit, inside his inpatient hospital visit, and the patient is being involved in several surgeries.

So in short, how can a researcher, can aggregate procedure records by Surgery level?


1 Like

Hi !
We are involved in mapping data from a anesthesia data warehouse to OMOP and we have the same concerns.

In my case, I chose to represent :

  • the passage in operating room (both anesthetic and surgical parts) in a visit_detail
  • the passage in post-anesthesia care unit (when it happens) in another visit_detail
  • drugs and procedures (as surgical or anesthetic acts) delivered in the operating room and PACU are linked via visit_detail_id in drug_exposure and procedure_occurrence.
  • steps of surgery (or, broadly speaking, the passage in operating room) are documented in observation table (and linked as well with the visit_detail_id).

I propose some specifications here (work in progress) : https://framagit.org/antoine.lamer/anesthesie_omop

1 Like

Hi Antoine!

Thanks for reaching out.
I will definitely look at your work.

Merci beaucoup!

@gil.frenkel and @AntoineLamer

This is a slippery slope, and I suggest dropping it. Reason is this: specialties for surgeries are not commonly agreed upon. For example, a cholecystectomy (removal of gall bladder) could be construed as “general surgery”, “abdominal surgery”, “septic surgery” etc. Within the institution this is very much set and painstakingly complied to through internal politicking, in the overall healthcare system you won’t reach agreement. Just let the Procedure Cholecystectomy speak for itself. Or let Provider #12345 with the specialty Upper gastrointestinal surgery speak for himself. Or do you have another specific good use case for capturing “specialty”?

Do you have an example for that?

Neither. You can, but it is not a good idea. FACT_RELATIONSHIP: No analytical function scans Fact Relationships for anything today, with a few exceptions. Only explicit crosslinks between Domains are generally used, like the Procedure to Provider ID link. OBSERVATION: you can but it similarly is lost for lack of standardization.

What you want to do is to create Episodes. These are explicitly made for capturing all sorts of things under the umbrella of one continuous care activity. Currently, we are building them for oncology. You would have to create the necessary items there, like @AntoineLamer is doing. Happy to help.

You probably mean “2. VISIT_OCCURRENCE”. But yes, you could do that: Put the hospitalization into the _OCCURRENCE, and each surgery into its own _DETAIL. But I wouldn’t. Because nobody knows you did that. The Visits really are care settings, how the patient interacts with the healthcare system, who comes to whom, what’s the level of continuous care, what’s the level of skills of the involved Providers. And they wouldn’t be different between two such surgery Visits. You need Episodes.

This is wonderful. If you could consider making these into Episodes and define the necessary Episode Concepts (Anesthesia, Preparation of patient in procedure room, Procedure, etc.) with the modifiers (start and end datetimes, schedules, all that) that would be wonderful.

1 Like

Thanks for the clarifications @Christian_Reich!!!
And sorry, I meant to say that surgeries have a higher level of granularity (i.e. lower level of details).
I’ve looked at @AntoineLamer 's Model in progress, and episodes are a brilliant idea indeed!

Dear @gil.frenkel,

I am listing temporal events / periods of interest during surgery/anesthesia here and here. Have you some other use cases with your data ?

Dear @Christian_Reich, one more question about visit_detail and episode.

Why preferring episode rather than visit_detail for passage in operating theater ?
For now, I felt more confident with storing passage in the operating theater or PACU (post-anesthesia care unit, where the patient wakes up after anesthesia) in visit_detail as it has many similarities with a passage in intensive care unit :

  • it has an administrative “meaning”, a location (the operative room), a provider (the main surgeon), a preceding visit_detail (the last unit crossed), and is a “detail” of the visit_occurrence
  • all the events as drugs, procedures (the main and secondary surgical acts, the anesthesia act), measurements and observations occurring in the operative room and PACU may be linked via the visit_detail_id.
  • episodes of care (anesthesia/surgery/installation/clamping and others sequences of the procedure) may be computed, but regarding to the visit detail
  • episodes of hypotension/hypertension/tachycardia/bradycardia/oxygen desaturation can be algorithmically dereived from measurement

Perhaps that surgery/anesthesia are commonly understood as procedures, and we should distinguish the passage in the operating theatre and the surgical/anesthesia procedure itself.
Here is an illustration of the visit occurrences of some patients. Operating theatre seems a _detail in the same way as cardiology or critical care.

Yes, I will propose a list of episode concepts (sequencial, "haemodynamic, etc.).

Well, he essentially took it on to model surgeries in the OMOP CDM single-handedly. Pretty cool indeed.

I think either one would work, maybe with a little squishing. Both collect a bunch of medical entities happening to a patient and belonging together. However, I could be convinced otherwise, but I’d claim that Episodes are slightly better suited than Visits. As usual, the use cases will help make that decision. And the use cases I can think of are:

  • Benchmarking how conditions are treated surgically, including all variations of the temporal events involved
  • Outcomes of the surgeries with respect to the variations
  • Cost of all this (which is substantial)

Many of these use cases wouldn’t just involve the actual operation (incision to stitching up), but everything around it. And that’s where the Visits will be suboptimal:

  • Visits describe care settings, i.e. organizational ways in which care is provided by Providers. This would work well for the surgery itself, even though “Operating Room Visit” is missing (which we could fix quickly). But what does it exactly entail? Where does pre-op sedation and the anesthesia consult live? Is the Recovery Room part of it? Intraoperative pathology consultation?
  • The OR Visit itself is ambiguous, since you seem to assume a hospital setting. What about the ambulatory surgeries, like for the removal of a mole. No general anesthesia, no wake up room, patient comes and goes home the same day.

But again, you could make it work. But Episodes are designed for this, especially if there are many things going on at the same time (multiple traumas, tumor resection): They can collect all that belongs to each Episode of Care, and don’t have to worry about how many care settings (Visits), providers, procedures, disposable items, facility utilization etc. are involved and when. You can even attach a rehab long after the patient is out of the OR and lots of other things happened inbetween.

1 Like

About pre-op sedation, usually I think it is administered in the conventional unit before the operation.

The anesthesia consultation (at least in France) took place a few days earlier, usually during a distinct hospital stay. So, I imagined it as another visit_occurrence, as outpatient visit.
If it is in the same stay, what is done usually with consultation of a specialist inside an hospital stay ?

The recovery room could be in the same visit, or a distinct one (with a specific visit_detail_concept_id). I I would prefer a distinct one, as one need is clearly to be able to distinguish patient who benefit from PACU from those who went directly to the hospitalization units.

I have no idea about " Intraoperative pathology consultation".

Indeed, we always care of haemodynamic variations (as hypotension) from induction until discharge from operating room or PACU. From a quality of care perspective, we don’t limit on surgical milestones.

What makes me favour the visit, are the visit concepts Emergency room and Intensive care. The intensive care is really similar to operative room (same monitoring for example, but the operative room is shorter). Measurements, observations, drugs, procedures are linked to a visit_detail of intensive care. They could also be linked to their visit_detail when they occurred in the operation theatre. Moreover, operation has a care setting which is distinct from the conventional unit or the intensive care unit in which the patient is before of after the operation (at least, in our hospital). I would like to distinguish it (for unit management for example, and activity indicators inside dashboards).

I won’t set aside ambulatory surgery. Whether or not the patient sleeps in the hospital, his or her visit_detail of operating room finished when the patient leaves the operating room.

I’m not sure I understand everything that’s been done with episode. But if we choose episode for representing the operative room, would we be able to link measurements, drugs, procedures, observations, other temporal episodes (e.g. induction-incision, incision-closing, …) or haemodynamic episodes (e.g. hypotension) to the episode of the operation. For now, I don’t get the feeling that there’s a epsiode_id in these tables, to refer to the episode of operation (but perhaps I missed it). As well as a care_site_id, admitted_from or discharge_to id.

what an interesting discussion !!!
Perhaps I should resume all these propositions in a mapping schema.

Here you go. This is why you want to model it in such a way that such questions like “when and where is pre-op sedation administered?” are possible. I think you are right with your answer, but who knows how institutions handle it.

Distinct or same hospital Visit? Inpatient or Outpatient? Does it matter for anything? See my point here? Your model needs to enable the questions, not the preset answers.

Exactly. That is a legitimate use case, and the model should capture whatever might happen in a standardized fashion, so you can query and draw the conclusion.

Perfect. Use case right there. (It’s a path consultation during tumor resection with the patient on the table to make sure the edges are tumor-free)

Exactly. All those are Visits. They are not linked together for your surgery in any way. In fact, things could happen during these Visits that have nothing to do with your surgery (that psych consult for example). This is what Episodes do. They connect everything that belongs together, so you can ask questions that cross these Visits. Of course you can ask questions within a Visit no problem, but as soon as you go outside you have no way of doing that (except building little ad-hoc mini-Episodes at analytics time).

Correct, but the VISIT_OCCURRENCE also ends since it is an ambulatory setting. Because the patient goes home, and therefore by definition the healthcare interaction ends. It might resume later, but how do you know any of that is happening before and after if you have no place to collect it?

Which is why we have to model that out, @AntoineLamer. The OMOP CDM is not a static scripture handed down from the Lord to the Prophet. We are in charge. And yes, in the current incarnation an Episode can “grab” anything in the other Clinical Entity tables, because they have an episode_id field (once ratified). Is this working for you? And how would you construct the Episodes generically? You need algorithms. Because we are not treating patients, we are looking at larger themes in the population. All good questions.

I would query drug_occurrence. As you said, pre-op sedation delivery is depending on the care site and its organization. The only table where we are sure to find the information is the drug_.

Distinct if it occurred during a previous stay (as there are distinct admission and discharge dates), the same if it occurs during the same. Outpatient if the patient does not sleep at hospital. Sorry no, I do not see your point. I do not see difficulties here, perhaps it is the easiest point of the integration :slight_smile:

On what I understand of visit_detail, they occurred during a visit_occurrence. So the last visit_detail inevitably ends with the visit_occurrence.

Sorry, but because of my poor english skills, I do not understand some of the questions you highlight. I do not see difficulties here. Entry/discharge of hospital => visit_occurrence. Entry/discharge of a unit/departement/service/… visit_detail inside the visit_occurrence. Even for an ambulatory setting, as long as we have care_site_id or admission/discharge.

An example : admission on the morning at the emergency. A visit_occurrence starts (for admission to the hospital), inside which a visit_detail starts (for admission to the emergency unit). The patient exits from the emergency to go to an observation unit. The first visit_detail ends, a second one starts (for the observation unit). Before the end of the day, the patient leaves the hospital, everything is ok. End of the second visit_detail, end of the global visit_occurrence (at the same date). The observational unit could have been be a passage to operative room, and would have the same visit_detail. The patient leaves the hospital, visit_occurrence and visit_detail both end. No ?

All the points noted here, present the same difficulties of implementation with either episode or visit_detail. Except that, for now, visit_detail is dedicated to a care setting.

One biais, on the both side, is that surgery/anesthesia procedures are seen as “procedure” in administrative databases, while they are equivalent to intensive care / emergency “visit” in Anesthesia Information Management System or Surgery software.

Good news ! Yes of course! I’ll check for discussion on evolution of episode.

Yes. That’s what we do for episode of hypotension I planned to implement this algorithm in OMOP with measurement and episode tables.

That is the point, for operative room, we do not need algorithm. We already have the information of the passage. I think there is misunderstanding as we do not have the same data.
With AIMS, surgery, emergency, intensive care, we have a visit_detail. With administrative databases, we have procedures, and we try to algorithmically detect/reconstruct episodes.

But again, why allowing a visit_detail of 4 hours in emergency and not in operative room ? What is the difference ? They both have the same characteristics.

Hello everyone,

I am very sorry to warm up this rather old conversation. We’re currently in the progress of mapping perioperative and ICU data and are wondering how to map transitions from one unit to the next unit (such as OR->PACU, OR->ICU, ICU->OR->PACU->ICU).

Reading this conversation I tend towards agreeing with @AntoineLamer. The way I see it each unit represents a different visit_detail_id (“A good example of this would be the movement between units in a hospital during an inpatient stay” as stated in the OMOP CDM Documentation). I fail to see how splitting it up into multiple visit_details would make any analysis impossible since it’s all still connected using the visit.

I do see the advantages of episodes (with the oncology extension being just around the corner). However, I don’t understand why splitting measurements/observations/drugs into multiple visit_details would contradict using episodes.

@AntoineLamer did you map you data according to this? What are your results? (I’m doing some observational outcome research here :wink:)

Dear Daniel,

We used the following mappings :
hospital stay → visit_occurrence
unit stay → visit_detail
operating room (+/- PACU) → visit_detail

For each sub step of the operating room, we used periods. These periods are linked to the visit detail corresponding to the operating room. Secondary data (e.g. duration of MAP < 65 mmHg) may then be linked to the period during which they were computed.

Our article is in proofreading and I’ll share it as soon as possible.
Do not hesitate to add further questions (we can also plan a visio if needed)

Dear Antoine,

thank you so much for taking the time to answer my questions. We have – in fact – decided to use the exact same approach. I’m looking forward to your article!


Dear OHDSI Community, dear Daniel,

Please find here our article which has just been published in JMIR about the implementation of perioperative data into the OMOP CDM.
In this article, we provide a structural mapping, a semantic mapping (with 169 concepts which could be added), some queries and dashboards for anesthesia.