Coder Social home page Coder Social logo

nh_luxation_infektion's Introduction

Prediction of Early Periprosthetic Joint Infection after Total Hip Arthroplasty

Prediction models for prosthesis joint infection (PJI) within 90 days of total hip arthsoplasty (THA).

The file structure follows the "ProjectTemplate" structure described here: http://projecttemplate.net/index.html

data/ defines what data to use for the project (no actual patient data included due to GDPR, as well as Swedish and Danish laws and regulations).
../linkage.R defines the relevant variables from the Swedish registers (requires an active connection to an internal SQL-database which is not shared). Note that the differenc co-morbidity measures (Charlson, Elixhauser and Rx Risk V have been pre-calculated and are already available from the SQL database.)
../categorization.xlsx defines our grouping of co-morbidities based on individual conditiond from the Charlson, Elixhauser and Rx Risk V clasifications.
munge/ Data munging steps performed on the "raw data sets"
../00-filter.R Applies inclusion criteria (and produce a flowchart "on the fly")
../01-outcome.R Identify patients with PJI within 90 days. This is based on relevant ICD-10 and NOMESCO codes recorded at hospital visits during the the year before surgery, or if reoperation was recorded to SHAR due to PJI.
../02-survdata.R The filename is missleading but here is the place for additional variable transformation. BMI is categorized according to the WHO classification, individual diagnoses are grouped and factor levels are translated from Swedish to English etc.
../03-compositvariabler.R We here use the data/categorization.xlsx file mentioned above to construct the variables for co-morbidity (as well as a table to present those groups).
../04-remove_empty_variables.R Here we identify variables (including dummy) with less than 10 observations for each positive or negative outcome (PJI or not within 90 days). Too rare conditions are droped and not included as potential predictors.
../05-BRLasso.R is for variable selection, which requires some additional help functions etc from the lib-folder.
../06-variables_differnet_BRLasso_models.R extract the selected variables to be used in the "main" and "reduced" models.
../07-compare_models.R estimate AUC-values and data for ROC-curves etc, botth for the derived models, as well as for simpler comparisons.
src/ contains scripts to make either figures (exported to the graphs-folder) or tables (not included) for later use in the manuscript.
/reports contains files for the submitted manuscript.

The config/-folder, .gitignore-file and the .Rproj-file contains process configurations for ProjectTemplate, Git and RStudio.

nh_luxation_infektion's People

Contributors

eribul avatar

Watchers

Ute Hahn avatar  avatar

nh_luxation_infektion's Issues

Kör om beräkningar

Fanns tidigare fel i NOMESCO-kodningen, vilket ledde till att för få fall av PJI identifierades.
Skripten har nu förberetts men behöver köras om.
Jag har avvaktat ifall vi ska göra flera ändringar samtidigt.

Normal weigth as baseline

I currently use overweight as baseline, since this seemed relevant from mortality studies etc. It seems less relevant in this case however so I think we should change this back.

female som baseline

Gender: Eftersom alla andra variabler är förenade med en risk-ökning undrar jag om vi inte borde sätta female som referenskategori, då ger male en riskökning, istället för att det som nu står female associerat med riskminskning. Absolut! Bra idé!

sammanställ med Danska data

Template-kod från Projekt 29 som förhoppningsvis kan återanvändas.


title: "External validation"
author: "Erik Bulow"
date: '2019-11-13'
output:
html_document:
toc: true
toc_float: true
df_print: paged
code_folding: show

knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE, cache = TRUE)

Start

Install and attatch some useful packages

pkgs <- c("tidyverse", "doParallel", "pROC", "rms", "givitiR")

# Install
pkgsinst <- setdiff(pkgs, rownames(installed.packages()))
if (length(pkgsinst)) install.packages(pkgsinst)

# Attatch
purrr::walk(pkgs, ~suppressPackageStartupMessages(library(., character.only = TRUE)))

Load the exported model to validate (the R object previsously sent, probably with another path).

# Load the exported model object
load("../cache/fit_export.RData")

Set random seed for reproducability:

set.seed(123)

Prepare data

Inclusion/exlusion

Those were the inclusions/exklusions from Sweden. It might not be necessary to filter out on BMI, hospital and education however. Those variables are not used in the model.

Additional filter to ages 35-99 years to match the Swedish cohort.

knitr::include_graphics("../graphs/flowchart.png")

Variables

Outcome

The outcome variable is boolean (or numeric) indicating wether the patient died of any cause within 90 days after THA (TRUE/1) or not (FALSE/0). We did not have any censoring in Sweden. I guess we can simply drop cases where status is unknown?

Predictors

The data to evaluate should look like this:

head(fit_export$data)

Baseline variables

  • P_Gender: Kvinna/Man = Female/Male
  • P_ASA: level 1-3
  • P_Age: 35 - 99

Comorbidities

Comorbidities are identified by Elixhauser and Charlson comorbidity during one year before surgery. This is done by ICD-10 codes in Sweden but other versions exist. If ICD-10-codes are used those might be identified by regular expressions in the table below. Those are based on codes like "C123". Hence no puntctuation (not "C12.3"). The regular expressions might be modified to allow possible other patterns. Regular expressoins below are just combined from differnet groups (separated by "|"). They could be rewritten for clarity. If you don't see any regular expressions, click the small arrow in the upper right corner of the table. The grepl function (base R) can be used to identify ICD-10-codes based on the regular expressions.

load("../cache/categorization.RData")
comorbidities <- 
  categorization %>% 
  map_df(as.character) %>% 
  filter(new %in% names(fit_export$data)[grepl("c_", names(fit_export$data))]) %>% 
  separate(old, letters, sep = "\\|", fill = "right") %>% 
  pivot_longer(letters, values_drop_na = TRUE) %>% 
  mutate(value = trimws(value)) %>% 
  separate(value, c("index", "name"), extra = "merge") %>% 
  mutate(name = gsub("_", " ", name))
  
CCI <- 
  comorbidities %>% 
  filter(index == "CCI") %>% 
  left_join(coder::charlson_icd10, c(name = "group"))

ECI <- 
  comorbidities %>% 
  filter(index == "ECI") %>% 
  left_join(coder::elix_icd10, c(name = "group"))

comorb_defs <- 
  bind_rows(CCI, ECI) %>% 
  select(new, regex) %>% 
  mutate(regex = sprintf("(%s)", gsub("^", "", regex, fixed = TRUE))) %>% 
  group_by(new) %>% 
  summarise(regex = paste(regex, collapse = "|"))

comorb_defs

Example data

Let's assume we now have some data (I will use the Swedish data just as an example).

y <- fit_export$y
X <- fit_export$data

Validation of model as is

# Tibble with observed and predicted outcome
obspred <- 
  tibble(
    obs  = y, 
    pred = predict(fit_export, X, type = "response")
  )

# ROC curve
ROC <- pROC::roc(obspred, "obs", "pred", direction = "<")

# Estimate CI for AUC based on bootstrapping
# Use parallel processing to speed up the process
doParallel::registerDoParallel()
AUCci <- 
  pROC::ci.auc(
    ROC, 
    method          = "bootstrap", 
    boot.stratified = FALSE, 
    parallel        = TRUE
  )

# Check calibration. Note that devel should actually be "internal" for this example but I use
# "external", since that's what you will use for the UK data. 
calibration <- 
  givitiR::givitiCalibrationBelt(
    obspred$obs, 
    obspred$pred, 
    devel = "external"
  )

Results

For this example we had AUC:

AUCci
plot(ROC)

A calibration belt plot might be illustrated as:

plot(calibration, xlim = c(0, 0.03), ylim = c(0, 0.06))

Re-calibrated intercept

Method 2 from table 1 in Steyerberg 2004.

Z <- predict(fit_export, X, type = "response")
  
# Refit the intercept using Z = a + Xb from above as offset
fit2 <- glm(y ~ 1, offset = Z)

# Same calibration and validation as above
obspred2     <- tibble(obs  = y, pred = predict(fit2, type = "response"))
ROC2         <- pROC::roc(obspred2, "obs", "pred", direction = "<")
AUCci2       <- pROC::ci.auc(ROC2, method = "bootstrap", boot.stratified = FALSE, parallel = TRUE)
calibration2 <- givitiR::givitiCalibrationBelt(obspred2$obs, obspred2$pred, devel = "external")

Results

AUCci2
plot(ROC2)
plot(calibration2, xlim = c(0, 0.03), ylim = c(0, 0.06))

Re-calibration of intercenpt and calibration slope

Method 3 from table 1 in Steyerberg 2004.

fit3         <- glm(y ~ 1 + Z)
obspred3     <- tibble(obs  = y, pred = predict(fit3, type = "response"))
ROC3         <- pROC::roc(obspred3, "obs", "pred", direction = "<")
AUCci3       <- pROC::ci.auc(ROC3, method = "bootstrap", boot.stratified = FALSE, parallel = TRUE)
calibration3 <- givitiR::givitiCalibrationBelt(obspred3$obs, obspred3$pred, devel = "external")

Results

AUCci3
plot(ROC3)
plot(calibration3, xlim = c(0, 0.03), ylim = c(0, 0.06))

Export data to Sweden

ROC

If it would be OK to export coordinates for ROC-plots I would recommend this code to extract only the minimal data needed:


roc_plot_coords <- 
  data.frame(
    specificities = ROC$specificities, 
    sensitivities = ROC$sensitivities
  )

roc3_plot_coords <- 
  data.frame(
    specificities = ROC3$specificities, 
    sensitivities = ROC3$sensitivities
  )

AUC with CI

The text output from AUCci and AUCci3 should be enough. Hence, the same character string that gets printed above (but now stored in an object).

AUCci_print  <- capture.output(AUCci)
AUCci3_print <- capture.output(AUCci3)

Export objects

Save objects above to file export.RData (in the current working directory).

save(
  roc_plot_coords,
  roc3_plot_coords,
  AUCci_print,
  AUCci3_print,
  file = "export.RData"
)

Calibration plots

Help function

This is a simple help function to make a clean calibration belt plot and save it as TIFF (in the curent working directory):

makeplot <- function(x, file_name = deparse(substitute(x))) {
  tiff(
    paste0(file_name, ".tiff"), 
    1024, 1024, pointsize = 36, 
    compression = "lzw"
  )
  
  tcks <- seq(.0, .1, .01)
  
  plot(
    x,
    xlim             = c(0, .06),
    ylim             = c(0, .08),
    xlab             = "Predicted probabilities [%]",
    ylab             = "Observed  probabilities [%]",
    main             = NULL,
    table            = FALSE,
    polynomialString = FALSE,
    pvalueString     = FALSE,
    nString          = FALSE,
    mar              = c(5, 4, 0, 0) + 0.1,
    xaxt             = "n",
    yaxt             = "n"
  )
  abline(v = .03, lty = "dashed", col = "darkgreen", lwd = 3)
  axis(1, at = tcks, lab = sprintf("%.0f", tcks * 100), las = TRUE)
  axis(2, at = tcks, lab = sprintf("%.0f", tcks * 100), las = TRUE)
  
  dev.off()
}

Make and save figures

makeplot(calibration)
makeplot(calibration3)

ROC plots

If it not possible to export data for ROC-plot, here is some code to make a figure and save it as TIFF (in the current working directory) instead:


roc_plot_coords %>% 
  ggplot(aes(1 - specificities, sensitivities)) +
  geom_path(size = 2) +
  geom_abline(intercept = 0, slope = 1, color = "grey", linetype = 2) +
  theme_minimal() +
  theme(
    legend.position = c(1, 0),
    legend.justification = c(1, 0),
    legend.title = element_blank()
  )

ggsave(
  "roc.tiff", 
  height = 10, 
  width = 10, 
  unit = "cm", 
  dpi = 900, 
  compression = "lzw"
)

Kommentarer från NH

  • derivation with socioeconomival factors: "did we have income also?"
  • defs of comorb and outcomes: "refer to ICD and NOMESCO codes, additional table suggested"
  • Clinical usage: "here it would be nice to illustrate two extreme examples with low and high risk, respectively."

Osäker på kombination av ICD/KVÅ-koder.

Mail till NH/OR:
Se https://github.com/eribul/NH_luxation_infektion/blob/master/diagnostics/fels%C3%B6k%20infektionskoder.R

Hej!

Jag ser att Viktors urval tycks lite striktare (förskrivning av antibiotika under minst fyra veckor samt därefter identifierad via uppställda kriterier baserat på journalgranskning).
Dock började jag dubbelkolla de koder vi baserar infektionerna på. 
Nedan är en ungefärlig tabell som identifierar de ICD-10-koder som identifierar fall som inte dessutom är reopererade och/eller där det inte också finns en KVÅ-kod.
Samma patient kan ha fler än en kod så tabellen är inte perfekt. Men den visar ungefär hur det ser ut för de fall som endast identifieras via ICD-koder i NPR.
(p = andel i procent av de listade koderna, inte avseende samtliga fall)

   code      n     p desc                                                                                     
 1 T814    116    42 Infektion efter kirurgiska och medicinska ingrepp som ej klassificeras på annan plats    
 2 T845F    89    32 Infektion och inflammatorisk reaktion orsakad av inre ledprotes i höftled/lår            
 3 T845     35    13 Infektion och inflammatorisk reaktion orsakad av inre ledprotes                          
 4 M009      7     3 Purulent artrit, ospecificerad                                                           
 5 M009F     6     2 Purulent artrit UNS i höftled                                                            
 6 M000F     5     2 Septisk artrit (stafylokocker) i höftled                                                 
 7 M000      3     1 Stafylokockartrit och stafylokockpolyartrit                                              
 8 M002F     3     1 Septisk artrit (streptokocker) i höftled                                                 
 9 T847F     3     1 Infektion och inflammatorisk reaktion orsakad av andra inre ortopediska proteser, implan~
10 M008      2     1 Artrit och polyartrit orsakad av annan specificerad bakterie                             
11 T847      2     1 Infektion och inflammatorisk reaktion orsakad av andra inre ortopediska proteser, implan~
12 M861F     1     0 Annan akut osteomyelit i höftled/lårben                                                  
13 M866      1     0 Annan specificerad kronisk osteomyelit                                                   
14 M866F     1     0 Kronisk osteomyelit i höftled/lårben

Jag inser i samband med detta att jag kan ha missuppfattat hanteringen av KVÅ-koderna NFA12, TNF05 och TNF10. 
I den ursprungliga Excel-filen stod att dessa koder gäller ”bara om kombinerat med ICD-kod ovan”.
Jag tolkade detta som att dessa koder inte gäller på egen hand utan endast om de förekommer vid samma besökstillfälle från vilket det också finns en ICD-10 enligt den listan. 
Dock, då inget liknande villkor fanns för ICD-koderna, tolkade jag det som att ICD-koderna ensamma uppfyllde kravet för att identifiera infektion, dvs som att ICD-koden med eller utan KVÅ-kod anger infektion. 
Eller annorlunda uttryckt, att dessa KVÅ-koder därmed blev implicit redundanta.
Kikar jag nu på betydelsen av vissa av de inkluderade ICD-10-koderna ovan ser jag ju att de i sig själva inte utesluter annan lokalisation. 

Är det t ex så att T814 måste kombineras med NFA12/TNF05/TNF10 för att indikera en infektion av intresse?
Gäller det i så fall även T845F (där det iofs redan finns en implicit koppling till höften via koden själv)?

Om samtliga fall ovan exkluderas (eftersom de inte förekommer i kombination med NFA12/TNF05/TNF10 sjunker alltså vår skattning från ca 2,35 % till 2 %.
Exkluderas endast de som inte har ett ”F” på slutet får vi ca 2,17 %.
Dock vet jag inte hur sannolikt det är att en rel. frisk patient får en T814 helt orelaterat till protesoperationen nästan samtidigt?
Kanske är det lika sannolikt att man missat rapportera en KVÅ-kod som borde ha angetts? 
(Dvs att dessa fall bör inkluderas även om en mindre andel av dessa infektioner sannolikt är orelaterade till höftprotesoperationen.)
Jag tror väl att det bör vara ok att fortsätta som det är men att nämna som limitation. Eller behöver vi räkna om?

Med vänlig hälsning
Erik

Minnesanteckningar efter Zoom-möte 2021-01-29

  • Kolla hur ofta NOMESCO-koderna NFW59 och NFW69 förekommer hos oss
  • Vänta på uppdaterad kodlista från Alma för koder som definierar utfallet. Implementera sedan den och kör om.
  • titta endast på modell för 90 dagar (ta bort 2 år)
  • Ny modell som skickas till DK
  • De tittar om de kan validera modellen. Kanske behöver de exkludera varaibler för vilka de har färre än 10 oberservationer. Detta bör dock endast gälla om man gör rekalibrering av modellen kanske? Annars borde det inte spela ngn roll
  • De tar också fram en ännu mer förenklad modell som vi sedan utvärderar med våra data.
  • jag kollar också modellen med stickprov från vårt material med samma storlek som de kommer att ha i sin datamängd.

Added value from predicted model Harrell

# https://www.fharrell.com/post/addvalue/

require(rms)
getHdata(acath)
acath <- subset(acath, !is.na(choleste))
acath$sex <- factor(acath$sex, 0:1, c('male', 'female'))

# Enkel modell (PRE)
f <- lrm(sigdz ~ rcs(age,4) * sex, data=acath)

# MEr avancerad modell (POST)
g <- lrm(sigdz ~ rcs(age,4) * sex + rcs(choleste,4) + rcs(age,4) %ia%
           rcs(choleste,4), data=acath)

lra <- f$stats['Model L.R.']
lrb <- g$stats['Model L.R.']
ra  <- f$stats['R2']
rb  <- g$stats['R2']

# Det vi vill ha:
1 - ra / rb

Uppdatera formeln

Korrekt som det står men lättare med:
$\hat p = 1/(1 + e^{-\hat \alpha - \mathbf{\hat \beta X}})$

kategorisera BMI

BMI: Man har ju tidigare sett ett icke-linjärt samband mellan BMI och PJI, där både lågt och högt BMI ökar risken. Vi har i vår modell behandlat BMI som kontinuerlig parameter och finner en riskökning på 9% per BMI-enhet. Jag undrar om vi kanske missar riskökningen vid mycket lågt BMI, och om vi skulle kunna explorera BMI definierat enl WHO, alltså BMI uppdelat i fyra kategorier.

Skippa c_obesity

skippa c_obesity.
Dåligt rapporterad och svårtolkad, inkorrent om korstabulerad mot P_BMI.
Är dock ändå så pass korrelerad med BMI att variabelselektionen blir knepig ifall båda inkluderas.

kolla def av diagnosgrupper

Ev kan Marie hjälpa till med detta.
Alternativt korstabulera bef. data.
(behövs i så fall nytt uttag från länkningsdatabasen.)

Driv fram första utkast

  • Lägg till modell med bara ålder och kön som jämförelse
  • Kolla om jag har punktskattning för AUC från Ute. Tror att det bör gå att frå fram från .RData-filen?
  • Inkorporera detta i manuset + figurer och all diskussion
  • figuren med koefficienterna i appendeix med relevant beskrivning i texten
  • dela via Box så att alla kan editera

Gruppering BMI

NH:

Vikt kategoriseras enl. WHO i 6 kategorier:
< 18.5 as underweight, 18.5–24.9 as normal weight, 25–29.9 as overweight, 30–34.9 as class I obesity, 35.0–39.9 as class II obesity, and ≥ 40 as class III obesity.

Tror dock vi har för få underviktiga och fetma klass III varför jag ändå föreslår 4 grupper.

Kolla antal och skicka fk!

Kör om efter korrigerad RxRiskV

Har upptäckt fel i denna klassning, vilket behöver åtgärdas, varpå samkörningsdatabasen uppdateras, varpå modellen räknas om.
Då mycket av detta sker utanför själva projektet (påverkar endast indata) kan detta ske ganska oberoende av övrigt projektarbete.

webkalkylator

Inkoorporera med bef mortalitetskalkylator och bryt ut båda till separat repo.

Do not exclude patients who died within two years of THA

Those patients were in fact excluded in a previos version, as correctly pointed out by @AlmaBP and @inatrol.
I have now re-run the analysis without this exclusion. The result is essentially similar but:

  • the number of included patients increased from 86,415 to 88,830
  • Some AUC-values changed in the second decimal
  • The selected model changed slightly.

I will push those changes in a minute!

Kommentarer till NH

I abstractet nämns "The unadjusted cumulative incidence of PJI was XXX within 90 days and XXX within two years". Jag gissar här att du avser CIF från en överlevnadsmodell med död som competing risk. Ett problem är dock att vi inte har exakta datum för PJI pss som för död. Dessutom har vi ett urvalsvilkor så att endast patienter som lever minst två år efter operation inkluderats. Jag börjar därmed att endast redisa ngt slags "crude rate" ist.

Check Danish data

Erik's fit comparison code ran smoothly with the new data and model, and the results look good on first glance

Find attached the compiled Rmarkdown document from Eriks crossvalidation of the model with Danish data (DK_external_validation.pdf), and a zip file DK_exports.zip containing figures as tiff, and R objects as text files.
You can load the data as usual with R function load.

I still have some difficulties with "trusting" the model. Fitting the same model to the danish data set, which is considerably smaller, we get quite different coefficients for some of the variables, see the attached DK_refit_model.pdf.

My first guess is, that this could have something to do with the smaller sample size of the Danish data. It could also have something to do with different habits of diagnosing - is it right that the Swedish data are also older than the Danish ones? - or other practical reasons.

  • To investigate the first hypothesis (1), it would be helpful if you, Erik, could fit the final model to random subsamples of the Swedish data. I've attached some short R code, subsample_SE_data.R,
    that I tried out on data simulated from your fitted model - if you agree, you could just run that one with the real data, and I would be happy to look at the results together :-)

  • You could also crossvalidate the results from your model fitted to Danish data, on the Swedish data. I think it would be interesting to see if this makes much difference - maybe it won't. The model fitted to Danish data is in file model_dk_superlean.txt. I removed even more data to keep file size at an OK level,
    but it should still be usable for predicting values.

DK_exports.zip.zip
DK_external_validationDK.pdf
DK_refit_model.pdf

COI

Alla fyller i http://icmje.org/disclosure-of-interest/ och skickar till EB som behåller och väljer en av:

No competing interests: “All authors have completed the ICMJE uniform disclosure form at www.icmje.org/coi_disclosure.pdf and declare: no support from any organisation for the submitted work; no financial relationships with any organisations that might have an interest in the submitted work in the previous three years; no other relationships or activities that could appear to have influenced the submitted work.”

Grant funding for research but no other competing interest: “All authors have completed the ICMJE uniform disclosure form at www.icmje.org/ coi_disclosure.pdf and declare: all authors had financial support from ABC Company for the submitted work; no financial relationships with any organisations that might have an interest in the submitted work in the previous three years; no other relationships or activities that could appear to have influenced the submitted work.”

Mixed competing interests: “All authors have completed the ICMJE uniform disclosure form at www.icmje.org/coi_disclosure.pdf and declare: no support from any organisation for the submitted work; AB has received research grants and honorariums from XYZ company, BF has been paid for developing and delivering educational presentations for BBB foundation, DF does consultancy for HHH and VVV companies; no other relationships or activities that could appear to have influenced the submitted work.”

Differences between countries

we should mention somewhere that the Swedish and Danish population are different, and also the preference of surgical and other medical procedures is different in the two countries, as well as probably the coding of diagnoses.

Updated outcome codes

ICD-10

  • M000=purulent ledbetændelse,
  • M000F=hip,
  • M001=Artritis ved infektiøse og parasitære sygdomme klassificeret andetsteds,
  • M002=Reaktive artritter,
  • M002F=hip,
  • M008=Leddegigt hos børn,
  • M008F=hip,
  • M009=                Leddegigt hos børn ved sygdomme klassificeret andetsteds,
  • M009F=hip,
  • M860, M861, M862, M863, M854, M865, M866, M868, M869 Osteomyelitis (inkl. different subgroups)
  • T813=postoperative sårruptur IKA
  • T814=Infektion efter indgreb IKA,
  • T845=Infektion eller inflammation omkring ledprotese,
  • T845F, T845X,
  • T846F=Infektion eller inflammation omkring internt fiksationsmateriale hip,
  • T847=Infektion eller inflammation omkring anden ortopædisk protese, implantat eller transplantat, T847F
  • NFW59 = Reoperation ved overfladisk infektion efter operation på hofte eller lår
  • NFW69 = Reoperation ved dyb infektion efter operation på hofte eller lår

NOMESCO

NFS09 (not existing in DK), NFS19, NFS29, NFS39 (Not existing in DK), NFS49, NFS59, NFS99

Share model_reduced_lean.RData

  •  Make sure no personal data
  • ignore from .gitignore
  • Check that diagnostics/README.Rmd is up to date
  • render .md
  • push
  • share with others

Transparency declaration

NPH, as the lead author, affirms that this manuscript is an honest, accurate, and transparent account of the study being reported; that no important aspects of the study have been omitted; and that any discrepancies from the study as planned have been explained.

Additional models

Attachment
DK_auc_simpler_models_etc.pdf
includes the values of the AUC that were missing. I also fitted the Danish data to the simpler models you have in Figure 3, the same models with Age and Sex added, and a model without diagnoses.

Qualitatively, the results are the same as in Sweden, although the comorbidity indices partly switch order. Adding Age and Sex improves the AUC in all three cases by a few percent (Rx, Charlson, Elixhauser), but the AUC is still far from Erik’s model.

A mere “man on the street” model with BMI, Age and Sex is better than the models based on diagnosis indices, and reaches AUC = 0.639 (in the same data as used for fitting).

The improvement that we get if we refit Erik’s model to the Danish data is not overly impressive; AUC raises from 0.664 to 0.672 (measured on the same data that were used for fitting). So, overall the Swedes seem to be able to describe Danes quite well, albeit not 100% as well as themselves (AUC 0.68).

Benämn "caputnekros" som ”AVN"

Det bästa engelska ordet för caputnekros är ”AVN" (avascular necrosis of the femoral head). Detta bör vi använda i text, tabeller och grafer.

SUMMARY BOXES

Please produce a box offering a thumbnail sketch of what your article adds to the literature. The box should be divided into two short sections, each with 1—3 short sentences.

Section 1: What is already known on this topic
In two or three single sentence bullet points, please summarise the state of scientific knowledge on this topic before you did your study, and why this study needed to be done. Be clear and specific, not vague.

Section 2: What this study adds
In one or two single sentence bullet points, give a simple answer to the question “What do we now know as a result of this study that we did not know before?” Be brief, succinct, specific, and accurate. For example: “Our study suggests that tea drinking has no overall benefit in depression.” You might use the last sentence to summarise any implications for practice, research, policy, or public health.

Skippa åldersvariabeln ijämförande modeller för infektion

Under 9.2 AUC finns fortfarande ”Age” med, antingen som RCS eller som main effect eller som enkel modell i kombination med sex: kan det vara en kvarleva från mortalitets-arbetet? Age är ju inte med som parameter i våra modeller för PJI. Helt rätt! Får åtgärdas!

Patientinvolvering

request that authors provide a Patient and Public Involvement statement in the methods section of their papers.

brief response to the following questions, tailored as appropriate for the study design reported:
• At what stage in the research process were patients/public first involved in the research and how?
• How were the research question(s) and outcome measures developed and informed by their priorities, experience, and preferences?
• How were patients/public involved in the design of this study?
• How were they involved in the recruitment to and conduct of the study?
• Were they asked to assess the burden of the intervention and time required to participate in the research?

PJI inom två år i table 1

Lägg till kolumner för PJI inom 2 år i tble 1.
KAnske får tas bort sedan om det blir för rörigt ihop med extern validering men vi börjar så så länge.

Include referenses and intructions to the coder-package

It is probably a good idea to use this package to include some instructions of how to use it.
It might be, however, that they have a national verison of ICD-10-codes that works better wit hthe Danish data.
Perhaps this version could then be used for the Swedish data as well as a sensitivity analysis.

Tasks from Zoom meeting

  • will add the ICD-10/NOMESCO codes identifying PJI to the description.
  • Double check if any of those need to appear in tandem.
  • See how many patients had only those codes (no corresponding re-operation recorded in SHAR). (Nice to know.)

To be further discussed in a meeting with Nils:

  • Exclusion of everyone who died within two years?
  • Contributions to the manuscript?
  • There might be additional variables available in Denmark which might increase model performance. Might be interesting to look at as well.

skriv om metoddelen

Påbörjat utkast baserat på mortalitetsartikeln

We used data from two national quality registers 2008-2015: The Swedish hip arthroplasty register (SHAR), with a completeness of 96-98%,[@Karrholm2018] for model development and internal validation, and XXX for external validation.

SHAR was linked using Swedish personal identity numbers[@Ludvigsson2009] to enhance the variable set with education and civil status from Statistics Sweden,[@Ludvigsson2019] comorbidity and adverse events from the national patient register,[@Ludvigsson2011] and prescribed medications from the medical prescription register.[@Cnudde2016]
We excluded patients with hip arthroplasty due to fractures, tumours, unspecified, or unknown reasons. We included patients with either unilateral THA, or with their second staged bilateral hip.[@Bulow2020] Patients younger than 18 or older than 100 years were excluded, as were patients with a body mass index (BMI) above 50, or with missing data on BMI, ASA class, education, type of hospital, and cementation (Figure @ref(fig:flowchart)).

Comorbidity, during one year before surgery, was based on the Swedish version of the 10th revsin of the international classification of diseases (ICD-10-SE), as recorded at any hospital physician appointment prior to surgery. Individual codes were then combined using Charlson and Elixhauser comorbidity groups.[@quan2005] A similar procedure was performed for codes of the anatomical therapeutic chemical (ATC) classification, grouped by Rx Risk V.[@Pratt2018] Similar conditions were then combined to a broader classification scheme based on clinical relevance, and those categories were used as possible predictors (Table @ref(tab:tabcategorization)).

Infections within 90 days and 2 years respectively, were identified by relevant ICD-10-SE codes, or by codes from the Classification of Surgical Procedures (NCSP) from the Nordic Medico-Statistical Committee (NOMESCO) recorded in the national patient register. An infection was also identified if causing a reoperation recorded to SHAR.

Uppdatera referenser

  • 1. [@Zimmerli2006] Zimmerli W. Infection and musculoskeletal conditions: Prosthetic-joint-associated infections. Best practice & research Clinical rheumatology 2006;20(6):1045-63. doi: 10.1016/j.berh.2006.08.003 [published Online First: 2006/11/28]
  • 2. Kapadia BH, Berg RA, Daley JA, et al. Periprosthetic joint infection. Lancet 2016;387(10016):386-94. doi: 10.1016/s0140-6736(14)61798-0 [published Online First: 2015/07/03]
  • 3. Shohat N, Bauer T, Buttaro M, et al. Hip and Knee Section, What is the Definition of a Periprosthetic Joint Infection (PJI) of the Knee and the Hip? Can the Same Criteria be Used for Both Joints?: Proceedings of International Consensus on Orthopedic Infections. J Arthroplasty 2019;34(2s):S325-s27. doi: 10.1016/j.arth.2018.09.045 [published Online First: 2018/10/23]
  • 4. Ridgeway S, Wilson J, Charlet A, et al. Infection of the surgical site after arthroplasty of the hip. J Bone Joint Surg Br 2005;87(6):844-50. doi: 10.1302/0301-620x.87b6.15121 [published Online First: 2005/05/25]
  • 5. Lai K, Bohm ER, Burnell C, et al. Presence of medical comorbidities in patients with infected primary hip or knee arthroplasties. J Arthroplasty 2007;22(5):651-6. doi: 10.1016/j.arth.2006.09.002 [published Online First: 2007/08/11]
  • 6. Malinzak RA, Ritter MA, Berend ME, et al. Morbidly obese, diabetic, younger, and unilateral joint arthroplasty patients have elevated total joint arthroplasty infection rates. J Arthroplasty 2009;24(6 Suppl):84-8. doi: 10.1016/j.arth.2009.05.016 [published Online First: 2009/07/17]
  • 7. Ong KL, Kurtz SM, Lau E, et al. Prosthetic joint infection risk after total hip arthroplasty in the Medicare population. J Arthroplasty 2009;24(6 Suppl):105-9. doi: 10.1016/j.arth.2009.04.027 [published Online First: 2009/06/06]
  • 8. Pedersen AB, Mehnert F, Johnsen SP, et al. Risk of revision of a total hip replacement in patients with diabetes mellitus: a population-based follow up study. J Bone Joint Surg Br 2010;92(7):929-34. doi: 10.1302/0301-620x.92b7.24461 [published Online First: 2010/07/03]
  • 9. Bozic KJ, Lau E, Kurtz S, et al. Patient-related risk factors for periprosthetic joint infection and postoperative mortality following total hip arthroplasty in Medicare patients. J Bone Joint Surg Am 2012;94(9):794-800. doi: 10.2106/jbjs.k.00072 [published Online First: 2012/05/04]
  • 10. Jamsen E, Nevalainen P, Eskelinen A, et al. Obesity, diabetes, and preoperative hyperglycemia as predictors of periprosthetic joint infection: a single-center analysis of 7181 primary hip and knee replacements for osteoarthritis. J Bone Joint Surg Am 2012;94(14):e101. doi: 10.2106/jbjs.j.01935 [published Online First: 2012/07/20]
  • 11. [@Rasouli2014a] Rasouli MR, Restrepo C, Maltenfort MG, et al. Risk factors for surgical site infection following total joint arthroplasty. J Bone Joint Surg Am 2014;96(18):e158. doi: 10.2106/jbjs.m.01363 [published Online First: 2014/09/19]
  • 12. Maoz G, Phillips M, Bosco J, et al. The Otto Aufranc Award: Modifiable versus Nonmodifiable Risk Factors for Infection After Hip Arthroplasty. Clin Orthop Relat Res 2014 doi: 10.1007/s11999-014-3780-x [published Online First: 2014/07/16]
  • 13. Haynes SR, Lawler PG. An assessment of the consistency of ASA physical status classification allocation. Anaesthesia 1995;50(3):195-9. [published Online First: 1995/03/01]
  • 14. Berbari EF, Osmon DR, Lahr B, et al. The Mayo prosthetic joint infection risk score: implication for surgical site infection reporting and risk stratification. Infection control and hospital epidemiology : the official journal of the Society of Hospital Epidemiologists of America 2012;33(8):774-81. doi: 10.1086/666641 [published Online First: 2012/07/05]
  • 15. Charlson ME, Pompei P, Ales KL, et al. A new method of classifying prognostic comorbidity in longitudinal studies: development and validation. J Chronic Dis 1987;40(5):373-83. doi: 10.1016/0021-9681(87)90171-8 [published Online First: 1987/01/01]
  • 16. Quan H, Li B, Couris CM, et al. Updating and validating the Charlson comorbidity index and score for risk adjustment in hospital discharge abstracts using data from 6 countries. American journal of epidemiology 2011;173(6):676-82. doi: 10.1093/aje/kwq433 [published Online First: 2011/02/19]
  • 17. Edelstein AI, Kwasny MJ, Suleiman LI, et al. Can the American College of Surgeons Risk Calculator Predict 30-Day Complications After Knee and Hip Arthroplasty? J Arthroplasty 2015;30(9 Suppl):5-10. doi: 10.1016/j.arth.2015.01.057 [published Online First: 2015/07/15]
  • 18. Wingert NC, Gotoff J, Parrilla E, et al. The ACS NSQIP Risk Calculator Is a Fair Predictor of Acute Periprosthetic Joint Infection. Clin Orthop Relat Res 2016;474(7):1643-8. doi: 10.1007/s11999-016-4717-3 [published Online First: 2016/02/26]
  • 19. [@Bozic2013a] Bozic KJ, Ong K, Lau E, et al. Estimating risk in Medicare patients with THA: an electronic risk calculator for periprosthetic joint infection and mortality. Clin Orthop Relat Res 2013;471(2):574-83. doi: 10.1007/s11999-012-2605-z [published Online First: 2012/11/28]
  • 20. [@Inacio2015a] Inacio MC, Pratt NL, Roughead EE, et al. Predicting Infections After Total Joint Arthroplasty Using a Prescription Based Comorbidity Measure. J Arthroplasty 2015;30(10):1692-8. doi: 10.1016/j.arth.2015.05.004 [published Online First: 2015/05/20]
  • 21. [@Karrholm2018] Swedish_Hip_Arthroplasty_Register. Annual Report, 2017.
  • 22. Ludvigsson JF, Andersson E, Ekbom A, et al. External review and validation of the Swedish national inpatient register. BMC public health 2011;11:450. doi: 10.1186/1471-2458-11-450 [published Online First: 2011/06/11]
  • 23. [@Pedersen2010a] Pedersen AB, Svendsson JE, Johnsen SP, et al. Risk factors for revision due to infection after primary total hip arthroplasty. A population-based study of 80,756 primary procedures in the Danish Hip Arthroplasty Registry. Acta Orthop 2010;81(5):542-7. doi: 10.3109/17453674.2010.519908 [published Online First: 2010/09/24]
  • 24. Dale H, Fenstad AM, Hallan G, et al. Increasing risk of prosthetic joint infection after total hip arthroplasty. Acta Orthop 2012;83(5):449-58. doi: 10.3109/17453674.2012.733918 [published Online First: 2012/10/23]
  • 25. Sayed-Noor AS, Mukka S, Mohaddes M, et al. Body mass index is associated with risk of reoperation and revision after primary total hip arthroplasty: a study of the Swedish Hip Arthroplasty Register including 83,146 patients. Acta Orthop 2019;90(3):220-25. doi: 10.1080/17453674.2019.1594015 [published Online First: 2019/04/02]
  • 26. Everhart JS, Altneu E, Calhoun JH. Medical comorbidities are independent preoperative risk factors for surgical infection after total joint arthroplasty. Clin Orthop Relat Res 2013;471(10):3112-9. doi: 10.1007/s11999-013-2923-9 [published Online First: 2013/03/23]
  • 27. Tan TL, Maltenfort MG, Chen AF, et al. Development and Evaluation of a Preoperative Risk Calculator for Periprosthetic Joint Infection Following Total Joint Arthroplasty. J Bone Joint Surg Am 2018;100(9):777-85. doi: 10.2106/jbjs.16.01435 [published Online First: 2018/05/02]
  • 28. Poultsides LA, Ma Y, Della Valle AG, et al. In-hospital surgical site infections after primary hip and knee arthroplasty--incidence and risk factors. J Arthroplasty 2013;28(3):385-9. doi: 10.1016/j.arth.2012.06.027 [published Online First: 2012/11/13]
  • 29. Pulido L, Ghanem E, Joshi A, et al. Periprosthetic joint infection: the incidence, timing, and predisposing factors. Clin Orthop Relat Res 2008;466(7):1710-5. doi: 10.1007/s11999-008-0209-4 [published Online First: 2008/04/19]
  • 30. Namba RS, Inacio MC, Paxton EW. Risk factors associated with surgical site infection in 30,491 primary total hip replacements. J Bone Joint Surg Br 2012;94(10):1330-8. doi: 10.1302/0301-620x.94b10.29184 [published Online First: 2012/09/28]
  • 31. Higuera CA, Elsharkawy K, Klika AK, et al. 2010 Mid-America Orthopaedic Association Physician in Training Award: predictors of early adverse outcomes after knee and hip arthroplasty in geriatric patients. Clin Orthop Relat Res 2011;469(5):1391-400. doi: 10.1007/s11999-011-1804-3 [published Online First: 2011/02/25]
  • 32. Inacio MC, Pratt NL, Roughead EE, et al. Using Medications for Prediction of Revision after Total Joint Arthroplasty. J Arthroplasty 2015;30(12):2061-70. doi: 10.1016/j.arth.2015.06.009 [published Online First: 2015/07/21]
  • 33. Mraovic B, Suh D, Jacovides C, et al. Perioperative hyperglycemia and postoperative infection after lower limb arthroplasty. Journal of diabetes science and technology 2011;5(2):412-8. [published Online First: 2011/04/30]
  • 34. Iorio R, Williams KM, Marcantonio AJ, et al. Diabetes mellitus, hemoglobin A1C, and the incidence of total joint arthroplasty infection. J Arthroplasty 2012;27(5):726-9 e1. doi: 10.1016/j.arth.2011.09.013 [published Online First: 2011/11/08]
  • 35. Gilson M, Gossec L, Mariette X, et al. Risk factors for total joint arthroplasty infection in patients receiving tumor necrosis factor alpha-blockers: a case-control study. Arthritis research & therapy 2010;12(4):R145. doi: 10.1186/ar3087 [published Online First: 2010/07/20]
  • 36. Momohara S, Kawakami K, Iwamoto T, et al. Prosthetic joint infection after total hip or knee arthroplasty in rheumatoid arthritis patients treated with nonbiologic and biologic disease-modifying antirheumatic drugs. Modern rheumatology / the Japan Rheumatism Association 2011;21(5):469-75. doi: 10.1007/s10165-011-0423-x [published Online First: 2011/02/15]
  • 37. Willis-Owen CA, Konyves A, Martin DK. Factors affecting the incidence of infection in hip and knee replacement: an analysis of 5277 cases. J Bone Joint Surg Br 2010;92(8):1128-33. doi: 10.1302/0301-620x.92b8.24333 [published Online First: 2010/08/03]
  • 38. Cancienne JM, Werner BC, Luetkemeyer LM, et al. Does Timing of Previous Intra-Articular Steroid Injection Affect the Post-Operative Rate of Infection in Total Knee Arthroplasty? J Arthroplasty 2015;30(11):1879-82. doi: 10.1016/j.arth.2015.05.027 [published Online First: 2015/06/14]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.