extractSurvival: Extract surivival information

Description Usage Arguments Value

View source: R/extractSurvival.R

Description

Extracts surival information from the Caisis and Diamonds databases and returns a data frame.

Usage

1
2
3
4
extractSurvival(connection, patients = NULL,
  CaisisDiagnosis = "Multiple Myeloma",
  CaisisGroup = "Plasma Cell Neoplasm", DiamondsDiagnosis = c("C90.00",
  "C90.01", "C90.03", "203.0", "203.00", "203.01", "203.02"))

Arguments

connection

ODBC connection object returned by dbConnect.

patients

A character vector of patient medical record numbers. If no limit is desired then set as NULL.

CaisisDiagnosis

Caisis diagnosis from which to extract the date of diagnoisis. Survival length in months will be computed from the earliest date of diagnosis between Caisis and Diamonds.

CaisisGroup

Caisis disease group from which to extract the last known alive date.

DiamondsDiagnosis

Diamonds ICD codes from which to extract the date of diagnoisis. Survival length in months will be computed from the earliest date of diagnosis between Caisis and Diamonds.

Value

Returns a data frame with PatientMRN, date of birth, last known alive date, last lab date, and surival status and death dates from both Caisis and Diamonds databases. From this information, the most recent date ('LastDate') is determined and the survival in months is computed between this date and the date of earliest date of diagnosis reported in Caisis and Diamonds ('SurvivalMonths'). The surival status is the must up-to-date status from both Caisis and Diamonds databses. The patient is assumed alive if the status is not dead and the CaisisLastAliveDate or the LastLabDate is within the past 6 months.


davidcoffey/Diamonds documentation built on March 8, 2020, 12:34 a.m.