Skip to contents

This dataset contains information about inpatient care episodes that occurred after discharge for patients in the SEM cohort from the Melior journal system. The data represents inpatient stays with dates up to December 31, 2019.

Usage

melior_post_sem_care_episodes()

Format

A data frame with 1,804,880 observations and 6 variables:

contact_id

Character. Unique identifier for each healthcare contact/encounter, serves as a foreign key to link with other datasets. Original field name: KontaktId

patient_id

Integer. Patient pseudonym identifier, serves as a foreign key to link with other patient-level data. Original field name: Alias

care_episode_start

POSIXct. Start date/time of the inpatient care episode. Date range: 2017-01-01 to 2019-12-31. Original field name: Vardtillfalle_StartDatum

care_episode_end

POSIXct. End date/time of the inpatient care episode. Date range: 2017-01-01 to 2019-12-31. Contains 5,061 NA values (0.3%). Original field name: Vardtillfalle_SlutDatum

ward

Character. Hospital ward where the inpatient care occurred. Contains 284 unique ward codes. Most common wards: AkutM (12.4%), AkutL (12.2%), AkutH (10.4%). Original field name: Vardtillfalle_Avdelning

care_episode_duration_days

Numeric. Duration of the care episode in days. Added field, calculated from start and end dates

Source

Melior

Details

This file was extracted from the Melior electronic health record system. The original filename indicates it contains information about inpatient care episodes (SlutenVårdtillfällen) that occurred after discharge from the initial SEM cohort contact (Efter_Vardkontakt) with discharge dates (UtskrivningDatum) up to December 31, 2019 (Till_20191231).

The dataset provides a comprehensive view of post-discharge inpatient care utilization for the SEM cohort. Each row represents a unique care episode for a patient, with timestamps for admission and discharge, and information about the specific ward where care was provided.

Note

  • All episodes in this dataset are inpatient care only, as indicated by the original Vardtillfalle_VardformText field having the constant value "Slutenvård" (Inpatient) for all records. This field has been excluded from the processed dataset for efficiency.

  • POSIXct fields are stored in datetime format

  • Emergency department wards (AkutM, AkutL, AkutH, etc.) account for approximately 51% of all episodes

  • 5,061 episodes (0.3%) have missing end dates.

  • The original data contained some erroneous future dates (years 2028, 2029) which have been corrected in the processing script by assuming a 10-year offset error. The years 2020 and 2021 are likelier to represent correct data than 10+ year offset and has been kept

  • The median episode duration is less than 1 day (0.3 days), with 75% of episodes lasting less than 1.7 days, reflecting the predominance of short emergency department stays

  • Original field names are preserved in the documentation for reference

Examples