Patients
We used real retrospective hip fracture population-wide data from the Estonian Health Insurance Fund. The Estonian Health Insurance Fund organises a national, solidarity-based mandatory health insurance system in Estonia, covering 94% of the population [29]. The hip fracture population was chosen as ICD-10 codes have been found suitable for fracture identification [30], and CCI and ECI have been validated among these patients [10, 13,14,15, 31]. The inclusion and exclusion criteria were chosen in concordance to multiple other studies [30, 32,33,34,35]: (1) age 50 or over; (2) ICD-10 codes S72.0–2 identifying index hip fracture between 1 January 2009–30 September 2017; (3) data validation confirming hip fracture diagnosis and excluding isolated acetabular, pelvic, periprosthetic, isolated greater and lesser trochanter fractures.
Data validation
The data validation was based on a logic check or the reviewal of patients’ medical information (Fig. 1). Firstly, patients’ Nordic Medico-Statistical Committee’s Classification of Surgical Procedures (NOMESCO) surgical management was reviewed to confirm their hip fracture diagnosis. Following codes confirmed the diagnosis: NFB20, NFB30, NFB40, NFB99, NFB00–9; NFB10–9, NFJ70–3, NFJ60–3, NFJ80–3, NFJ50–3 [36]. If these codes were not available, a patient’s digital images and medical records were reviewed. Two national databases were used to review digital images and medical records: the Foundation of Estonian PACS (an image archiving and communication system database) and the Estonian National Health Information System (https://ap.digilugu.ee/arstiportaal). Uploading medical data to both databases is mandatory by law, particularly since 2010 for medical records and since 2014 for digital images. Digital images were reviewed from January to July 2017 and medical records from January to March 2019. An orthopaedic surgeon and a radiologist reviewed the digital images, and a geriatrician reviewed the medical records. Hip fracture diagnosis was confirmed if one or both of the data sources approved its presence.
Patients’ comorbidities
Comorbidities were defined as diagnoses coded as ICD-10 at any hospital or outpatient health care claims during a four-year period: at the time of the index HF and during the preceding 4 years. The 4 year preceding period was chosen to avoid under-ascertainment of comorbidities [37]. Finally, a restriction was applied to increase the validity of comorbidity assessment: only ICD-10 codes that appeared at least two times, and at least 7 days apart were included [13, 38].
Development of excel-based calculator
The Microsoft Excel-based dataset calculator was developed using ICD-10 coding algorithms [4], and different weighting schemes of CCI and ECI, the program’s basic formulae and wide format (Additional file 1). The 10th revision of the International Classification of Diseases was chosen as it is used by more than a hundred countries, including Estonia, and cited in more than 20,000 scientific articles world [4, 39]. The weighting schemes included the original [1] and the updated [5] CCI weights, and van Walraven [9] and AHRQ weights [18]. The calculator also takes into account the hierarchy of comorbidities: milder disease forms are excluded if a more severe one is present. Excel’s basic formulae were used for making the calculator as this makes it simple and flexible for users. It calculates comorbidity scores in two steps. If cell A2 is a patient’s ID and B2 contains her/his diseases as ICD-10 codes, the first step identifies the patient’s comorbidity categories [=IF (SUM (IF((LEN(B2)-LEN (SUBSTITUTE (UPPER(B2),{“CODE-1”;"CODE-2”; …; “CODE-N”},”“))),1,0)) > 0,1,0)] and the second step uses the output of the previous step and calculates total score using necessary weights (multiplications) and hierarchical conditions (IF functions) [=(C2*1) + IF(C2 = 0,D2*1,0) + … + IF(M2 = 0,L2*2,0)]. These basic formulae also allow users to edit or adapt the calculator for other weights or versions of the International Classification of Diseases codes. Wide-format, showing one subject per row, was preferred as this is the most used final data structure in statistical analysis. As ICD-10 data is occasionally in long format - one morbidity per row, simple data transformation solutions are included in the calculator’s instructions and in its one-minute instructional video (Additional file 2). Data transformations were done with an Excel’s add-in named Ablebits (www.ablebits.com). The add-in’s functions ‘Merge Duplicates’ (transforms long format to wide format), ‘Merge Cells’ (combines codes from multiple columns into one) and ‘Split Text (splits codes from one cell to multiple columns or rows; transforms wide format to long format) are useful for such purposes. The calculator allows ICD-10 codes to be inserted in any format: lowercase, uppercase, with or without punctuation, and any separators can be used between diagnoses. Finally, the calculator’s ability to identify all ICD-10 codes used in CCI and ECI was tested since the used hip fracture population may not cover all of the diseases used in the indicies. The calculator identified all ICD-10 codes used in the two indices.
Statistical analysis
Continuous variables were presented as “median (25th-75th percentile)” and categorical as proportions. The patients’ Charlson weight comorbidity score and the presence of different diseases were calculated using the Excel-based calculator and the R package “comorbidity” [21] and two SAS macros [40, 41]. The Excel-based calculator was validated by comparing the three methods’ results. The calculators’ processing speeds were compared using the study’s data (multiplicated for larger sample sizes). Excel-based calculator’s processing speed was assessed by running formulae in all columns at once. The analyses were run on a Lenovo T480 laptop released at the beginning of 2018 (i5-8250U 1.6 GHz CPU, 16GB RAM, Windows 10 Enterprise 20H2). Data analyses were done in Microsoft™ Excel™ 365 MSO 16.0.13528.203018 64bit (Microsoft Corporation, Redmond, Washington, USA), R 4.0.4 (R Core Team, 2017) and SAS OnDemand for Academics, release 3.8 (Enterprise edition) (SAS Institute Inc., Cary, NC, USA). Adobe Illustrator and Adobe InDesign (versions CC, Adobe Systems, San Jose, CA, USA) and GraphPad Prism (version 7.0, GraphPad Software, Incorporation, San Diego, CA, USA) were used for creating or finalising figures. Wondershare Filmora (version 10.1.20.16(6.0.0..54.8), Wondershare Technology Corporation, South Shenzhen, China) was used for video editing.