OHDSI / Themis

Repository for OMOP CDM conventions as defined by THEMIS. These can be reference lists of concepts, pieces of standardized code for data generation or quality certification, and debates.
Apache License 2.0
28 stars 9 forks source link

Missing visit end date #127

Open solmazeradat opened 7 months ago

solmazeradat commented 7 months ago

Missing visit end date

CDM or THEMIS convention?

THEMIS

Table or Field level?

Field

Is this a general convention?

No

Summary of issues

Summary of answer

Visit_end_date is mandatory. Use the best information to infer a visit end date. If end dates are not provided, possible ways to derive them include: 1) Outpatient Visit: end_date=start_date 2) Emergency Room Visit: end_date=start_date 3) Inpatient Visit: usually there is information about discharge. If not you should be able to derive from the sudden decline of activity, or from the absence of inpatient procedures/drugs. But the latter would be not obvious. 4) Long Term Care Visits: particularly for claims data, if end dates are not provided assume the visit is for the duration of month that it occurs. 5) For inpatient visits ongoing at the date of ETL, put date of processing the data as mandatory visit_end_date and VISIT_TYPE_CONCEPT_ID with 32220-"Still patient" to identify the visit as incomplete.

On the subject of address the missing visit_end_date with the non-standard concept_id = 32220 for “Still patient”"

... need to update concept_id = 32220 to standard status since only standard concept_ids are allowed in the visit_type_concept_id field.

Related links

Other comments/notes

MelaniePhilofsky commented 6 months ago

This issue needs to be addressed by Themis. Current guidance (use type_concept_id field to flag an ongoing visit) conflicts with current guidance (end_date is required) and breaks general CDM guidance (*_type_concept_Id fields must contain standard concept_ids). I will move it to the "needs work" column.

MelaniePhilofsky commented 6 months ago

This issue is for a missing visit_end_date. The "still a patient" issue, is issue OHDSI/CommonDataModel#698 in Themis.

There is already guidance on how to populate the mandatory visit_occurrence.visit_end_date when the source doesn't supply an end date. The following is the heuristic found on the CDM v5.4 website. This needs to be documented as a Themis issue, posted to the Themis convention library and then the wording should be removed from the CDM website.

"If end dates are not provided in the source there are three ways in which to derive them: - Outpatient Visit: visit_end_datetime = visit_start_datetime - Emergency Room Visit: visit_end_datetime = visit_start_datetime - Inpatient Visit: Usually there is information about discharge. If not, you should be able to derive the end date from the sudden decline of activity or from the absence of inpatient procedures/drugs. - Non-hospital institution Visits: Particularly for claims data, if end dates are not provided assume the visit is for the duration of month that it occurs."

cgreich commented 6 months ago

Non-hospital institution Visits: Particularly for claims data, if end dates are not provided assume the visit is for the duration of month that it occurs.

Apart from the clumsy English: Is that true? Skilled Nursing Facilities are claimed per month? And if so, shouldn't they then be cobbled together into a lengthy overall stay?

MelaniePhilofsky commented 6 months ago

Agree the wording needs improvement, @cgreich. Also, if the guidance is inaccurate, we need to correct it. Themis will add it to the agenda for discussion