utlede_annenDiag_variabler | R Documentation |
Functions for creating variables based on NORIC's AnnenDiag-table and
for merging these variables into NORIC's AngioPCIVar-table by key
variables ForlopsID
and AvdRESH
.
utlede_kar_annen_diag(df_ad)
legg_til_trykk_bilde_per_kar(df_ap, df_ad, metodeType = "FFR")
legg_til_trykkmaalinger(df_ap, df_ad)
df_ad |
NORIC's AnnenDiag-table, must contain variables
|
df_ap |
NORIC's AngioPCIVar-table, must contain variables
|
metodeType |
value of variable |
The function utlede_kar_annen_diag()
groups the
segments
in df_ad
into coronary arteries in the new variable
kar
, then df_ad
is returned from the function.
The function legg_til_trykk_bilde_per_kar()
uses the data in
df_ad
to calculate 5 new variables, where variable names prefix is
type of method (one of: "FFR", "iFR", "IVUS" or "OCT") and suffix is each
level of kar
(p.ex. if metode is 'FFR' then variables are
FFR_LAD
, FFR_RCA
, FFR_CX
and FFR_Graft
).
The variable says whether or not a measure of this method
is performed in each kar
. If at least one measure is done in a
kar
the value of the corresponding variable is given the value
ja, otherwise the value is nei. These 5 variables are then
merged into df_ap
, before df_ap
is returned from the function.
For procedures where no measures are done on segment-level (e.g. no entries
available in df_ad
), the values for the 5 new variables are <NA>.
The function legg_til_trykkmaalinger()
adds variables PdPa
,
IMR
, Pa
and Pd
to df_ap
-table. Values of these 4
new variables (measures of pressure) depends on the df_ad
-table:
value "Ja" is attributed if the method is registered for the procedure,
value "Nei" is attributed if no if this method not is performed.
For procedures where no measures are done on segment-level (e.g. no entries
available in df_ad
), the values for the 4 new variables are <NA>.
df_ad <- data.frame(
ForlopsID = c(1, 1, 3, 3, 5),
AvdRESH = rep(1,5),
segment = c("PDA/RPD (4)",
"PLA (18)",
"Midtre LAD (7)",
"Ve hovedstamme (5)",
"Ve hovedstamme (5)"),
graft = c("Nei",
"Arteriell",
"Vene",
"Nei",
"Nei"),
metode = c("FFR", "FFR", NA, "test", "FFR"))
df_ap <-data.frame(
ForlopsID = c(1, 2, 3, 4, 5),
AvdRESH = rep(1,5))
utlede_kar_annen_diag(df_ad)
legg_til_trykk_bilde_per_kar(df_ap = df_ap,
df_ad = df_ad,
metodeType = "FFR")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.