hospinet_from_subject_database: Create HospiNet object from subject database

Description Usage Arguments Value See Also Examples

Description

This function creates a HospiNet object from the database containing subjects stays.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
hospinet_from_subject_database(
  base,
  window_threshold = 365,
  count_option = "successive",
  condition = "dates",
  noloops = TRUE,
  nmoves_threshold = NULL,
  flag_vars = NULL,
  flag_values = NULL,
  create_MetricsTable = TRUE,
  verbose = FALSE,
  shinySession = NULL,
  ...
)

Arguments

base

(hospinet.base) A database of records of stays of subjects in facilities. This can be obtained using the function checkBase.

window_threshold

(numeric) A threshold for the number of days between discharge and admission to be counted as a transfer. Set to 0 for same day transfer, default is 365 days.

count_option

(character) TODO. Default is "successive".

condition

(character) TODO. Default is "dates".

noloops

(boolean). Should transfers within the same nodes (loops) be kept or set to 0. Defaults to TRUE, removing loops (setting matrix diagonal to 0).

nmoves_threshold

(numeric) A threshold for the minimum number of subject transfer between two facilities. Set to NULL to deactivate, default to NULL.

flag_vars

(list) Additional variables that can help flag a transfer, besides the dates of admission and discharge. Must be a named list of two character vectors which are the names of the columns that can flag a transfer: the column that can flag a potential origin, and the column that can flag a potential target. The list must be named with "origin" and "transfer". Eg: list("origin" = "var1", "target" = "var2"). See details.

flag_values

(list) A named list of two character vectors which contain the values of the variables in flag_var that are matched to flag a potential transfer. The list must be named with "origin" and "transfer". The character vectors might be of length greater than one. Eg: list("origin" = c("value1", "value2"), "target" = c("value2", "value2")). The values in 'origin' and 'target' are the values that flag a potential origin of a transfer, or a potential target, respectively. See details.

create_MetricsTable

(boolean) Should the metrics table be created along with the network. Setting to FALSE will speed up the results. Default is TRUE.

verbose

TRUE to print computation steps

shinySession

(NULL) internal variable to deal with the progress bar

...

Additional parameters to be sent to checkBase in case the database has not been checked yet.

Value

The function returns a HospiNet object.

See Also

HospiNet

Examples

1
#TODO

PascalCrepey/HospitalNetwork documentation built on Sept. 16, 2020, 9:56 p.m.