mapLOINC: Mapping local lab codes with LOINC

View source: R/mapLOINC.R

mapLOINCR Documentation

Mapping local lab codes with LOINC

Description

mapLOINC is used for merging two tables together. One is lab data with local codes, and the other one is mapping table of local lab codes and LOINC.

Usage

mapLOINC(labData, labItemColName, mappingTable = NULL)

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.

labItemColName

the column name that records lab item in labData. If lab code is combined by multiple columns, then just simply add + operator between column names, e.g., A + B.

mappingTable

a data table with at least two columns: local lab item code and LOINC code. The local column name should be identical as labItemColName in labData.

Details

Since the lab item may be coded in local scheme, users can map it with LOINC by providing LOINC mapping table. This step is optional but recommended. After mapped, user can select desired laboratory tests by using function searchCases.

Value

A data.table merged two tables.

Examples

mapLOINC(labData = labSample,
        labItemColName = ITEMID,
        mappingTable = mapSample)

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