searchCases: Search cases

searchCasesR Documentation

Search cases

Description

searchCasesByLOINC

Usage

searchCasesByLOINC(
  labData,
  idColName = NULL,
  loincColName = NULL,
  dateColName = NULL,
  condition,
  isSummary = FALSE
)

Arguments

labData

a file or dataframe of laboratory test data with at least 4 columns about patient ID, lab item, test value and test date, respectively.

idColName

the column name that records patient ID in labData.

loincColName

tthe column name that records LOINC in labData.

dateColName

the column name that records test date in labData. It should be in "YYYYMMDD"/"YYYY-MM-DD" format.

condition

desired keyword string.

isSummary

summary T or F

Details

LOINC provides a column to record related names for lab tests. This function can be used to search this kind of description. Only searching LOINC codes are also avaliable, but not recoommended.

Value

A data.table merged two tables.

Examples

loincSample <- mapLOINC(labData = labSample,
                       labItemColName = ITEMID,
                       mappingTable = mapSample)
searchCasesByLOINC(labData = loincSample,
                  idColName = SUBJECT_ID,
                  loincColName = LOINC,
                  dateColName = CHARTTIME,
                  condition = "Creatinine",
                  isSummary = TRUE)


DHLab-TSENG/lab documentation built on Sept. 1, 2023, 9:03 p.m.