tbl_first_isolates: Bepaling eerste isolaten

Description Usage Arguments Value Examples

View source: R/epidemiology.R

Description

Hiermee worden direct alle eerste isolaten toegevoegd aan een tabel, zie first_isolate.

Usage

1
2
3
4
5
6
7
tbl_first_isolates(x, col_mo = "bacteriecode",
  col_date = "ontvangstdatum",
  col_patient_id = sort(colnames(x))[sort(colnames(x)) %in% c("patid",
  "patidnb")][1], col_testcode = NULL, col_specimen = "mtrlgroep",
  col_icu = "is_ic", episode_days = 365, testcodes_exclude = "",
  icu_exclude = FALSE, ignore_I = TRUE, info = TRUE,
  timestamp = FALSE)

Arguments

x

Een data.frame met isolaten.

col_mo

Standaard is "bacteriecode". De kolomnaam van de bacteriecodes voor het bepalen van sleutelantibiotica.

col_date

Standaard is "ontvangstdatum". De kolomnaam van de datum van ontvangst of uitslag.

col_patient_id

Standaard is "patid", of (als deze niet voorkomt) "patidnb". De kolomnaam van de unieke ID's van de patient.

col_testcode

Standaard is "testcode". De kolomnaam van de testcode van de order. Gebruik col_testcode = NULL om de testcodes niet als exclusiecriterium te gebruiken. In dit geval wordt testcodes_exclude genegeerd.

col_specimen

Standaard is "mtrlgroep". De kolomnaam van de materiaalgroep van de order.

col_icu

Standaard is "is_ic". De kolomnaam van de logical of een afdeling/aanvrager bij de Intensive Care hoort.

episode_days

Standaard is 365. De episode in dagen waarna een isolaat opnieuw een 'eerste isolaat' genoemd moet worden.

testcodes_exclude

Standaard is leeg. De lijst met testcodes waarvan de isolaten genegeerd moeten worden (hoofdletterONgevoelig). Gebruik voor het uitsluiten van screeningskweken testcodes_exclude = c("KARE", "KBRMO", "KESBL", "KMNS", "KMR", "KMRP", "KVRE", "KWA22", "KWA35", "KWA37", "KWE", "KWKS", "KWKSD", "KWL", "KWS", "RESDEP").

icu_exclude

Standaard is FALSE. Negeert alle isolaten waarbij col_icu == TRUE.

info

Standaard is TRUE. Printen van voortgang.

timestamp

Standaard is FALSE. Printen van timestamp.

Value

tabel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## Not run: 

# snel alles toevoegen:
x <- tbl_first_isolates(x)

# controleren dat het werkt:
examples_isolates %>%
  tbl_first_isolates(col_date = "date",
                     col_patient_id = "patient_id",
                     col_mo = "bactid",
                     col_icu = NULL,
                     col_specimen = NULL) %>%
  pull(eerste_isolaat_gewogen) %>%
  sum()

# of per type (AMR-pakket):

x$sleutelab <- key_antibiotics(x)

x$eerste_isolaat <-
  first_isolate(x)

x$eerste_isolaat_gewogen <-
  first_isolate(x,
                col_keyantibiotics = 'sleutelab')

x$eerste_bloedisolaat <-
  first_isolate(x,
                specimen_group = 'Bloed')

x$eerste_bloedisolaat_gewogen <-
  first_isolate(x,
                specimen_group = 'Bloed',
                col_keyantibiotics = 'sleutelab')

# enz.

## End(Not run)

msberends/certedata documentation built on Nov. 26, 2019, 5:19 a.m.