Package 'roinc'

Title: Interface to the Logical Observation Identifiers Names and Codes (LOINC) API
Description: The Logical Observation Identifiers Names and Codes or LOINC <https://loinc.org/>. LOINC is the international standard for identifying health observations, measurements, and documents. This package interfaces with the LOINC API.
Authors: Ernest Guevarra [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-4887-4415>)
Maintainer: Ernest Guevarra <[email protected]>
License: GPL (>= 3)
Version: 0.0.0.9003
Built: 2026-10-02 13:17:24 UTC
Source: https://github.com/OxfordIHTM/roinc

Help Index


List of the LOINC Linguistic Variants that are available and their producers (translators).

Description

LOINC Linguistic Variants are provided by an international community of volunteer translators.

Usage

linguistic_variants

Format

A tibble with 5 fields

Variable Description
ID The unique identifier for a particular language variant within the LOINC database. This identifier does not have any meaning outside of LOINC.
ISO_LANGUAGE The ISO language code
ISO_COUNTRY The ISO-2C country code
LANGUAGE_NAME A combination of the name of the language and the country in which that variant is used
PRODUCER The person or organisation that provided the translation

Examples

linguistic_variants

Retrieving the LOINC CodeSystem resource for FHIR

Description

Retrieving the LOINC CodeSystem resource for FHIR

Usage

roinc_codesystem(tabular = TRUE)

roinc_codesystem_lookup(code, property = NULL, version = NULL)

Arguments

tabular

Logical. Should response be tabular? If TRUE (default), response is converted to a tibble. If FALSE, response is kept as a list.

code

String value for LOINC code identifier for a LOINC code, part, answer list, or answer.

property

A string value or vector of string values for specific LOINC code system property or properties to return in a lookup. The current list of property codes that will return a result are found in https://build.fhir.org/ig/HL7/termchangeset-ig/en/CodeSystem-roinc-property-cs.html.

version

A string value for LOINC version identifier to specify which versions of concepts in LOINC to retrieve.

Value

A list or a tibble of LOINC CodeSystem resources for FHIR.

Examples

## Not run: 
roinc_codeystem()
roinc_codesystem_lookup(code = "4544-3")
roinc_codesystem_lookup(code = "LP31755-9")
roinc_codesystem_lookup(code = "LL1162-8")
roinc_codesystem_lookup(code = "LA6751-7")

## End(Not run)

Retrieving the LOINC concept map resource for FHIR

Description

Retrieving the LOINC concept map resource for FHIR

Usage

roinc_concept_map(code)

Arguments

code

String value for LOINC code identifier for a LOINC code, part, answer list, or answer.

Value

A list or a tibble of LOINC ConceptMap resources for FHIR.

Examples

## Not run: 
roinc_concept_map("30657-1")

## End(Not run)

Download LOINC's primary release artifact

Description

Download LOINC's primary release artifact

Usage

roinc_download(version = NULL, directory = NULL)

Arguments

version

A string value for LOINC version identifier to specify which versions of concepts in LOINC to retrieve.

directory

Directory path to save the LOINC primary release artifact download to. Default is to save in the current working directory.

Value

The file path to the downloaded LOINC primary release artifact.

Examples

## Not run: 
roinc_download()

## End(Not run)

Get LOINC's primary release artifact download metadata

Description

Get LOINC's primary release artifact download metadata

Usage

roinc_get_metadata(version = NULL, tabular = TRUE)

Arguments

version

A string value for LOINC version identifier to specify which versions of concepts in LOINC to retrieve.

tabular

Logical. Should response be tabular? If TRUE (default), response is converted to a tibble. If FALSE, response is kept as a list.

Value

A list or tibble of the metadata for the current and for every past release of LOINC or for specific version requested.

Examples

## Not run: 
roinc_get_metadata()
roinc_get_metadata_version()

## End(Not run)

Retrieve LOINC panel/questionnaire resource for FHIR

Description

Retrieve LOINC panel/questionnaire resource for FHIR

Usage

roinc_questionnaire(panel)

Arguments

panel

A string value for a LOINC panel.

Value

A list or a tibble of LOINC panel/questionnaire resources for FHIR.

Examples

## Not run: 
roinc_questionnaire(panel = "89689-4")

## End(Not run)

Set LOINC API credentials

Description

Set LOINC API credentials

Usage

roinc_set_credentials(username, password)

Arguments

username

LOINC login username

password

LOINC login password

Examples

## Not run: 
roinc_set_credentials(username = "LOINC_USERNAME", password = "LOINC_PASSWORD")

## End(Not run)

Retrieving the LOINC value set resource for FHIR

Description

Retrieving the LOINC value set resource for FHIR

Usage

roinc_valueset(valueset, expand = FALSE, version = NULL)

roinc_valueset_validate(valueset, code)

Arguments

valueset

A string value for a LOINC term, answer lists, or LOINC groups that specify a set of codes drawn from one or more LOINC code systems.

expand

Logical. Should a value set expansion be performed? If TRUE (default), the terms in a given value set are returned.

version

A string value for LOINC version identifier to specify which versions of concepts in LOINC to retrieve.

code

String value for LOINC code identifier for a LOINC code, part, answer list, or answer.

Value

A list or a tibble of LOINC ValueSet resources for FHIR.

Examples

## Not run: 
roinc_valueset("LL1162-8")
roinc_valueset("LL1162-8", expand = TRUE)
roinc_valueset_validate("LG33055-1", "8867-4")

## End(Not run)