Post-SEM Inpatient Care Hours Dataset (Within 30 Days)
melior_post_sem_inpatient_hours.Rd
This dataset contains information about the duration of inpatient care (in hours) within 30 days after healthcare contacts for patients in the SEM cohort from the Melior journal system.
Format
A data frame with 632,785 observations and 4 variables:
- contact_id
Character. Unique identifier for each healthcare contact/encounter, serves as a foreign key to link with other datasets. 632,785 unique values. 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
- duration_hours
Numeric. Duration of inpatient care in hours. Range: 0 to 102,547 hours. Median: 6 hours, Mean: 85.84 hours. The large difference between median and mean indicates a highly skewed distribution with a small number of extremely long durations. Original field name: InneliggandVårdtid_AntalTimmar
Details
This file was extracted from the Melior electronic health record system. The original filename indicates it contains information about inpatient care duration (InneliggandeVårdtid) within 30 days (Inom30Dagar) after a reference point, likely after discharge from the initial SEM cohort contact.
The extremely wide range of duration values (from 0 to over 102,000 hours) suggests there might be some recording anomalies in the source data. The highest values (>10 years) likely represent data recording errors.
Note
This dataset contains 632,785 records, while post_sem_inpatient_stays.csv contains 396,245 records. All records from post_sem_inpatient_stays.csv are present in this dataset, but with substantial differences in recorded duration values.
Comparison between these datasets shows large discrepancies in duration measurements, with differences ranging from -102,435 to +102,537 hours. Only 0.15% of matched records have nearly identical hour values.
This dataset likely captures a different aspect of inpatient care than post_sem_inpatient_stays.csv, possibly focusing specifically on care within a strict 30-day window or using a different method of calculation.
The distribution of duration is heavily right-skewed: 75% of recordings are under 48 hours, while the maximum is over 102,547 hours (approximately 11.7 years).
Duration is provided in hours and converted to days for consistency with other datasets.
The dataset does not include the specific dates of these inpatient stays, only their duration.